Merge "exceptions: ResourceNotFound -> NotFoundException"
This commit is contained in:
commit
7febed2d42
@ -32,7 +32,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:param uuid: The value can be the UUID of a deployable.
|
||||
:returns: One :class:`~openstack.accelerator.v2.deployable.Deployable`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
deployable matching the criteria could be found.
|
||||
"""
|
||||
return self._get(_deployable.Deployable, uuid)
|
||||
@ -76,7 +76,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:param uuid: The value can be the UUID of a device.
|
||||
:returns: One :class:`~openstack.accelerator.v2.device.Device`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
device matching the criteria could be found.
|
||||
"""
|
||||
return self._get(_device.Device, uuid)
|
||||
@ -106,7 +106,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.accelerator.v2.device_profile.DeviceProfile`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the device profile does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent device profile.
|
||||
@ -124,7 +124,7 @@ class Proxy(proxy.Proxy):
|
||||
:param uuid: The value can be the UUID of a device profile.
|
||||
:returns: One :class:
|
||||
`~openstack.accelerator.v2.device_profile.DeviceProfile`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
device profile matching the criteria could be found.
|
||||
"""
|
||||
return self._get(_device_profile.DeviceProfile, uuid)
|
||||
@ -158,7 +158,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.accelerator.v2.device_profile.DeviceProfile`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised when
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised when
|
||||
the device profile does not exist.
|
||||
When set to ``True``, no exception will be set when attempting to
|
||||
delete a nonexistent accelerator request.
|
||||
@ -176,7 +176,7 @@ class Proxy(proxy.Proxy):
|
||||
:param uuid: The value can be the UUID of a accelerator request.
|
||||
:returns: One :class:
|
||||
`~openstack.accelerator.v2.accelerator_request.AcceleratorRequest`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
accelerator request matching the criteria could be found.
|
||||
"""
|
||||
return self._get(_arq.AcceleratorRequest, uuid)
|
||||
|
@ -118,7 +118,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:param str name_or_id: The ID of a chassis.
|
||||
:param bool ignore_missing: When set to ``False``, an exception of
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the chassis does not exist. When set to `True``, None will
|
||||
be returned when attempting to find a nonexistent chassis.
|
||||
:returns: One :class:`~openstack.baremetal.v1.chassis.Chassis` object
|
||||
@ -136,7 +136,7 @@ class Proxy(proxy.Proxy):
|
||||
:param fields: Limit the resource fields to fetch.
|
||||
|
||||
:returns: One :class:`~openstack.baremetal.v1.chassis.Chassis`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
chassis matching the name or ID could be found.
|
||||
"""
|
||||
return self._get_with_fields(_chassis.Chassis, chassis, fields=fields)
|
||||
@ -172,7 +172,7 @@ class Proxy(proxy.Proxy):
|
||||
:param chassis: The value can be either the ID of a chassis or
|
||||
a :class:`~openstack.baremetal.v1.chassis.Chassis` instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the chassis could not be found. When set to ``True``, no
|
||||
exception will be raised when attempting to delete a non-existent
|
||||
chassis.
|
||||
@ -206,7 +206,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.baremetal.v1.driver.Driver` instance.
|
||||
|
||||
:returns: One :class:`~openstack.baremetal.v1.driver.Driver`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
driver matching the name could be found.
|
||||
"""
|
||||
return self._get(_driver.Driver, driver)
|
||||
@ -218,7 +218,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.baremetal.v1.driver.Driver` instance.
|
||||
|
||||
:returns: One :dict: of vendor methods with corresponding usages
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
driver matching the name could be found.
|
||||
"""
|
||||
driver = self.get_driver(driver)
|
||||
@ -310,7 +310,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:param str name_or_id: The name or ID of a node.
|
||||
:param bool ignore_missing: When set to ``False``, an exception of
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the node does not exist. When set to `True``, None will
|
||||
be returned when attempting to find a nonexistent node.
|
||||
:returns: One :class:`~openstack.baremetal.v1.node.Node` object
|
||||
@ -328,7 +328,7 @@ class Proxy(proxy.Proxy):
|
||||
:param fields: Limit the resource fields to fetch.
|
||||
|
||||
:returns: One :class:`~openstack.baremetal.v1.node.Node`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
node matching the name or ID could be found.
|
||||
"""
|
||||
return self._get_with_fields(_node.Node, node, fields=fields)
|
||||
@ -340,7 +340,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.baremetal.v1.node.Node` instance.
|
||||
|
||||
:returns: The node inventory
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
inventory could be found.
|
||||
"""
|
||||
res = self._get_resource(_node.Node, node)
|
||||
@ -702,7 +702,7 @@ class Proxy(proxy.Proxy):
|
||||
:param node: The value can be either the name or ID of a node or
|
||||
a :class:`~openstack.baremetal.v1.node.Node` instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the node could not be found. When set to ``True``, no
|
||||
exception will be raised when attempting to delete a non-existent
|
||||
node.
|
||||
@ -773,7 +773,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:param str name_or_id: The ID of a port.
|
||||
:param bool ignore_missing: When set to ``False``, an exception of
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the port does not exist. When set to `True``, None will
|
||||
be returned when attempting to find a nonexistent port.
|
||||
:returns: One :class:`~openstack.baremetal.v1.port.Port` object
|
||||
@ -791,7 +791,7 @@ class Proxy(proxy.Proxy):
|
||||
:param fields: Limit the resource fields to fetch.
|
||||
|
||||
:returns: One :class:`~openstack.baremetal.v1.port.Port`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
port matching the name or ID could be found.
|
||||
"""
|
||||
return self._get_with_fields(_port.Port, port, fields=fields)
|
||||
@ -827,7 +827,7 @@ class Proxy(proxy.Proxy):
|
||||
:param port: The value can be either the ID of a port or
|
||||
a :class:`~openstack.baremetal.v1.port.Port` instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the port could not be found. When set to ``True``, no
|
||||
exception will be raised when attempting to delete a non-existent
|
||||
port.
|
||||
@ -892,7 +892,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:param str name_or_id: The name or ID of a portgroup.
|
||||
:param bool ignore_missing: When set to ``False``, an exception of
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the port group does not exist. When set to `True``, None will
|
||||
be returned when attempting to find a nonexistent port group.
|
||||
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||
@ -910,7 +910,7 @@ class Proxy(proxy.Proxy):
|
||||
:param fields: Limit the resource fields to fetch.
|
||||
|
||||
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
port group matching the name or ID could be found.
|
||||
"""
|
||||
return self._get_with_fields(
|
||||
@ -952,7 +952,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the port group could not be found. When set to ``True``, no
|
||||
exception will be raised when attempting to delete a non-existent
|
||||
port group.
|
||||
@ -997,7 +997,7 @@ class Proxy(proxy.Proxy):
|
||||
a :class:`~openstack.baremetal.v1.node.Node` instance.
|
||||
:param string vif_id: Backend-specific VIF ID.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the VIF does not exist. Otherwise, ``False``
|
||||
is returned.
|
||||
:return: ``True`` if the VIF was detached, otherwise ``False``.
|
||||
@ -1075,7 +1075,7 @@ class Proxy(proxy.Proxy):
|
||||
:param fields: Limit the resource fields to fetch.
|
||||
|
||||
:returns: One :class:`~openstack.baremetal.v1.allocation.Allocation`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
allocation matching the name or ID could be found.
|
||||
"""
|
||||
return self._get_with_fields(
|
||||
@ -1115,7 +1115,7 @@ class Proxy(proxy.Proxy):
|
||||
:param allocation: The value can be the name or ID of an allocation or
|
||||
a :class:`~openstack.baremetal.v1.allocation.Allocation` instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the allocation could not be found. When set to ``True``, no
|
||||
exception will be raised when attempting to delete a non-existent
|
||||
allocation.
|
||||
@ -1167,7 +1167,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.baremetal.v1.node.Node` instance.
|
||||
:param trait: trait to remove from the node.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the trait could not be found. When set to ``True``, no
|
||||
exception will be raised when attempting to delete a non-existent
|
||||
trait.
|
||||
@ -1310,7 +1310,7 @@ class Proxy(proxy.Proxy):
|
||||
:param str vc_id: The ID of a volume connector.
|
||||
|
||||
:param bool ignore_missing: When set to ``False``, an exception of
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume connector does not exist. When set to `True``,
|
||||
None will be returned when attempting to find a nonexistent
|
||||
volume connector.
|
||||
@ -1335,7 +1335,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:returns: One
|
||||
:class: `~openstack.baremetal.v1.volume_connector.VolumeConnector`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
volume_connector matching the name or ID could be found.`
|
||||
"""
|
||||
return self._get_with_fields(
|
||||
@ -1385,7 +1385,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.baremetal.v1.volume_connector.VolumeConnector`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume_connector could not be found.
|
||||
When set to ``True``, no exception will be raised when
|
||||
attempting to delete a non-existent volume_connector.
|
||||
@ -1457,7 +1457,7 @@ class Proxy(proxy.Proxy):
|
||||
:param str vt_id: The ID of a volume target.
|
||||
|
||||
:param bool ignore_missing: When set to ``False``, an exception of
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume connector does not exist. When set to `True``,
|
||||
None will be returned when attempting to find a nonexistent
|
||||
volume target.
|
||||
@ -1480,7 +1480,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:returns: One
|
||||
:class:`~openstack.baremetal.v1.volume_target.VolumeTarget`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
volume_target matching the name or ID could be found.`
|
||||
"""
|
||||
return self._get_with_fields(
|
||||
@ -1527,7 +1527,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~openstack.baremetal.v1.volume_target.VolumeTarget`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume_target could not be found.
|
||||
When set to ``True``, no exception will be raised when
|
||||
attempting to delete a non-existent volume_target.
|
||||
@ -1595,7 +1595,7 @@ class Proxy(proxy.Proxy):
|
||||
instance.
|
||||
|
||||
:param bool ignore_missing: When set to ``False``,
|
||||
an exception:class:`~openstack.exceptions.ResourceNotFound`
|
||||
an exception:class:`~openstack.exceptions.NotFoundException`
|
||||
will be raised when the deploy_template
|
||||
could not be found.
|
||||
When set to ``True``, no
|
||||
@ -1626,7 +1626,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:returns: One
|
||||
:class:`~openstack.baremetal.v1.deploy_templates.DeployTemplate`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no deployment template matching the name or
|
||||
ID could be found.
|
||||
"""
|
||||
@ -1673,7 +1673,7 @@ class Proxy(proxy.Proxy):
|
||||
|
||||
:returns: One :class:`~openstack.baremetal.v1.conductor.Conductor`
|
||||
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
conductor matching the name could be found.
|
||||
"""
|
||||
return self._get_with_fields(
|
||||
|
@ -847,7 +847,7 @@ class Node(_common.Resource):
|
||||
:type session: :class:`~keystoneauth1.adapter.Adapter`
|
||||
:param string vif_id: Backend-specific VIF ID.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the VIF does not exist. Otherwise, ``False``
|
||||
is returned.
|
||||
:return: ``True`` if the VIF was detached, otherwise ``False``.
|
||||
@ -1188,7 +1188,7 @@ class Node(_common.Resource):
|
||||
:param session: The session to use for making this request.
|
||||
:param trait: The trait to remove from the node.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the trait does not exist.
|
||||
Otherwise, ``False`` is returned.
|
||||
:returns bool: True on success removing the trait.
|
||||
|
@ -89,7 +89,7 @@ class Proxy(proxy.Proxy):
|
||||
introspection (matching bare metal node name or ID) or
|
||||
an :class:`~.introspection.Introspection` instance.
|
||||
:returns: :class:`~.introspection.Introspection` instance.
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
introspection matching the name or ID could be found.
|
||||
"""
|
||||
return self._get(_introspect.Introspection, introspection)
|
||||
@ -118,7 +118,7 @@ class Proxy(proxy.Proxy):
|
||||
introspection (matching bare metal node name or ID) or
|
||||
an :class:`~.introspection.Introspection` instance.
|
||||
:param bool ignore_missing: When set to ``False``, an exception
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the introspection could not be found. When set to ``True``, no
|
||||
exception will be raised when attempting to abort a non-existent
|
||||
introspection.
|
||||
@ -127,7 +127,7 @@ class Proxy(proxy.Proxy):
|
||||
res = self._get_resource(_introspect.Introspection, introspection)
|
||||
try:
|
||||
res.abort(self)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
if not ignore_missing:
|
||||
raise
|
||||
|
||||
@ -177,7 +177,7 @@ class Proxy(proxy.Proxy):
|
||||
introspection rule or a
|
||||
:class:`~.introspection_rule.IntrospectionRule` instance.
|
||||
:param bool ignore_missing: When set to ``False``, an
|
||||
exception:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
exception:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the introspection rule could not be found. When set to
|
||||
``True``, no exception will be raised when attempting to delete a
|
||||
non-existent introspection rule.
|
||||
@ -198,7 +198,7 @@ class Proxy(proxy.Proxy):
|
||||
:class:`~.introspection_rule.IntrospectionRule` instance.
|
||||
|
||||
:returns: :class:`~.introspection_rule.IntrospectionRule` instance.
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
introspection rule matching the name or ID could be found.
|
||||
"""
|
||||
return self._get(
|
||||
|
@ -38,7 +38,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v2.snapshot.Snapshot`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_snapshot.Snapshot, snapshot)
|
||||
@ -55,7 +55,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param snapshot: The name or ID a snapshot
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the snapshot does not exist. When set to ``True``, None will
|
||||
be returned when attempting to find a nonexistent resource.
|
||||
:param bool details: When set to ``False``, an
|
||||
@ -70,7 +70,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:returns: One :class:`~openstack.block_storage.v2.snapshot.Snapshot`,
|
||||
one :class:`~openstack.block_storage.v2.snapshot.SnapshotDetail`
|
||||
object, or None.
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -131,7 +131,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:class:`~openstack.block_storage.v2.snapshot.Snapshot`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the snapshot does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent snapshot.
|
||||
@ -163,7 +163,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:class:`~openstack.block_storage.v2.type.Type` instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v2.type.Type`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_type.Type, type)
|
||||
@ -193,7 +193,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param type: The value can be either the ID of a type or a
|
||||
:class:`~openstack.block_storage.v2.type.Type` instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the type does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent type.
|
||||
@ -248,7 +248,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:class:`~openstack.block_storage.v2.volume.Volume` instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v2.volume.Volume`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_volume.Volume, volume)
|
||||
@ -265,7 +265,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param volume: The name or ID a volume
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume does not exist.
|
||||
:param bool details: When set to ``False`` no extended attributes
|
||||
will be returned. The default, ``True``, will cause an object with
|
||||
@ -276,7 +276,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v2.volume.Volume` or
|
||||
None.
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -333,7 +333,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param volume: The value can be either the ID of a volume or a
|
||||
:class:`~openstack.block_storage.v2.volume.Volume` instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume does not exist. When set to ``True``, no
|
||||
exception will be set when attempting to delete a nonexistent
|
||||
volume.
|
||||
@ -569,14 +569,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param snapshot: The name or ID a backup
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the backup does not exist.
|
||||
:param bool details: When set to ``False`` no additional details will
|
||||
be returned. The default, ``True``, will cause objects with
|
||||
additional attributes to be returned.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v2.backup.Backup`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -607,7 +607,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param backup: The value can be the ID of a backup or a
|
||||
:class:`~openstack.block_storage.v2.backup.Backup` instance
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised when
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised when
|
||||
the zone does not exist.
|
||||
When set to ``True``, no exception will be set when attempting to
|
||||
delete a nonexistent zone.
|
||||
@ -673,7 +673,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:returns: One :class:
|
||||
`~openstack.block_storage.v2.capabilites.Capabilities` instance.
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
resource can be found.
|
||||
"""
|
||||
return self._get(_capabilities.Capabilities, host)
|
||||
@ -727,7 +727,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param dict query: Additional query parameters to use.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v2.quota_set.QuotaSet`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
project = self._get_resource(_project.Project, project)
|
||||
@ -744,7 +744,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
which the quota should be retrieved
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v2.quota_set.QuotaSet`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
project = self._get_resource(_project.Project, project)
|
||||
|
@ -70,7 +70,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.snapshot.Snapshot`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_snapshot.Snapshot, snapshot)
|
||||
@ -87,7 +87,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param snapshot: The name or ID a snapshot
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the snapshot does not exist. When set to ``True``, None will
|
||||
be returned when attempting to find a nonexistent resource.
|
||||
:param bool details: When set to ``False`` :class:
|
||||
@ -99,7 +99,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
a higher chance of duplicates. Admin-only by default.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.snapshot.Snapshot`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -171,7 +171,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param snapshot: The value can be either the ID of a snapshot or a
|
||||
:class:`~openstack.block_storage.v3.snapshot.Snapshot` instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the snapshot does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent snapshot.
|
||||
@ -293,7 +293,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:class:`~openstack.block_storage.v3.type.Type` instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.type.Type`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_type.Type, type)
|
||||
@ -303,11 +303,11 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param snapshot: The name or ID a volume type
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume type does not exist.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.type.Type`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -343,7 +343,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param type: The value can be either the ID of a type or a
|
||||
:class:`~openstack.block_storage.v3.type.Type` instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the type does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent type.
|
||||
@ -438,7 +438,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.type.TypeEncryption`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
volume_type = self._get_resource(_type.Type, volume_type_id)
|
||||
@ -484,7 +484,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
instance. Required if encryption_id is None.
|
||||
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the type does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent type.
|
||||
@ -543,7 +543,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:class:`~openstack.block_storage.v3.volume.Volume` instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.volume.Volume`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_volume.Volume, volume)
|
||||
@ -560,7 +560,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param snapshot: The name or ID a volume
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume does not exist.
|
||||
:param bool details: When set to ``False`` no extended attributes
|
||||
will be returned. The default, ``True``, will cause objects with
|
||||
@ -570,7 +570,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
a higher chance of duplicates. Admin-only by default.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.volume.Volume`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -627,7 +627,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param volume: The value can be either the ID of a volume or a
|
||||
:class:`~openstack.block_storage.v3.volume.Volume` instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the volume does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent volume.
|
||||
@ -1069,7 +1069,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:class:`~attachment.Attachment` instance.
|
||||
|
||||
:returns: One :class:`~attachment.Attachment`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_attachment.Attachment, attachment)
|
||||
@ -1097,7 +1097,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:class:`~openstack.block_storage.v3.attachment.Attachment`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the attachment does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent attachment.
|
||||
@ -1199,14 +1199,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param snapshot: The name or ID a backup
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the backup does not exist.
|
||||
:param bool details: When set to ``False`` no additional details will
|
||||
be returned. The default, ``True``, will cause objects with
|
||||
additional attributes to be returned.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.backup.Backup`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -1237,7 +1237,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param backup: The value can be the ID of a backup or a
|
||||
:class:`~openstack.block_storage.v3.backup.Backup` instance
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised when
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised when
|
||||
the zone does not exist.
|
||||
When set to ``True``, no exception will be set when attempting to
|
||||
delete a nonexistent zone.
|
||||
@ -1303,7 +1303,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:returns: One :class:
|
||||
`~openstack.block_storage.v3.capabilites.Capabilities` instance.
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
resource can be found.
|
||||
"""
|
||||
return self._get(_capabilities.Capabilities, host)
|
||||
@ -1326,14 +1326,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param name_or_id: The name or ID of a group.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the group snapshot does not exist.
|
||||
:param bool details: When set to ``False``, no additional details will
|
||||
be returned. The default, ``True``, will cause additional details
|
||||
to be returned.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.group.Group`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -1465,14 +1465,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param name_or_id: The name or ID of a group snapshot.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the group snapshot does not exist.
|
||||
:param bool details: When set to ``False``, no additional details will
|
||||
be returned. The default, ``True``, will cause additional details
|
||||
to be returned.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.group_snapshot`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -1553,7 +1553,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:returns: One :class:
|
||||
`~openstack.block_storage.v3.group_type.GroupType` instance.
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
resource can be found.
|
||||
"""
|
||||
return self._get(_group_type.GroupType, group_type)
|
||||
@ -1563,12 +1563,12 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param name_or_id: The name or ID of a group type.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the group type does not exist.
|
||||
|
||||
:returns: One
|
||||
:class:`~openstack.block_storage.v3.group_type.GroupType`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException` when no
|
||||
resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -1620,7 +1620,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
or a :class:`~openstack.block_storage.v3.group_type.GroupType`
|
||||
instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised when
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised when
|
||||
the zone does not exist.
|
||||
When set to ``True``, no exception will be set when attempting to
|
||||
delete a nonexistent zone.
|
||||
@ -1753,7 +1753,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param dict query: Additional query parameters to use.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.quota_set.QuotaSet`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
project = self._get_resource(_project.Project, project)
|
||||
@ -1770,7 +1770,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
which the quota should be retrieved
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.quota_set.QuotaSet`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
project = self._get_resource(_project.Project, project)
|
||||
@ -1865,14 +1865,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param name_or_id: The name or ID of a service
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised when
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised when
|
||||
the resource does not exist.
|
||||
When set to ``True``, None will be returned when attempting to find
|
||||
a nonexistent resource.
|
||||
:param dict query: Additional attributes like 'host'
|
||||
|
||||
:returns: One: class:`~openstack.block_storage.v3.service.Service` or None
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -1909,8 +1909,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:returns: Updated service instance
|
||||
:rtype: class: `~openstack.block_storage.v3.service.Service`
|
||||
"""
|
||||
service = self._get_resource(_service.Service, service)
|
||||
return service.enable(self)
|
||||
service_obj = self._get_resource(_service.Service, service)
|
||||
return service_obj.enable(self)
|
||||
|
||||
def disable_service(
|
||||
self,
|
||||
@ -1927,8 +1927,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:returns: Updated service instance
|
||||
:rtype: class: `~openstack.block_storage.v3.service.Service`
|
||||
"""
|
||||
service = self._get_resource(_service.Service, service)
|
||||
return service.disable(self, reason=reason)
|
||||
service_obj = self._get_resource(_service.Service, service)
|
||||
return service_obj.disable(self, reason=reason)
|
||||
|
||||
def thaw_service(
|
||||
self,
|
||||
@ -1942,8 +1942,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:returns: Updated service instance
|
||||
:rtype: class: `~openstack.block_storage.v3.service.Service`
|
||||
"""
|
||||
service = self._get_resource(_service.Service, service)
|
||||
return service.thaw(self)
|
||||
service_obj = self._get_resource(_service.Service, service)
|
||||
return service_obj.thaw(self)
|
||||
|
||||
def freeze_service(
|
||||
self,
|
||||
@ -1957,8 +1957,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:returns: Updated service instance
|
||||
:rtype: class: `~openstack.block_storage.v3.service.Service`
|
||||
"""
|
||||
service = self._get_resource(_service.Service, service)
|
||||
return service.freeze(self)
|
||||
service_obj = self._get_resource(_service.Service, service)
|
||||
return service_obj.freeze(self)
|
||||
|
||||
def failover_service(
|
||||
self,
|
||||
@ -1977,8 +1977,10 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:returns: Updated service instance
|
||||
:rtype: class: `~openstack.block_storage.v3.service.Service`
|
||||
"""
|
||||
service = self._get_resource(_service.Service, service)
|
||||
return service.failover(self, cluster=cluster, backend_id=backend_id)
|
||||
service_obj = self._get_resource(_service.Service, service)
|
||||
return service_obj.failover(
|
||||
self, cluster=cluster, backend_id=backend_id
|
||||
)
|
||||
|
||||
# ====== RESOURCE FILTERS ======
|
||||
def resource_filters(self, **query):
|
||||
@ -2018,7 +2020,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
:param transfer: The value can be either the ID of a transfer or a
|
||||
:class:`~openstack.block_storage.v3.transfer.Transfer`` instance.
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be
|
||||
:class:`~openstack.exceptions.NotFoundException` will be
|
||||
raised when the transfer does not exist.
|
||||
When set to ``True``, no exception will be set when
|
||||
attempting to delete a nonexistent transfer.
|
||||
@ -2036,11 +2038,11 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
|
||||
:param name_or_id: The name or ID a transfer
|
||||
:param bool ignore_missing: When set to ``False``
|
||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||
:class:`~openstack.exceptions.NotFoundException` will be raised
|
||||
when the volume transfer does not exist.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.transfer.Transfer`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
|
||||
resources are found.
|
||||
@ -2059,7 +2061,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
|
||||
instance.
|
||||
|
||||
:returns: One :class:`~openstack.block_storage.v3.transfer.Transfer`
|
||||
:raises: :class:`~openstack.exceptions.ResourceNotFound`
|
||||
:raises: :class:`~openstack.exceptions.NotFoundException`
|
||||
when no resource can be found.
|
||||
"""
|
||||
return self._get(_transfer.Transfer, transfer)
|
||||
|
@ -86,7 +86,7 @@ class Service(resource.Resource):
|
||||
|
||||
if ignore_missing:
|
||||
return None
|
||||
raise exceptions.ResourceNotFound(
|
||||
raise exceptions.NotFoundException(
|
||||
f"No {cls.__name__} found for {name_or_id}"
|
||||
)
|
||||
|
||||
|
@ -130,7 +130,7 @@ class Transfer(resource.Resource):
|
||||
:return: This :class:`Resource` instance.
|
||||
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if
|
||||
:data:`Resource.allow_fetch` is not set to ``True``.
|
||||
:raises: :exc:`~openstack.exceptions.ResourceNotFound` if
|
||||
:raises: :exc:`~openstack.exceptions.NotFoundException` if
|
||||
the resource was not found.
|
||||
"""
|
||||
|
||||
@ -162,7 +162,7 @@ class Transfer(resource.Resource):
|
||||
:return: This :class:`Resource` instance.
|
||||
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if
|
||||
:data:`Resource.allow_commit` is not set to ``True``.
|
||||
:raises: :exc:`~openstack.exceptions.ResourceNotFound` if
|
||||
:raises: :exc:`~openstack.exceptions.NotFoundException` if
|
||||
the resource was not found.
|
||||
"""
|
||||
|
||||
|
@ -324,7 +324,7 @@ class ComputeCloudMixin:
|
||||
try:
|
||||
self.compute.remove_security_group_from_server(server, sg)
|
||||
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
# NOTE(jamielennox): Is this ok? If we remove something that
|
||||
# isn't present should we just conclude job done or is that an
|
||||
# error? Nova returns ok if you try to add a group twice.
|
||||
@ -560,7 +560,7 @@ class ComputeCloudMixin:
|
||||
try:
|
||||
server = self.compute.get_server(id)
|
||||
return meta.add_server_interfaces(self, server)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
return None
|
||||
|
||||
def get_server_group(self, name_or_id=None, filters=None):
|
||||
@ -611,7 +611,7 @@ class ComputeCloudMixin:
|
||||
"""
|
||||
try:
|
||||
self.compute.delete_keypair(name, ignore_missing=False)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
self.log.debug("Keypair %s not found for deleting", name)
|
||||
return False
|
||||
return True
|
||||
@ -1398,7 +1398,7 @@ class ComputeCloudMixin:
|
||||
|
||||
try:
|
||||
self.compute.delete_server(server)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
return False
|
||||
except Exception:
|
||||
raise
|
||||
@ -1707,7 +1707,7 @@ class ComputeCloudMixin:
|
||||
try:
|
||||
self.compute.delete_aggregate(name_or_id, ignore_missing=False)
|
||||
return True
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
self.log.debug("Aggregate %s not found for deleting", name_or_id)
|
||||
return False
|
||||
|
||||
|
@ -439,7 +439,7 @@ class FloatingIPCloudMixin:
|
||||
if network_name_or_id:
|
||||
try:
|
||||
network = self.network.find_network(network_name_or_id)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
raise exceptions.NotFoundException(
|
||||
"unable to find network for floating ips with ID "
|
||||
"{}".format(network_name_or_id)
|
||||
@ -592,7 +592,7 @@ class FloatingIPCloudMixin:
|
||||
def _neutron_delete_floating_ip(self, floating_ip_id):
|
||||
try:
|
||||
self.network.delete_ip(floating_ip_id, ignore_missing=False)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -778,7 +778,7 @@ class NetworkCloudMixin:
|
||||
self.network.delete_firewall_rule(
|
||||
firewall_rule, ignore_missing=False
|
||||
)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
self.log.debug(
|
||||
'Firewall rule %s not found for deleting', name_or_id
|
||||
)
|
||||
@ -938,7 +938,7 @@ class NetworkCloudMixin:
|
||||
:param bool shared: Visibility to other projects.
|
||||
Defaults to False.
|
||||
:raises: BadRequestException if parameters are malformed
|
||||
:raises: ResourceNotFound if a resource from firewall_list not found
|
||||
:raises: NotFoundException if a resource from firewall_list not found
|
||||
:returns: The created network ``FirewallPolicy`` object.
|
||||
"""
|
||||
if 'firewall_rules' in kwargs:
|
||||
@ -982,7 +982,7 @@ class NetworkCloudMixin:
|
||||
self.network.delete_firewall_policy(
|
||||
firewall_policy, ignore_missing=False
|
||||
)
|
||||
except exceptions.ResourceNotFound:
|
||||
except exceptions.NotFoundException:
|
||||
self |