summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-18 18:52:06 +0000
committerGerrit Code Review <review@openstack.org>2012-12-18 18:52:06 +0000
commit0e4076ebbd0d25e5164c180e8983a36a6bdd9cb5 (patch)
treee918d522ade0db3d113a77e5cd5fd9f2f1947687
parent9f610d4fc8b0e3a0a8ac24d134269623838629ad (diff)
parentaef4f3c40a05a35759054059a44dda8a478da443 (diff)
downloadnova-0e4076ebbd0d25e5164c180e8983a36a6bdd9cb5.tar.gz
nova-0e4076ebbd0d25e5164c180e8983a36a6bdd9cb5.tar.xz
nova-0e4076ebbd0d25e5164c180e8983a36a6bdd9cb5.zip
Merge "Added conf support for security groups"
-rw-r--r--nova/compute/api.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 19f5a3a26..cc02e4a82 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -81,6 +81,9 @@ compute_opts = [
cfg.StrOpt('security_group_handler',
default='nova.network.sg.NullSecurityGroupHandler',
help='The full class name of the security group handler class'),
+ cfg.StrOpt('security_group_api',
+ default='nova.compute.api.SecurityGroupAPI',
+ help='The full class name of the security API class'),
]
@@ -165,7 +168,9 @@ 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.security_group_api = (security_group_api or
+ importutils.import_object(
+ CONF.security_group_api))
self.sgh = importutils.import_object(CONF.security_group_handler)
self.consoleauth_rpcapi = consoleauth_rpcapi.ConsoleAuthAPI()
self.scheduler_rpcapi = scheduler_rpcapi.SchedulerAPI()