Move neutron_available option to service_available
This commit moves the neutron_available config option from the
network group to under the service_available group. The option
is also renamed to neutron.
Change-Id: I5ee9ec816845de483fe88d76d1bb047e7bb1af7e
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index ed98473..54cea5b 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -209,8 +209,6 @@
# for each tenant to have their own router.
public_router_id = {$PUBLIC_ROUTER_ID}
-# Whether or not neutron is expected to be available
-neutron_available = false
[volume]
# This section contains the configuration options used when executing tests
@@ -352,3 +350,5 @@
[service_available]
# Whether or not cinder is expected to be available
cinder = True
+# Whether or not neutron is expected to be available
+neutron = false
diff --git a/tempest/api/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
index 2eaf3b0..8b96370 100644
--- a/tempest/api/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -56,7 +56,7 @@
CONF = config.TempestConfig()
- @testtools.skipIf(CONF.network.neutron_available, "This feature is not" +
+ @testtools.skipIf(CONF.service_available.neutron, "This feature is not" +
"implemented by Neutron. See bug: #1194569")
@attr(type='gate')
def test_list_fixed_ip_details(self):
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index e105121..ab100a3 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -158,7 +158,7 @@
self.client.create_security_group, s_name,
s_description)
- @testtools.skipIf(config.TempestConfig().network.neutron_available,
+ @testtools.skipIf(config.TempestConfig().service_available.neutron,
"Neutron allows duplicate names for security groups")
@attr(type=['negative', 'gate'])
def test_security_group_create_with_duplicate_name(self):
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index de095c5..9f66a6c 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -24,7 +24,7 @@
@classmethod
def setUpClass(cls):
- if not cls.config.network.neutron_available:
+ if not cls.config.service_available.neutron:
raise cls.skipException("Neutron is required")
super(AttachInterfacesTestJSON, cls).setUpClass()
cls.client = cls.os.interfaces_client
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index 35f0fc0..2a5be8c 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -37,7 +37,7 @@
resp, server = cls.create_server(wait_until='ACTIVE')
cls.server_id = server['id']
- @testtools.skipIf(CONF.network.neutron_available, "This feature is not " +
+ @testtools.skipIf(CONF.service_available.neutron, "This feature is not " +
"implemented by Neutron. See bug: #1183436")
@attr(type='gate')
def test_list_virtual_interfaces(self):
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 3b7f9dd..142ad7d 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -44,7 +44,7 @@
def setUpClass(cls):
os = clients.Manager()
cls.network_cfg = os.config.network
- if not cls.network_cfg.neutron_available:
+ if not cls.config.service_available.neutron:
raise cls.skipException("Neutron support is required")
cls.client = os.network_client
cls.networks = []
diff --git a/tempest/cli/simple_read_only/test_compute.py b/tempest/cli/simple_read_only/test_compute.py
index af91968..5dadbeb 100644
--- a/tempest/cli/simple_read_only/test_compute.py
+++ b/tempest/cli/simple_read_only/test_compute.py
@@ -22,7 +22,6 @@
import tempest.cli
from tempest.common import log as logging
-from tempest import config
CONF = cfg.CONF
@@ -69,7 +68,7 @@
def test_admin_credentials(self):
self.nova('credentials')
- @testtools.skipIf(config.TempestConfig().network.neutron_available,
+ @testtools.skipIf(CONF.service_available.neutron,
"Neutron does not provide this feature")
def test_admin_dns_domains(self):
self.nova('dns-domains')
diff --git a/tempest/config.py b/tempest/config.py
index d0dcc41..427ec71 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -302,9 +302,6 @@
default="",
help="Id of the public router that provides external "
"connectivity"),
- cfg.BoolOpt('neutron_available',
- default=False,
- help="Whether or not neutron is expected to be available"),
]
@@ -545,6 +542,9 @@
cfg.BoolOpt('cinder',
default=True,
help="Whether or not cinder is expected to be available"),
+ cfg.BoolOpt('neutron',
+ default=False,
+ help="Whether or not neutron is expected to be available"),
]
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index f968411..fcd5d0e 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -223,7 +223,7 @@
@classmethod
def check_preconditions(cls):
- if (cls.config.network.neutron_available):
+ if (cls.config.service_available.neutron):
cls.enabled = True
#verify that neutron_available is telling the truth
try: