summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorAaron Rosen <arosen@nicira.com>2013-02-15 10:41:00 -0800
committerAaron Rosen <arosen@nicira.com>2013-02-20 11:27:01 -0800
commitd562012f34eadfe6b68dd5ebe06a2fa565de3b2e (patch)
tree77cc228f6ea5588219e7038d00507b6b3a9d1294 /nova/tests
parent51055262c2e354d3ad69f7ce6470a6b549881aad (diff)
Make nova security groups more pluggable
This patch moves the nova security group code out of nova/compute/api.py into nova/network/security_group. It also removes any query to the database from security group api into the nova security group driver. This allows security group drivers the ability to decouple themselves from storing security group information in the nova_db. Change-Id: Ib183515a0418203c8bcc88176e3a1498d7333300
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/compute/test_compute.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index 6eb5feb85..542a7e162 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -46,6 +46,7 @@ from nova import exception
from nova.image import glance
from nova.network import api as network_api
from nova.network import model as network_model
+from nova.network.security_group import openstack_driver
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
@@ -69,7 +70,6 @@ from nova import utils
from nova.virt import fake
from nova.volume import cinder
-
QUOTAS = quota.QUOTAS
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
@@ -3649,7 +3649,9 @@ class ComputeAPITestCase(BaseTestCase):
super(ComputeAPITestCase, self).setUp()
self.stubs.Set(network_api.API, 'get_instance_nw_info',
fake_get_nw_info)
- self.security_group_api = compute_api.SecurityGroupAPI()
+ self.security_group_api = (
+ openstack_driver.get_openstack_security_group_driver())
+
self.compute_api = compute.API(
security_group_api=self.security_group_api)
self.fake_image = {