From: Andy Bavier Date: Thu, 11 Mar 2010 19:58:06 +0000 (+0000) Subject: Fixed a bug that showed instances not associated with the slice X-Git-Tag: sfa-0.9-11~47 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=52b4cb21f33f380f55d467709b1b9bc8ba84bd57 Fixed a bug that showed instances not associated with the slice --- diff --git a/sfa/managers/aggregate_manager_eucalyptus.py b/sfa/managers/aggregate_manager_eucalyptus.py index e1d93033..e62381a1 100644 --- a/sfa/managers/aggregate_manager_eucalyptus.py +++ b/sfa/managers/aggregate_manager_eucalyptus.py @@ -370,7 +370,10 @@ def get_rspec(api, xrn, origin_hrn): instanceId.append(instance.instance_id) # Get the information about those instances using their ids. - reservations = conn.get_all_instances(instanceId) + if len(instanceId) > 0: + reservations = conn.get_all_instances(instanceId) + else: + reservations = [] for reservation in reservations: for instance in reservation.instances: instances.append(instance) diff --git a/sfatables/globals.py b/sfatables/globals.py index fe6788d7..4e8e77e8 100644 --- a/sfatables/globals.py +++ b/sfatables/globals.py @@ -1,5 +1,5 @@ import os.path -sfatables_config = '/etc/sfatables' +sfatables_config = '/Users/andy/Desktop/svn.planet-lab.org/sfa/trunk/sfatables' match_dir = os.path.join(sfatables_config, "matches") target_dir = os.path.join(sfatables_config, "targets")