From 53da67c4190a1a14069173c3f795d7c05cb176f5 Mon Sep 17 00:00:00 2001 From: sriram ramakrishnan Date: Mon, 7 Jan 2019 20:37:34 -0500 Subject: [PATCH] Return is_default as a value instead of a function object Closes-Bug: #1802059 Change-Id: I4df0afdb9188043150fc505d55fd26a1bcb4654e --- manilaclient/tests/unit/v2/test_shell.py | 2 +- manilaclient/v2/shell.py | 2 +- .../notes/bug-1802059-fix-is_default-a8d3d95ffa0aede9.yaml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1802059-fix-is_default-a8d3d95ffa0aede9.yaml diff --git a/manilaclient/tests/unit/v2/test_shell.py b/manilaclient/tests/unit/v2/test_shell.py index c07f3a735..6f135fea8 100644 --- a/manilaclient/tests/unit/v2/test_shell.py +++ b/manilaclient/tests/unit/v2/test_shell.py @@ -2528,7 +2528,7 @@ class ShellTest(test_utils.TestCase): 'type1,type2 --is-public %s --group-specs ' 'spec1=value1' % six.text_type(public)) - self.assert_called('POST', '/share-group-types', body=expected) + self.assert_called_anytime('POST', '/share-group-types', body=expected) def test_share_group_type_delete(self): fake_share_group_type = type( diff --git a/manilaclient/v2/shell.py b/manilaclient/v2/shell.py index 660207492..9f3a1904f 100644 --- a/manilaclient/v2/shell.py +++ b/manilaclient/v2/shell.py @@ -4114,7 +4114,7 @@ def _print_share_group_type(share_group_type, default_share_type=None): 'ID': share_group_type.id, 'Name': share_group_type.name, 'Visibility': _is_share_type_public(share_group_type), - 'is_default': _is_default + 'is_default': _is_default(share_group_type) } cliutils.print_dict(share_group_type_dict) diff --git a/releasenotes/notes/bug-1802059-fix-is_default-a8d3d95ffa0aede9.yaml b/releasenotes/notes/bug-1802059-fix-is_default-a8d3d95ffa0aede9.yaml new file mode 100644 index 000000000..c67e8021a --- /dev/null +++ b/releasenotes/notes/bug-1802059-fix-is_default-a8d3d95ffa0aede9.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - Fix share_group_type_create returning is_default as a function object instead of value