From 5231ade27c8a08e3d7fd5573d4dda6fa47d0ae67 Mon Sep 17 00:00:00 2001 From: Huanxuan Ao Date: Wed, 7 Sep 2016 16:23:45 +0800 Subject: [PATCH] Do not show "os-volume-type-access:is_public" property of volume type "os-volume-type-access:is_public" property is the same as "is_public" property in volume type object. So stop showing "os-volume-type-access:is_public" property and leave "is_public" property only. Change-Id: Ic78a9ee69b0ab356edff18cdb4c46fc24b495d2b Closes-Bug: #1620922 --- openstackclient/volume/v1/volume_type.py | 6 +++--- openstackclient/volume/v2/volume_type.py | 2 ++ releasenotes/notes/bug-1620922-7f27942dc00f7108.yaml | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/bug-1620922-7f27942dc00f7108.yaml diff --git a/openstackclient/volume/v1/volume_type.py b/openstackclient/volume/v1/volume_type.py index 3fe4fa05f1..625b34dc43 100644 --- a/openstackclient/volume/v1/volume_type.py +++ b/openstackclient/volume/v1/volume_type.py @@ -55,10 +55,9 @@ class CreateVolumeType(command.ShowOne): if parsed_args.property: result = volume_type.set_keys(parsed_args.property) volume_type._info.update({'properties': utils.format_dict(result)}) + volume_type._info.pop("os-volume-type-access:is_public", None) - info = {} - info.update(volume_type._info) - return zip(*sorted(six.iteritems(info))) + return zip(*sorted(six.iteritems(volume_type._info))) class DeleteVolumeType(command.Command): @@ -171,6 +170,7 @@ class ShowVolumeType(command.ShowOne): volume_client.volume_types, parsed_args.volume_type) properties = utils.format_dict(volume_type._info.pop('extra_specs')) volume_type._info.update({'properties': properties}) + volume_type._info.pop("os-volume-type-access:is_public", None) return zip(*sorted(six.iteritems(volume_type._info))) diff --git a/openstackclient/volume/v2/volume_type.py b/openstackclient/volume/v2/volume_type.py index e42fffe032..80a1f21b11 100644 --- a/openstackclient/volume/v2/volume_type.py +++ b/openstackclient/volume/v2/volume_type.py @@ -110,6 +110,7 @@ class CreateVolumeType(command.ShowOne): if parsed_args.property: result = volume_type.set_keys(parsed_args.property) volume_type._info.update({'properties': utils.format_dict(result)}) + volume_type._info.pop("os-volume-type-access:is_public", None) return zip(*sorted(six.iteritems(volume_type._info))) @@ -318,6 +319,7 @@ class ShowVolumeType(command.ShowOne): '%(type)s: %(e)s') LOG.error(msg % {'type': volume_type.id, 'e': e}) volume_type._info.update({'access_project_ids': access_project_ids}) + volume_type._info.pop("os-volume-type-access:is_public", None) return zip(*sorted(six.iteritems(volume_type._info))) diff --git a/releasenotes/notes/bug-1620922-7f27942dc00f7108.yaml b/releasenotes/notes/bug-1620922-7f27942dc00f7108.yaml new file mode 100644 index 0000000000..35a7f552ae --- /dev/null +++ b/releasenotes/notes/bug-1620922-7f27942dc00f7108.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Do not show ``os-volume-type-access:is_public`` property which is the + same as ``is_public`` property of volume type object. + [Bug `1620922 `_]