From 4cad0456ba7633d7208aacb67fbf485e31f15dbd Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 15 Mar 2012 13:24:04 -0400 Subject: [PATCH] fix AttributeError --- sfa/openstack/osaggregate.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sfa/openstack/osaggregate.py b/sfa/openstack/osaggregate.py index 50d1443b..606f4860 100644 --- a/sfa/openstack/osaggregate.py +++ b/sfa/openstack/osaggregate.py @@ -259,7 +259,7 @@ class OSAggregate: def delete_instances(self, project_name): - project = self.shell.project_get(project_name) + project = self.driver.shell.project_get(project_name) if not project: return 1 instances = self.driver.shell.db.instance_get_all_by_project(project_name) @@ -267,7 +267,9 @@ class OSAggregate: for instance in instances: # deleate this instance's security groups for security_group in instance.security_groups: - security_group_manager.delete_security_group(security_group.name) + # dont delete the default security group + if security_group.name != 'default': + security_group_manager.delete_security_group(security_group.name) # destroy instance self.driver.shell.db.instance_destroy(instance.instance_id) return 1 -- 2.43.0