Merge "identity: Use previous naming for 'service show' fields"
This commit is contained in:
commit
0d570cd66a
@ -37,11 +37,11 @@ def _format_service(service):
|
|||||||
'description',
|
'description',
|
||||||
)
|
)
|
||||||
column_headers = (
|
column_headers = (
|
||||||
'ID',
|
'id',
|
||||||
'Name',
|
'name',
|
||||||
'Type',
|
'type',
|
||||||
'Enabled',
|
'enabled',
|
||||||
'Description',
|
'description',
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -48,7 +48,7 @@ class IdentityTests(base.TestCase):
|
|||||||
'parent_id',
|
'parent_id',
|
||||||
]
|
]
|
||||||
ROLE_FIELDS = ['id', 'name', 'domain_id', 'description']
|
ROLE_FIELDS = ['id', 'name', 'domain_id', 'description']
|
||||||
SERVICE_FIELDS = ['ID', 'Enabled', 'Name', 'Type', 'Description']
|
SERVICE_FIELDS = ['id', 'enabled', 'name', 'type', 'description']
|
||||||
REGION_FIELDS = ['description', 'enabled', 'parent_region', 'region']
|
REGION_FIELDS = ['description', 'enabled', 'parent_region', 'region']
|
||||||
ENDPOINT_FIELDS = [
|
ENDPOINT_FIELDS = [
|
||||||
'id',
|
'id',
|
||||||
@ -376,7 +376,7 @@ class IdentityTests(base.TestCase):
|
|||||||
if add_clean_up:
|
if add_clean_up:
|
||||||
service = self.parse_show_as_object(raw_output)
|
service = self.parse_show_as_object(raw_output)
|
||||||
self.addCleanup(
|
self.addCleanup(
|
||||||
self.openstack, 'service delete %s' % service['ID']
|
self.openstack, 'service delete %s' % service['id']
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.SERVICE_FIELDS)
|
self.assert_show_fields(items, self.SERVICE_FIELDS)
|
||||||
|
@ -32,7 +32,7 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
|
|
||||||
raw_output = self.openstack('service show %s' % service_id)
|
raw_output = self.openstack('service show %s' % service_id)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
service_name = self._extract_value_from_items('Name', items)
|
service_name = self._extract_value_from_items('name', items)
|
||||||
|
|
||||||
project_name = self._create_dummy_project()
|
project_name = self._create_dummy_project()
|
||||||
raw_output = self.openstack('project show %s' % project_name)
|
raw_output = self.openstack('project show %s' % project_name)
|
||||||
@ -73,7 +73,7 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
|
|
||||||
raw_output = self.openstack('service show %s' % service_id)
|
raw_output = self.openstack('service show %s' % service_id)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
service_name = self._extract_value_from_items('Name', items)
|
service_name = self._extract_value_from_items('name', items)
|
||||||
|
|
||||||
project_name = self._create_dummy_project()
|
project_name = self._create_dummy_project()
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
'service show' ' %(service_name)s' % {'service_name': service_name}
|
'service show' ' %(service_name)s' % {'service_name': service_name}
|
||||||
)
|
)
|
||||||
service_items = self.parse_show(raw_output)
|
service_items = self.parse_show(raw_output)
|
||||||
service_id = self._extract_value_from_items('ID', service_items)
|
service_id = self._extract_value_from_items('id', service_items)
|
||||||
|
|
||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit create'
|
'registered limit create'
|
||||||
|
@ -61,9 +61,9 @@ class ServiceTests(common.IdentityTests):
|
|||||||
raw_output = self.openstack('service show %s' % new_service_name)
|
raw_output = self.openstack('service show %s' % new_service_name)
|
||||||
# assert service details
|
# assert service details
|
||||||
service = self.parse_show_as_object(raw_output)
|
service = self.parse_show_as_object(raw_output)
|
||||||
self.assertEqual(new_service_type, service['Type'])
|
self.assertEqual(new_service_type, service['type'])
|
||||||
self.assertEqual(new_service_name, service['Name'])
|
self.assertEqual(new_service_name, service['name'])
|
||||||
self.assertEqual(new_service_description, service['Description'])
|
self.assertEqual(new_service_description, service['description'])
|
||||||
|
|
||||||
def test_service_show(self):
|
def test_service_show(self):
|
||||||
service_name = self._create_dummy_service()
|
service_name = self._create_dummy_service()
|
||||||
|
@ -24,11 +24,11 @@ from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|||||||
|
|
||||||
class TestServiceCreate(identity_fakes.TestIdentityv3):
|
class TestServiceCreate(identity_fakes.TestIdentityv3):
|
||||||
columns = (
|
columns = (
|
||||||
'ID',
|
'id',
|
||||||
'Name',
|
'name',
|
||||||
'Type',
|
'type',
|
||||||
'Enabled',
|
'enabled',
|
||||||
'Description',
|
'description',
|
||||||
)
|
)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -455,7 +455,7 @@ class TestServiceShow(identity_fakes.TestIdentityv3):
|
|||||||
self.service.name, ignore_missing=False
|
self.service.name, ignore_missing=False
|
||||||
)
|
)
|
||||||
|
|
||||||
collist = ('ID', 'Name', 'Type', 'Enabled', 'Description')
|
collist = ('id', 'name', 'type', 'enabled', 'description')
|
||||||
self.assertEqual(collist, columns)
|
self.assertEqual(collist, columns)
|
||||||
datalist = (
|
datalist = (
|
||||||
self.service.id,
|
self.service.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user