Merge "Implement the DELETE method for get-me-a-network"
diff --git a/neutron/tests/tempest/api/clients.py b/neutron/tests/tempest/api/clients.py
index eb39882..c6f41d0 100644
--- a/neutron/tests/tempest/api/clients.py
+++ b/neutron/tests/tempest/api/clients.py
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from oslo_config import cfg
-
from tempest.lib.services.compute import keypairs_client
from tempest.lib.services.compute import servers_client
from tempest.lib.services.identity.v2 import tenants_client
@@ -30,22 +28,12 @@
"""
Top level manager for OpenStack tempest clients
"""
- try:
- default_params = {
- 'disable_ssl_certificate_validation':
- CONF.service_clients.disable_ssl_certificate_validation,
- 'ca_certs': CONF.service_clients.ca_certificates_file,
- 'trace_requests': CONF.debug.trace_requests
- }
- except cfg.NoSuchOptError:
- # TODO(armax): remove this except when a new tempest release
- # > 12.1.0 includes change 1afca56b05
- default_params = {
- 'disable_ssl_certificate_validation':
- CONF.identity.disable_ssl_certificate_validation,
- 'ca_certs': CONF.identity.ca_certificates_file,
- 'trace_requests': CONF.debug.trace_requests
- }
+ default_params = {
+ 'disable_ssl_certificate_validation':
+ CONF.identity.disable_ssl_certificate_validation,
+ 'ca_certs': CONF.identity.ca_certificates_file,
+ 'trace_requests': CONF.debug.trace_requests
+ }
# NOTE: Tempest uses timeout values of compute API if project specific
# timeout values don't exist.
diff --git a/neutron/tests/tempest/api/test_networks.py b/neutron/tests/tempest/api/test_networks.py
index 16fe81b..d3967ea 100644
--- a/neutron/tests/tempest/api/test_networks.py
+++ b/neutron/tests/tempest/api/test_networks.py
@@ -95,7 +95,7 @@
resource = 'network'
- list_kwargs = {'shared': False}
+ list_kwargs = {'shared': False, 'router:external': False}
@classmethod
def resource_setup(cls):
diff --git a/neutron/tests/tempest/api/test_qos.py b/neutron/tests/tempest/api/test_qos.py
index 313715d..bece71c 100644
--- a/neutron/tests/tempest/api/test_qos.py
+++ b/neutron/tests/tempest/api/test_qos.py
@@ -75,6 +75,28 @@
self.assertTrue(retrieved_policy['shared'])
self.assertEqual([], retrieved_policy['rules'])
+ @test.idempotent_id('6e880e0f-bbfc-4e54-87c6-680f90e1b618')
+ def test_policy_update_forbidden_for_regular_tenants_own_policy(self):
+ policy = self.create_qos_policy(name='test-policy',
+ description='',
+ shared=False,
+ tenant_id=self.client.tenant_id)
+ self.assertRaises(
+ exceptions.Forbidden,
+ self.client.update_qos_policy,
+ policy['id'], description='test policy')
+
+ @test.idempotent_id('4ecfd7e7-47b6-4702-be38-be9235901a87')
+ def test_policy_update_forbidden_for_regular_tenants_foreign_policy(self):
+ policy = self.create_qos_policy(name='test-policy',
+ description='',
+ shared=False,
+ tenant_id=self.admin_client.tenant_id)
+ self.assertRaises(
+ exceptions.NotFound,
+ self.client.update_qos_policy,
+ policy['id'], description='test policy')
+
@test.idempotent_id('ee263db4-009a-4641-83e5-d0e83506ba4c')
def test_shared_policy_update(self):
policy = self.create_qos_policy(name='test-policy',
@@ -426,6 +448,34 @@
self.client.create_bandwidth_limit_rule,
'policy', 1, 2)
+ @test.idempotent_id('1bfc55d9-6fd8-4293-ab3a-b1d69bf7cd2e')
+ def test_rule_update_forbidden_for_regular_tenants_own_policy(self):
+ policy = self.create_qos_policy(name='test-policy',
+ description='test policy',
+ shared=False,
+ tenant_id=self.client.tenant_id)
+ rule = self.create_qos_bandwidth_limit_rule(policy_id=policy['id'],
+ max_kbps=1,
+ max_burst_kbps=1)
+ self.assertRaises(
+ exceptions.NotFound,
+ self.client.update_bandwidth_limit_rule,
+ policy['id'], rule['id'], max_kbps=2, max_burst_kbps=4)
+
+ @test.idempotent_id('9a607936-4b6f-4c2f-ad21-bd5b3d4fc91f')
+ def test_rule_update_forbidden_for_regular_tenants_foreign_policy(self):
+ policy = self.create_qos_policy(name='test-policy',
+ description='test policy',
+ shared=False,
+ tenant_id=self.admin_client.tenant_id)
+ rule = self.create_qos_bandwidth_limit_rule(policy_id=policy['id'],
+ max_kbps=1,
+ max_burst_kbps=1)
+ self.assertRaises(
+ exceptions.NotFound,
+ self.client.update_bandwidth_limit_rule,
+ policy['id'], rule['id'], max_kbps=2, max_burst_kbps=4)
+
@test.idempotent_id('ce0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
def test_get_rules_by_policy(self):
policy1 = self.create_qos_policy(name='test-policy1',