diff --git a/doc/source/user/resources/shared_file_system/v2/share_group_snapshot.rst b/doc/source/user/resources/shared_file_system/v2/share_group_snapshot.rst index 54fb704e9..40972ad93 100644 --- a/doc/source/user/resources/shared_file_system/v2/share_group_snapshot.rst +++ b/doc/source/user/resources/shared_file_system/v2/share_group_snapshot.rst @@ -1,13 +1,13 @@ openstack.shared_file_system.v2.share_group_snapshot ==================================================== -.. automodule: : openstack.shared_file_system.v2.share_group_snapshot +.. automodule:: openstack.shared_file_system.v2.share_group_snapshot The ShareGroupSnapshot Class ---------------------------- The ``ShareGroupSnapshot`` class inherits from -: class: `~openstack.resource.Resource`. +:class:`~openstack.resource.Resource`. -.. autoclass: : openstack.shared_file_system.v2.ShareGroupSnapshot +.. autoclass:: openstack.shared_file_system.v2.share_group_snapshot.ShareGroupSnapshot :members: diff --git a/openstack/shared_file_system/v2/_proxy.py b/openstack/shared_file_system/v2/_proxy.py index 4392c798f..4f8f93abd 100644 --- a/openstack/shared_file_system/v2/_proxy.py +++ b/openstack/shared_file_system/v2/_proxy.py @@ -860,12 +860,13 @@ class Proxy(proxy.Proxy): :param group_snapshot_id: The ID of the group snapshot to get :returns: List of the share group snapshot members, which are share snapshots. - :rtype: :dict: Attributes of the share snapshots. + :rtype: dict containing attributes of the share snapshot members. """ res = self._get( - _share_group_snapshot.ShareGroupSnapshot, group_snapshot_id + _share_group_snapshot.ShareGroupSnapshot, + group_snapshot_id, ) - response = res.members(self) + response = res.get_members(self) return response def get_share_group_snapshot(self, group_snapshot_id): diff --git a/openstack/shared_file_system/v2/share_group_snapshot.py b/openstack/shared_file_system/v2/share_group_snapshot.py index 366a52275..85b86ab95 100644 --- a/openstack/shared_file_system/v2/share_group_snapshot.py +++ b/openstack/shared_file_system/v2/share_group_snapshot.py @@ -76,7 +76,7 @@ class ShareGroupSnapshot(resource.Resource): body = {"reset_status": {"status": status}} self._action(session, body) - def members(self, session, microversion=None): + def get_members(self, session, microversion=None): url = utils.urljoin(self.base_path, self.id, 'members') microversion = microversion or self._get_microversion( session, action='list' diff --git a/openstack/tests/unit/shared_file_system/v2/test_share_group_snapshot.py b/openstack/tests/unit/shared_file_system/v2/test_share_group_snapshot.py index 65be62157..92880f57c 100644 --- a/openstack/tests/unit/shared_file_system/v2/test_share_group_snapshot.py +++ b/openstack/tests/unit/shared_file_system/v2/test_share_group_snapshot.py @@ -96,9 +96,11 @@ class TestShareGroupSnapshotActions(TestShareGroupSnapshot): def test_get_members(self): sot = share_group_snapshot.ShareGroupSnapshot(**EXAMPLE) - sot.members(self.sess) + sot.get_members(self.sess) url = f'share-group-snapshots/{IDENTIFIER}/members' headers = {'Accept': ''} self.sess.get.assert_called_with( - url, headers=headers, microversion=self.sess.default_microversion + url, + headers=headers, + microversion=self.sess.default_microversion, )