From 0e731cd22fffbcaf77143bbc259027514e73597a Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 7 Aug 2024 17:00:23 +0100 Subject: [PATCH] identity: Use previous naming for 'application credential show' fields We changed these in change Iba3fee2672d32266623c6f367beaabe84bd3d24e but the '-c/--column' option provided by cliff currently requires an explicit match on column names. Change them back for now. We can revert this when cliff is a little bit cleverer. Change-Id: I6b4f1b793dc383856bfdf9a01514381be3cd2bf1 Signed-off-by: Stephen Finucane Related-bug: #2076212 --- .../identity/v3/application_credential.py | 34 +++++++++---------- .../v3/test_application_credential.py | 14 ++++---- .../v3/test_application_credential.py | 34 +++++++++---------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/openstackclient/identity/v3/application_credential.py b/openstackclient/identity/v3/application_credential.py index 035be2d212..7bc2b8a192 100644 --- a/openstackclient/identity/v3/application_credential.py +++ b/openstackclient/identity/v3/application_credential.py @@ -186,15 +186,15 @@ class CreateApplicationCredential(command.ShowOne): application_credential['roles'] = msg columns = ( - 'ID', - 'Name', - 'Description', - 'Project ID', - 'Roles', - 'Unrestricted', - 'Access Rules', - 'Expires At', - 'Secret', + 'id', + 'name', + 'description', + 'project_id', + 'roles', + 'unrestricted', + 'access_rules', + 'expires_at', + 'secret', ) return ( columns, @@ -337,14 +337,14 @@ class ShowApplicationCredential(command.ShowOne): app_cred['roles'] = msg columns = ( - 'ID', - 'Name', - 'Description', - 'Project ID', - 'Roles', - 'Unrestricted', - 'Access Rules', - 'Expires At', + 'id', + 'name', + 'description', + 'project_id', + 'roles', + 'unrestricted', + 'access_rules', + 'expires_at', ) return ( columns, diff --git a/openstackclient/tests/functional/identity/v3/test_application_credential.py b/openstackclient/tests/functional/identity/v3/test_application_credential.py index 9c8b0462ff..22f2b90bb4 100644 --- a/openstackclient/tests/functional/identity/v3/test_application_credential.py +++ b/openstackclient/tests/functional/identity/v3/test_application_credential.py @@ -21,13 +21,13 @@ from openstackclient.tests.functional.identity.v3 import common class ApplicationCredentialTests(common.IdentityTests): APPLICATION_CREDENTIAL_FIELDS = [ - 'ID', - 'Name', - 'Project ID', - 'Description', - 'Roles', - 'Expires At', - 'Unrestricted', + 'id', + 'name', + 'project_id', + 'description', + 'roles', + 'expires_at', + 'unrestricted', ] APPLICATION_CREDENTIAL_LIST_HEADERS = [ 'ID', diff --git a/openstackclient/tests/unit/identity/v3/test_application_credential.py b/openstackclient/tests/unit/identity/v3/test_application_credential.py index 277204dd45..94631d95a1 100644 --- a/openstackclient/tests/unit/identity/v3/test_application_credential.py +++ b/openstackclient/tests/unit/identity/v3/test_application_credential.py @@ -31,15 +31,15 @@ from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes class TestApplicationCredentialCreate(identity_fakes.TestIdentityv3): columns = ( - 'ID', - 'Name', - 'Description', - 'Project ID', - 'Roles', - 'Unrestricted', - 'Access Rules', - 'Expires At', - 'Secret', + 'id', + 'name', + 'description', + 'project_id', + 'roles', + 'unrestricted', + 'access_rules', + 'expires_at', + 'secret', ) def setUp(self): @@ -413,14 +413,14 @@ class TestApplicationCredentialShow(identity_fakes.TestIdentityv3): ) collist = ( - 'ID', - 'Name', - 'Description', - 'Project ID', - 'Roles', - 'Unrestricted', - 'Access Rules', - 'Expires At', + 'id', + 'name', + 'description', + 'project_id', + 'roles', + 'unrestricted', + 'access_rules', + 'expires_at', ) self.assertEqual(collist, columns) datalist = (