diff --git a/openstackclient/image/v2/metadef_namespaces.py b/openstackclient/image/v2/metadef_namespaces.py index eaaae6747..cc0277c54 100644 --- a/openstackclient/image/v2/metadef_namespaces.py +++ b/openstackclient/image/v2/metadef_namespaces.py @@ -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): diff --git a/openstackclient/tests/unit/image/v2/test_metadef_namespaces.py b/openstackclient/tests/unit/image/v2/test_metadef_namespaces.py index 9e629c3c1..0b0ddbe0b 100644 --- a/openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +++ b/openstackclient/tests/unit/image/v2/test_metadef_namespaces.py @@ -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, )