From dcb25e54e994568f955b7499e59dacecbee70fcb Mon Sep 17 00:00:00 2001 From: Victoria Martinez de la Cruz Date: Wed, 8 Dec 2021 17:41:04 +0000 Subject: [PATCH] Fix the id attr for share group type access repr The correct attribute name for the share group type access repr is share_group_type_id, not id. This patch set fixes that. Closes-Bug: #1953670 Change-Id: I651f3cc6429801db4c04813a60ddb4ec2871f2a1 --- manilaclient/tests/unit/v2/test_share_group_type_access.py | 3 ++- manilaclient/v2/share_group_type_access.py | 2 +- ...tr-for-share-group-type-access-repr-008338a53d7a6a50.yaml | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1953670-fix-id-attr-for-share-group-type-access-repr-008338a53d7a6a50.yaml diff --git a/manilaclient/tests/unit/v2/test_share_group_type_access.py b/manilaclient/tests/unit/v2/test_share_group_type_access.py index 51b47bebe..def93a109 100644 --- a/manilaclient/tests/unit/v2/test_share_group_type_access.py +++ b/manilaclient/tests/unit/v2/test_share_group_type_access.py @@ -31,7 +31,8 @@ class ShareGroupTypeAccessTest(utils.TestCase): super(ShareGroupTypeAccessTest, self).setUp() self.manager = type_access.ShareGroupTypeAccessManager( fake.FakeClient()) - fake_group_type_access_info = {'id': fake.ShareGroupTypeAccess.id} + fake_group_type_access_info = { + 'share_group_type_id': fake.ShareGroupTypeAccess.id} self.share_group_type_access = type_access.ShareGroupTypeAccess( self.manager, fake_group_type_access_info, loaded=True) diff --git a/manilaclient/v2/share_group_type_access.py b/manilaclient/v2/share_group_type_access.py index 1a8b7a8ca..fa8f11f15 100644 --- a/manilaclient/v2/share_group_type_access.py +++ b/manilaclient/v2/share_group_type_access.py @@ -26,7 +26,7 @@ SG_GRADUATION_VERSION = "2.55" class ShareGroupTypeAccess(common_base.Resource): def __repr__(self): - return "" % self.id + return "" % self.share_group_type_id class ShareGroupTypeAccessManager(base.ManagerWithFind): diff --git a/releasenotes/notes/bug-1953670-fix-id-attr-for-share-group-type-access-repr-008338a53d7a6a50.yaml b/releasenotes/notes/bug-1953670-fix-id-attr-for-share-group-type-access-repr-008338a53d7a6a50.yaml new file mode 100644 index 000000000..800d60213 --- /dev/null +++ b/releasenotes/notes/bug-1953670-fix-id-attr-for-share-group-type-access-repr-008338a53d7a6a50.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Launchpad `bug 1953670 `_ + has been fixed by updating the attribute name for the share group type access + repr to be share_group_type_id.