Rename share group snapshot 'members' method
This conflicts with a similarly named attribute on the resource. Some doc issues are also addressed. Change-Id: I63db4f45d6e088e660833093a4a586cbcbdb94ff Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
d264526ed1
commit
bbc378ec18
@ -1,13 +1,13 @@
|
|||||||
openstack.shared_file_system.v2.share_group_snapshot
|
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
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
The ``ShareGroupSnapshot`` class inherits from
|
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:
|
:members:
|
||||||
|
@ -860,12 +860,13 @@ class Proxy(proxy.Proxy):
|
|||||||
:param group_snapshot_id: The ID of the group snapshot to get
|
:param group_snapshot_id: The ID of the group snapshot to get
|
||||||
:returns: List of the share group snapshot members, which are
|
:returns: List of the share group snapshot members, which are
|
||||||
share snapshots.
|
share snapshots.
|
||||||
:rtype: :dict: Attributes of the share snapshots.
|
:rtype: dict containing attributes of the share snapshot members.
|
||||||
"""
|
"""
|
||||||
res = self._get(
|
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
|
return response
|
||||||
|
|
||||||
def get_share_group_snapshot(self, group_snapshot_id):
|
def get_share_group_snapshot(self, group_snapshot_id):
|
||||||
|
@ -76,7 +76,7 @@ class ShareGroupSnapshot(resource.Resource):
|
|||||||
body = {"reset_status": {"status": status}}
|
body = {"reset_status": {"status": status}}
|
||||||
self._action(session, body)
|
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')
|
url = utils.urljoin(self.base_path, self.id, 'members')
|
||||||
microversion = microversion or self._get_microversion(
|
microversion = microversion or self._get_microversion(
|
||||||
session, action='list'
|
session, action='list'
|
||||||
|
@ -96,9 +96,11 @@ class TestShareGroupSnapshotActions(TestShareGroupSnapshot):
|
|||||||
|
|
||||||
def test_get_members(self):
|
def test_get_members(self):
|
||||||
sot = share_group_snapshot.ShareGroupSnapshot(**EXAMPLE)
|
sot = share_group_snapshot.ShareGroupSnapshot(**EXAMPLE)
|
||||||
sot.members(self.sess)
|
sot.get_members(self.sess)
|
||||||
url = f'share-group-snapshots/{IDENTIFIER}/members'
|
url = f'share-group-snapshots/{IDENTIFIER}/members'
|
||||||
headers = {'Accept': ''}
|
headers = {'Accept': ''}
|
||||||
self.sess.get.assert_called_with(
|
self.sess.get.assert_called_with(
|
||||||
url, headers=headers, microversion=self.sess.default_microversion
|
url,
|
||||||
|
headers=headers,
|
||||||
|
microversion=self.sess.default_microversion,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user