Reindentation of the docstrings

Change-Id: Ic94fdc59594449583bc699480b19f9697f2ddfe3
This commit is contained in:
Thomas Bucaioni 2021-10-18 10:42:27 +02:00 committed by Artem Goncharov
parent 7f87d2eee4
commit 388a463a47

View File

@ -30,7 +30,7 @@ class Proxy(proxy.Proxy):
"""Return a generator of notifications. """Return a generator of notifications.
:param kwargs query: Optional query parameters to be sent to :param kwargs query: Optional query parameters to be sent to
limit the notifications being returned. limit the notifications being returned.
:returns: A generator of notifications :returns: A generator of notifications
""" """
return self._list(_notification.Notification, **query) return self._list(_notification.Notification, **query)
@ -39,13 +39,12 @@ class Proxy(proxy.Proxy):
"""Get a single notification. """Get a single notification.
:param notification: The value can be the ID of a notification or a :param notification: The value can be the ID of a notification or a
:class: :class: `~masakariclient.sdk.ha.v1.notification.Notification`
`~masakariclient.sdk.ha.v1 instance.
.notification.Notification` instance. :returns: One
:returns: One :class:`~masakariclient.sdk.ha.v1 :class:`~masakariclient.sdk.ha.v1.notification.Notification`
.notification.Notification`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.ResourceNotFound`
when no resource can be found. when no resource can be found.
""" """
return self._get(_notification.Notification, notification) return self._get(_notification.Notification, notification)
@ -53,14 +52,10 @@ class Proxy(proxy.Proxy):
"""Create a new notification. """Create a new notification.
:param dict attrs: Keyword arguments which will be used to create :param dict attrs: Keyword arguments which will be used to create
a :class: a :class:`masakariclient.sdk.ha.v1.notification.Notification`,
`masakariclient.sdk.ha.v1 comprised of the propoerties on the Notification class.
.notification.Notification`,
comprised of the propoerties on the Notification
class.
:returns: The result of notification creation :returns: The result of notification creation
:rtype: :class: `masakariclient.sdk.ha.v1 :rtype: :class: `masakariclient.sdk.ha.v1.notification.Notification`
.notification.Notification`
""" """
return self._create(_notification.Notification, **attrs) return self._create(_notification.Notification, **attrs)
@ -68,7 +63,7 @@ class Proxy(proxy.Proxy):
"""Return a generator of segments. """Return a generator of segments.
:param kwargs query: Optional query parameters to be sent to :param kwargs query: Optional query parameters to be sent to
limit the segments being returned. limit the segments being returned.
:returns: A generator of segments :returns: A generator of segments
""" """
return self._list(_segment.Segment, **query) return self._list(_segment.Segment, **query)
@ -77,11 +72,10 @@ class Proxy(proxy.Proxy):
"""Get a single segment. """Get a single segment.
:param segment: The value can be the ID of a segment or a :param segment: The value can be the ID of a segment or a
:class: :class: `~masakariclient.sdk.ha.v1.segment.Segment` instance.
`~masakariclient.sdk.ha.v1.segment.Segment` instance.
:returns: One :class:`~masakariclient.sdk.ha.v1.segment.Segment` :returns: One :class:`~masakariclient.sdk.ha.v1.segment.Segment`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.ResourceNotFound`
when no resource can be found. when no resource can be found.
""" """
return self._get(_segment.Segment, segment) return self._get(_segment.Segment, segment)
@ -89,9 +83,8 @@ class Proxy(proxy.Proxy):
"""Create a new segment. """Create a new segment.
:param dict attrs: Keyword arguments which will be used to create :param dict attrs: Keyword arguments which will be used to create
a :class: a :class: `masakariclient.sdk.ha.v1.segment.Segment`,
`masakariclient.sdk.ha.v1.segment.Segment`, comprised of the propoerties on the Segment class.
comprised of the propoerties on the Segment class.
:returns: The result of segment creation :returns: The result of segment creation
:rtype: :class: `masakariclient.sdk.ha.v1.segment.Segment` :rtype: :class: `masakariclient.sdk.ha.v1.segment.Segment`
""" """
@ -101,12 +94,10 @@ class Proxy(proxy.Proxy):
"""Update a segment. """Update a segment.
:param segment: The value can be the ID of a segment or a :param segment: The value can be the ID of a segment or a
:class: :class: `~masakariclient.sdk.ha.v1.segment.Segment` instance.
`~masakariclient.sdk.ha.v1.segment.Segment` instance.
:param dict attrs: Keyword arguments which will be used to update :param dict attrs: Keyword arguments which will be used to update
a :class: a :class: `masakariclient.sdk.ha.v1.segment.Segment`,
`masakariclient.sdk.ha.v1.segment.Segment`, comprised of the propoerties on the Segment class.
comprised of the propoerties on the Segment class.
:returns: The updated segment. :returns: The updated segment.
:rtype: :class: `masakariclient.sdk.ha.v1.segment.Segment` :rtype: :class: `masakariclient.sdk.ha.v1.segment.Segment`
""" """
@ -119,10 +110,10 @@ class Proxy(proxy.Proxy):
The value can be either the ID of a segment or a The value can be either the ID of a segment or a
:class:`~masakariclient.sdk.ha.v1.segment.Segment` instance. :class:`~masakariclient.sdk.ha.v1.segment.Segment` instance.
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be :class:`~openstack.exceptions.ResourceNotFound` will be
raised when the segment does not exist. raised when the segment does not exist.
When set to ``True``, no exception will be set when When set to ``True``, no exception will be set when
attempting to delete a nonexistent segment. attempting to delete a nonexistent segment.
:returns: ``None`` :returns: ``None``
""" """
return self._delete(_segment.Segment, segment, return self._delete(_segment.Segment, segment,
@ -133,7 +124,7 @@ class Proxy(proxy.Proxy):
:param segment_id: The ID of a failover segment. :param segment_id: The ID of a failover segment.
:param kwargs query: Optional query parameters to be sent to :param kwargs query: Optional query parameters to be sent to
limit the hosts being returned. limit the hosts being returned.
:returns: A generator of hosts :returns: A generator of hosts
""" """
@ -144,8 +135,8 @@ class Proxy(proxy.Proxy):
:param segment_id: The ID of a failover segment. :param segment_id: The ID of a failover segment.
:param dict attrs: Keyword arguments which will be used to create :param dict attrs: Keyword arguments which will be used to create
a :class: `masakariclient.sdk.ha.v1.host.Host`, a :class: `masakariclient.sdk.ha.v1.host.Host`,
comprised of the propoerties on the Host class. comprised of the propoerties on the Host class.
:returns: The results of host creation :returns: The results of host creation
""" """
@ -156,13 +147,13 @@ class Proxy(proxy.Proxy):
:param segment_id: The ID of a failover segment. :param segment_id: The ID of a failover segment.
:param host: The value can be the ID of a host or a :class: :param host: The value can be the ID of a host or a :class:
`~masakariclient.sdk.ha.v1.host.Host` instance. `~masakariclient.sdk.ha.v1.host.Host` instance.
:returns: One :class:`~masakariclient.sdk.ha.v1.host.Host` :returns: One :class:`~masakariclient.sdk.ha.v1.host.Host`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.ResourceNotFound`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.InvalidRequest` :raises: :class:`~openstack.exceptions.InvalidRequest`
when segment_id is None. when segment_id is None.
""" """
if segment_id is None: if segment_id is None:
raise exceptions.InvalidRequest("'segment_id' must be specified.") raise exceptions.InvalidRequest("'segment_id' must be specified.")
@ -175,14 +166,14 @@ class Proxy(proxy.Proxy):
:param segment_id: The ID of a failover segment. :param segment_id: The ID of a failover segment.
:param host: The value can be the ID of a host or a :class: :param host: The value can be the ID of a host or a :class:
`~masakariclient.sdk.ha.v1.host.Host` instance. `~masakariclient.sdk.ha.v1.host.Host` instance.
:param dict attrs: The attributes to update on the host represented. :param dict attrs: The attributes to update on the host represented.
:returns: The updated host :returns: The updated host
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.ResourceNotFound`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.InvalidRequest` :raises: :class:`~openstack.exceptions.InvalidRequest`
when segment_id is None. when segment_id is None.
""" """
host_id = resource.Resource._get_id(host) host_id = resource.Resource._get_id(host)
return self._update(_host.Host, host_id, segment_id=segment_id, return self._update(_host.Host, host_id, segment_id=segment_id,
@ -193,18 +184,18 @@ class Proxy(proxy.Proxy):
:param segment_id: The ID of a failover segment. :param segment_id: The ID of a failover segment.
:param host: The value can be the ID of a host or a :class: :param host: The value can be the ID of a host or a :class:
`~masakariclient.sdk.ha.v1.host.Host` instance. `~masakariclient.sdk.ha.v1.host.Host` instance.
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be :class:`~openstack.exceptions.ResourceNotFound` will be
raised when the host does not exist. raised when the host does not exist.
When set to ``True``, no exception will be set when When set to ``True``, no exception will be set when
attempting to delete a nonexistent host. attempting to delete a nonexistent host.
:returns: ``None`` :returns: ``None``
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.ResourceNotFound`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.InvalidRequest` :raises: :class:`~openstack.exceptions.InvalidRequest`
when segment_id is None. when segment_id is None.
""" """
if segment_id is None: if segment_id is None: