Change the default value of description of type show

When exec CLI command: manila type-show {type_id}
Currently, although the description of share type API in the response
body, but it has been replaced by None(default) in manilaclient.

Closes-Bug:#1830677
Co-Authored-By: Brin Zhang <zhangbailin@inspur.com>

Change-Id: I35b60496788ed752d605b289d994f3407ebb8388
This commit is contained in:
haixin 2019-05-28 14:48:03 +08:00 committed by zhangbailin
parent 5b2dc5f806
commit 180ab3e0a2
3 changed files with 8 additions and 1 deletions

View File

@ -927,6 +927,7 @@ class FakeHTTPClient(fakes.FakeHTTPClient):
return (200, {}, {
'share_type': {'id': 1,
'name': 'test-type-1',
'description': "test share type desc",
'extra_specs': {'test': 'test'},
'required_extra_specs': {'test': 'test'}}})

View File

@ -170,7 +170,7 @@ def _print_type_show(stype, default_share_type=None):
'name': stype.name,
'visibility': _is_share_type_public(stype),
'is_default': is_default,
'description': None,
'description': stype.description,
'required_extra_specs': _print_type_required_extra_specs(stype),
'optional_extra_specs': _print_type_optional_extra_specs(stype),
}

View File

@ -0,0 +1,6 @@
---
fixes:
- |
`Launchpad bug 1830677 <https://bugs.launchpad.net/python-manilaclient/+bug/1830677>`_
has been fixed and the client now correctly get description of share type
instead of ``None``.