Merge "Stop using v2 identity API"
This commit is contained in:
commit
03c3f7e707
@ -43,25 +43,22 @@ class FloatingIPAdminTestJSON(base.BaseAdminNetworkTest):
|
|||||||
|
|
||||||
@decorators.attr(type='negative')
|
@decorators.attr(type='negative')
|
||||||
@decorators.idempotent_id('11116ee9-4e99-5b15-b8e1-aa7df92ca589')
|
@decorators.idempotent_id('11116ee9-4e99-5b15-b8e1-aa7df92ca589')
|
||||||
def test_associate_floating_ip_with_port_from_another_tenant(self):
|
def test_associate_floating_ip_with_port_from_another_project(self):
|
||||||
if not CONF.identity_feature_enabled.api_v2_admin:
|
body = self.client.create_floatingip(
|
||||||
# TODO(ihrachys) adopt to v3
|
|
||||||
raise self.skipException('Identity v2 admin not available')
|
|
||||||
body = self.admin_client.create_floatingip(
|
|
||||||
floating_network_id=self.ext_net_id)
|
floating_network_id=self.ext_net_id)
|
||||||
floating_ip = body['floatingip']
|
floating_ip = body['floatingip']
|
||||||
test_tenant = data_utils.rand_name('test_tenant_')
|
test_project = data_utils.rand_name('test_project_')
|
||||||
test_description = data_utils.rand_name('desc_')
|
test_description = data_utils.rand_name('desc_')
|
||||||
tenant = self.identity_admin_client.create_tenant(
|
project = self.identity_admin_client.create_project(
|
||||||
name=test_tenant, description=test_description)['tenant']
|
name=test_project, description=test_description)['project']
|
||||||
tenant_id = tenant['id']
|
project_id = project['id']
|
||||||
self.addCleanup(self.identity_admin_client.delete_tenant, tenant_id)
|
self.addCleanup(self.identity_admin_client.delete_project, project_id)
|
||||||
|
|
||||||
port = self.admin_client.create_port(network_id=self.network['id'],
|
port = self.admin_client.create_port(network_id=self.network['id'],
|
||||||
tenant_id=tenant_id)
|
project_id=project_id)
|
||||||
self.addCleanup(self.admin_client.delete_port, port['port']['id'])
|
self.addCleanup(self.admin_client.delete_port, port['port']['id'])
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.admin_client.update_floatingip,
|
self.client.update_floatingip,
|
||||||
floating_ip['id'], port_id=port['port']['id'])
|
floating_ip['id'], port_id=port['port']['id'])
|
||||||
|
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
|
@ -37,11 +37,11 @@ class QuotasTestBase(base.BaseAdminNetworkTest):
|
|||||||
# Add a tenant to conduct the test
|
# Add a tenant to conduct the test
|
||||||
test_tenant = data_utils.rand_name('test_tenant_')
|
test_tenant = data_utils.rand_name('test_tenant_')
|
||||||
test_description = data_utils.rand_name('desc_')
|
test_description = data_utils.rand_name('desc_')
|
||||||
project = self.identity_admin_clientv3.create_project(
|
project = self.identity_admin_client.create_project(
|
||||||
name=test_tenant,
|
name=test_tenant,
|
||||||
description=test_description)['project']
|
description=test_description)['project']
|
||||||
self.addCleanup(
|
self.addCleanup(
|
||||||
self.identity_admin_clientv3.delete_project, project['id'])
|
self.identity_admin_client.delete_project, project['id'])
|
||||||
return project
|
return project
|
||||||
|
|
||||||
def _setup_quotas(self, project_id, **new_quotas):
|
def _setup_quotas(self, project_id, **new_quotas):
|
||||||
|
@ -430,8 +430,7 @@ class BaseAdminNetworkTest(BaseNetworkTest):
|
|||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
super(BaseAdminNetworkTest, cls).setup_clients()
|
super(BaseAdminNetworkTest, cls).setup_clients()
|
||||||
cls.admin_client = cls.os_admin.network_client
|
cls.admin_client = cls.os_admin.network_client
|
||||||
cls.identity_admin_client = cls.os_admin.tenants_client
|
cls.identity_admin_client = cls.os_admin.projects_client
|
||||||
cls.identity_admin_clientv3 = cls.os_admin.projects_client
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create_metering_label(cls, name, description):
|
def create_metering_label(cls, name, description):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user