From 52b4cb21f33f380f55d467709b1b9bc8ba84bd57 Mon Sep 17 00:00:00 2001 From: Andy Bavier Date: Thu, 11 Mar 2010 19:58:06 +0000 Subject: [PATCH] Fixed a bug that showed instances not associated with the slice --- sfa/managers/aggregate_manager_eucalyptus.py | 5 ++++- sfatables/globals.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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") -- 2.43.0