summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-09-19 00:25:35 +0000
committerGerrit Code Review <review@openstack.org>2012-09-19 00:25:35 +0000
commit5a349b82fc62c5bde0f93a25df8acfe9474bd3fd (patch)
tree723cd647f4ca9554c7ec05be052e33781be2a9c8 /nova/compute
parentab03a6c7fcee9afa3b53991811d0345933422287 (diff)
parent5d46d3fb74452a7a1c8ddd8d1a8b643712a0f801 (diff)
Merge "make ensure_default_security_group() call sgh"
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 0b82d0ed5..13d663194 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -136,6 +136,7 @@ class API(base.Base):
self.network_api = network_api or network.API()
self.volume_api = volume_api or volume.API()
self.security_group_api = security_group_api or SecurityGroupAPI()
+ self.sgh = importutils.import_object(FLAGS.security_group_handler)
self.consoleauth_rpcapi = consoleauth_rpcapi.ConsoleAuthAPI()
self.scheduler_rpcapi = scheduler_rpcapi.SchedulerAPI()
self.compute_rpcapi = compute_rpcapi.ComputeAPI()
@@ -2232,7 +2233,9 @@ class SecurityGroupAPI(base.Base):
:param context: the security context
"""
- self.db.security_group_ensure_default(context)
+ existed, group = self.db.security_group_ensure_default(context)
+ if not existed:
+ self.sgh.trigger_security_group_create_refresh(context, group)
def create(self, context, name, description):
try: