Merge "Explicitly specify namespace fields for output"

This commit is contained in:
Zuul
2024-01-26 17:37:11 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 15 deletions

View File

@@ -42,6 +42,7 @@ def _format_namespace(namespace):
'owner',
'protected',
'schema',
'updated_at',
'visibility',
]
@@ -130,8 +131,9 @@ class CreateMetadefNameSpace(command.ShowOne):
kwargs['visibility'] = parsed_args.visibility
data = image_client.create_metadef_namespace(**kwargs)
info = _format_namespace(data)
return zip(*sorted(data.items()))
return zip(*sorted(info.items()))
class DeleteMetadefNameSpace(command.Command):

View File

@@ -21,30 +21,16 @@ class TestMetadefNamespaceCreate(image_fakes.TestImagev2):
expected_columns = (
'created_at',
'description',
'display_name',
'id',
'is_protected',
'location',
'name',
'namespace',
'owner',
'resource_type_associations',
'updated_at',
'visibility',
)
expected_data = (
_metadef_namespace.created_at,
_metadef_namespace.description,
_metadef_namespace.display_name,
_metadef_namespace.id,
_metadef_namespace.is_protected,
_metadef_namespace.location,
_metadef_namespace.name,
_metadef_namespace.namespace,
_metadef_namespace.owner,
_metadef_namespace.resource_type_associations,
_metadef_namespace.updated_at,
_metadef_namespace.visibility,
)