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',
|
||||
)
|
||||
column_headers = (
|
||||
'ID',
|
||||
'Name',
|
||||
'Type',
|
||||
'Enabled',
|
||||
'Description',
|
||||
'id',
|
||||
'name',
|
||||
'type',
|
||||
'enabled',
|
||||
'description',
|
||||
)
|
||||
|
||||
return (
|
||||
|
@ -48,7 +48,7 @@ class IdentityTests(base.TestCase):
|
||||
'parent_id',
|
||||
]
|
||||
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']
|
||||
ENDPOINT_FIELDS = [
|
||||
'id',
|
||||
@ -376,7 +376,7 @@ class IdentityTests(base.TestCase):
|
||||
if add_clean_up:
|
||||
service = self.parse_show_as_object(raw_output)
|
||||
self.addCleanup(
|
||||
self.openstack, 'service delete %s' % service['ID']
|
||||
self.openstack, 'service delete %s' % service['id']
|
||||
)
|
||||
items = self.parse_show(raw_output)
|
||||
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)
|
||||
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()
|
||||
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)
|
||||
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()
|
||||
|
||||
|
@ -29,7 +29,7 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
||||
'service show' ' %(service_name)s' % {'service_name': service_name}
|
||||
)
|
||||
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(
|
||||
'registered limit create'
|
||||
|
@ -61,9 +61,9 @@ class ServiceTests(common.IdentityTests):
|
||||
raw_output = self.openstack('service show %s' % new_service_name)
|
||||
# assert service details
|
||||
service = self.parse_show_as_object(raw_output)
|
||||
self.assertEqual(new_service_type, service['Type'])
|
||||
self.assertEqual(new_service_name, service['Name'])
|
||||
self.assertEqual(new_service_description, service['Description'])
|
||||
self.assertEqual(new_service_type, service['type'])
|
||||
self.assertEqual(new_service_name, service['name'])
|
||||
self.assertEqual(new_service_description, service['description'])
|
||||
|
||||
def test_service_show(self):
|
||||
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):
|
||||
columns = (
|
||||
'ID',
|
||||
'Name',
|
||||
'Type',
|
||||
'Enabled',
|
||||
'Description',
|
||||
'id',
|
||||
'name',
|
||||
'type',
|
||||
'enabled',
|
||||
'description',
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
@ -455,7 +455,7 @@ class TestServiceShow(identity_fakes.TestIdentityv3):
|
||||
self.service.name, ignore_missing=False
|
||||
)
|
||||
|
||||
collist = ('ID', 'Name', 'Type', 'Enabled', 'Description')
|
||||
collist = ('id', 'name', 'type', 'enabled', 'description')
|
||||
self.assertEqual(collist, columns)
|
||||
datalist = (
|
||||
self.service.id,
|
||||
|
Loading…
Reference in New Issue
Block a user