exceptions: ResourceNotFound -> NotFoundException

Invert the order of these such that ResourceNotFound is an alias of
NotFoundException rather than the other way around. This is more
consistent with the other HTTP-related exceptions.

Change-Id: I3b669494cf7dc4e540a54070de42b1befe803e14
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2024-06-13 12:39:24 +01:00
parent 0f311ff3e2
commit 14c1ebbeb8
69 changed files with 701 additions and 701 deletions

@ -32,7 +32,7 @@ class Proxy(proxy.Proxy):
:param uuid: The value can be the UUID of a deployable. :param uuid: The value can be the UUID of a deployable.
:returns: One :class:`~openstack.accelerator.v2.deployable.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. deployable matching the criteria could be found.
""" """
return self._get(_deployable.Deployable, uuid) 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. :param uuid: The value can be the UUID of a device.
:returns: One :class:`~openstack.accelerator.v2.device.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. device matching the criteria could be found.
""" """
return self._get(_device.Device, uuid) return self._get(_device.Device, uuid)
@ -106,7 +106,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.accelerator.v2.device_profile.DeviceProfile` :class:`~openstack.accelerator.v2.device_profile.DeviceProfile`
instance. 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.NotFoundException` will be
raised when the device profile does not exist. raised when the device profile 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 device profile. 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. :param uuid: The value can be the UUID of a device profile.
:returns: One :class: :returns: One :class:
`~openstack.accelerator.v2.device_profile.DeviceProfile` `~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. device profile matching the criteria could be found.
""" """
return self._get(_device_profile.DeviceProfile, uuid) return self._get(_device_profile.DeviceProfile, uuid)
@ -158,7 +158,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.accelerator.v2.device_profile.DeviceProfile` :class:`~openstack.accelerator.v2.device_profile.DeviceProfile`
instance. instance.
:param bool ignore_missing: When set to ``False`` :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. the device profile does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent accelerator request. 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. :param uuid: The value can be the UUID of a accelerator request.
:returns: One :class: :returns: One :class:
`~openstack.accelerator.v2.accelerator_request.AcceleratorRequest` `~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. accelerator request matching the criteria could be found.
""" """
return self._get(_arq.AcceleratorRequest, uuid) 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 str name_or_id: The ID of a chassis.
:param bool ignore_missing: When set to ``False``, an exception of :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 when the chassis does not exist. When set to `True``, None will
be returned when attempting to find a nonexistent chassis. be returned when attempting to find a nonexistent chassis.
:returns: One :class:`~openstack.baremetal.v1.chassis.Chassis` object :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. :param fields: Limit the resource fields to fetch.
:returns: One :class:`~openstack.baremetal.v1.chassis.Chassis` :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. chassis matching the name or ID could be found.
""" """
return self._get_with_fields(_chassis.Chassis, chassis, fields=fields) 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 :param chassis: The value can be either the ID of a chassis or
a :class:`~openstack.baremetal.v1.chassis.Chassis` instance. a :class:`~openstack.baremetal.v1.chassis.Chassis` instance.
:param bool ignore_missing: When set to ``False``, an exception :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 when the chassis could not be found. When set to ``True``, no
exception will be raised when attempting to delete a non-existent exception will be raised when attempting to delete a non-existent
chassis. chassis.
@ -206,7 +206,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.baremetal.v1.driver.Driver` instance. :class:`~openstack.baremetal.v1.driver.Driver` instance.
:returns: One :class:`~openstack.baremetal.v1.driver.Driver` :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. driver matching the name could be found.
""" """
return self._get(_driver.Driver, driver) return self._get(_driver.Driver, driver)
@ -218,7 +218,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.baremetal.v1.driver.Driver` instance. :class:`~openstack.baremetal.v1.driver.Driver` instance.
:returns: One :dict: of vendor methods with corresponding usages :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 matching the name could be found.
""" """
driver = self.get_driver(driver) 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 str name_or_id: The name or ID of a node.
:param bool ignore_missing: When set to ``False``, an exception of :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 when the node does not exist. When set to `True``, None will
be returned when attempting to find a nonexistent node. be returned when attempting to find a nonexistent node.
:returns: One :class:`~openstack.baremetal.v1.node.Node` object :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. :param fields: Limit the resource fields to fetch.
:returns: One :class:`~openstack.baremetal.v1.node.Node` :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. node matching the name or ID could be found.
""" """
return self._get_with_fields(_node.Node, node, fields=fields) 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. :class:`~openstack.baremetal.v1.node.Node` instance.
:returns: The node inventory :returns: The node inventory
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
inventory could be found. inventory could be found.
""" """
res = self._get_resource(_node.Node, node) 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 :param node: The value can be either the name or ID of a node or
a :class:`~openstack.baremetal.v1.node.Node` instance. a :class:`~openstack.baremetal.v1.node.Node` instance.
:param bool ignore_missing: When set to ``False``, an exception :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 when the node could not be found. When set to ``True``, no
exception will be raised when attempting to delete a non-existent exception will be raised when attempting to delete a non-existent
node. node.
@ -773,7 +773,7 @@ class Proxy(proxy.Proxy):
:param str name_or_id: The ID of a port. :param str name_or_id: The ID of a port.
:param bool ignore_missing: When set to ``False``, an exception of :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 when the port does not exist. When set to `True``, None will
be returned when attempting to find a nonexistent port. be returned when attempting to find a nonexistent port.
:returns: One :class:`~openstack.baremetal.v1.port.Port` object :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. :param fields: Limit the resource fields to fetch.
:returns: One :class:`~openstack.baremetal.v1.port.Port` :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. port matching the name or ID could be found.
""" """
return self._get_with_fields(_port.Port, port, fields=fields) 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 :param port: The value can be either the ID of a port or
a :class:`~openstack.baremetal.v1.port.Port` instance. a :class:`~openstack.baremetal.v1.port.Port` instance.
:param bool ignore_missing: When set to ``False``, an exception :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 when the port could not be found. When set to ``True``, no
exception will be raised when attempting to delete a non-existent exception will be raised when attempting to delete a non-existent
port. port.
@ -892,7 +892,7 @@ class Proxy(proxy.Proxy):
:param str name_or_id: The name or ID of a portgroup. :param str name_or_id: The name or ID of a portgroup.
:param bool ignore_missing: When set to ``False``, an exception of :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 when the port group does not exist. When set to `True``, None will
be returned when attempting to find a nonexistent port group. be returned when attempting to find a nonexistent port group.
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup` :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. :param fields: Limit the resource fields to fetch.
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup` :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. port group matching the name or ID could be found.
""" """
return self._get_with_fields( return self._get_with_fields(
@ -952,7 +952,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.baremetal.v1.port_group.PortGroup` :class:`~openstack.baremetal.v1.port_group.PortGroup`
instance. instance.
:param bool ignore_missing: When set to ``False``, an exception :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 when the port group could not be found. When set to ``True``, no
exception will be raised when attempting to delete a non-existent exception will be raised when attempting to delete a non-existent
port group. port group.
@ -997,7 +997,7 @@ class Proxy(proxy.Proxy):
a :class:`~openstack.baremetal.v1.node.Node` instance. a :class:`~openstack.baremetal.v1.node.Node` instance.
:param string vif_id: Backend-specific VIF ID. :param string vif_id: Backend-specific VIF ID.
: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.NotFoundException` will be
raised when the VIF does not exist. Otherwise, ``False`` raised when the VIF does not exist. Otherwise, ``False``
is returned. is returned.
:return: ``True`` if the VIF was detached, otherwise ``False``. :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. :param fields: Limit the resource fields to fetch.
:returns: One :class:`~openstack.baremetal.v1.allocation.Allocation` :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. allocation matching the name or ID could be found.
""" """
return self._get_with_fields( 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 :param allocation: The value can be the name or ID of an allocation or
a :class:`~openstack.baremetal.v1.allocation.Allocation` instance. a :class:`~openstack.baremetal.v1.allocation.Allocation` instance.
:param bool ignore_missing: When set to ``False``, an exception :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 when the allocation could not be found. When set to ``True``, no
exception will be raised when attempting to delete a non-existent exception will be raised when attempting to delete a non-existent
allocation. allocation.
@ -1167,7 +1167,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.baremetal.v1.node.Node` instance. :class:`~openstack.baremetal.v1.node.Node` instance.
:param trait: trait to remove from the node. :param trait: trait to remove from the node.
:param bool ignore_missing: When set to ``False``, an exception :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 when the trait could not be found. When set to ``True``, no
exception will be raised when attempting to delete a non-existent exception will be raised when attempting to delete a non-existent
trait. trait.
@ -1300,7 +1300,7 @@ class Proxy(proxy.Proxy):
:param str vc_id: The ID of a volume connector. :param str vc_id: The ID of a volume connector.
:param bool ignore_missing: When set to ``False``, an exception of :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``, when the volume connector does not exist. When set to `True``,
None will be returned when attempting to find a nonexistent None will be returned when attempting to find a nonexistent
volume connector. volume connector.
@ -1325,7 +1325,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class: `~openstack.baremetal.v1.volume_connector.VolumeConnector` :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.` volume_connector matching the name or ID could be found.`
""" """
return self._get_with_fields( return self._get_with_fields(
@ -1375,7 +1375,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.baremetal.v1.volume_connector.VolumeConnector` :class:`~openstack.baremetal.v1.volume_connector.VolumeConnector`
instance. instance.
:param bool ignore_missing: When set to ``False``, an exception :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 the volume_connector could not be found.
When set to ``True``, no exception will be raised when When set to ``True``, no exception will be raised when
attempting to delete a non-existent volume_connector. attempting to delete a non-existent volume_connector.
@ -1447,7 +1447,7 @@ class Proxy(proxy.Proxy):
:param str vt_id: The ID of a volume target. :param str vt_id: The ID of a volume target.
:param bool ignore_missing: When set to ``False``, an exception of :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``, when the volume connector does not exist. When set to `True``,
None will be returned when attempting to find a nonexistent None will be returned when attempting to find a nonexistent
volume target. volume target.
@ -1470,7 +1470,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.baremetal.v1.volume_target.VolumeTarget` :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.` volume_target matching the name or ID could be found.`
""" """
return self._get_with_fields( return self._get_with_fields(
@ -1517,7 +1517,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.baremetal.v1.volume_target.VolumeTarget` :class:`~openstack.baremetal.v1.volume_target.VolumeTarget`
instance. instance.
:param bool ignore_missing: When set to ``False``, an exception :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 the volume_target could not be found.
When set to ``True``, no exception will be raised when When set to ``True``, no exception will be raised when
attempting to delete a non-existent volume_target. attempting to delete a non-existent volume_target.
@ -1585,7 +1585,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:param bool ignore_missing: When set to ``False``, :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 will be raised when the deploy_template
could not be found. could not be found.
When set to ``True``, no When set to ``True``, no
@ -1616,7 +1616,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.baremetal.v1.deploy_templates.DeployTemplate` :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 when no deployment template matching the name or
ID could be found. ID could be found.
""" """
@ -1663,7 +1663,7 @@ class Proxy(proxy.Proxy):
:returns: One :class:`~openstack.baremetal.v1.conductor.Conductor` :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. conductor matching the name could be found.
""" """
return self._get_with_fields( return self._get_with_fields(

@ -847,7 +847,7 @@ class Node(_common.Resource):
:type session: :class:`~keystoneauth1.adapter.Adapter` :type session: :class:`~keystoneauth1.adapter.Adapter`
:param string vif_id: Backend-specific VIF ID. :param string vif_id: Backend-specific VIF ID.
: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.NotFoundException` will be
raised when the VIF does not exist. Otherwise, ``False`` raised when the VIF does not exist. Otherwise, ``False``
is returned. is returned.
:return: ``True`` if the VIF was detached, otherwise ``False``. :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 session: The session to use for making this request.
:param trait: The trait to remove from the node. :param trait: The trait to remove from the node.
: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.NotFoundException` will be
raised when the trait does not exist. raised when the trait does not exist.
Otherwise, ``False`` is returned. Otherwise, ``False`` is returned.
:returns bool: True on success removing the trait. :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 introspection (matching bare metal node name or ID) or
an :class:`~.introspection.Introspection` instance. an :class:`~.introspection.Introspection` instance.
:returns: :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. introspection matching the name or ID could be found.
""" """
return self._get(_introspect.Introspection, introspection) return self._get(_introspect.Introspection, introspection)
@ -118,7 +118,7 @@ class Proxy(proxy.Proxy):
introspection (matching bare metal node name or ID) or introspection (matching bare metal node name or ID) or
an :class:`~.introspection.Introspection` instance. an :class:`~.introspection.Introspection` instance.
:param bool ignore_missing: When set to ``False``, an exception :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 when the introspection could not be found. When set to ``True``, no
exception will be raised when attempting to abort a non-existent exception will be raised when attempting to abort a non-existent
introspection. introspection.
@ -127,7 +127,7 @@ class Proxy(proxy.Proxy):
res = self._get_resource(_introspect.Introspection, introspection) res = self._get_resource(_introspect.Introspection, introspection)
try: try:
res.abort(self) res.abort(self)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
if not ignore_missing: if not ignore_missing:
raise raise
@ -177,7 +177,7 @@ class Proxy(proxy.Proxy):
introspection rule or a introspection rule or a
:class:`~.introspection_rule.IntrospectionRule` instance. :class:`~.introspection_rule.IntrospectionRule` instance.
:param bool ignore_missing: When set to ``False``, an :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 raised when the introspection rule could not be found. When set to
``True``, no exception will be raised when attempting to delete a ``True``, no exception will be raised when attempting to delete a
non-existent introspection rule. non-existent introspection rule.
@ -198,7 +198,7 @@ class Proxy(proxy.Proxy):
:class:`~.introspection_rule.IntrospectionRule` instance. :class:`~.introspection_rule.IntrospectionRule` instance.
:returns: :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. introspection rule matching the name or ID could be found.
""" """
return self._get( return self._get(

@ -34,7 +34,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
instance. instance.
:returns: One :class:`~openstack.block_storage.v2.snapshot.Snapshot` :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. when no resource can be found.
""" """
return self._get(_snapshot.Snapshot, snapshot) return self._get(_snapshot.Snapshot, snapshot)
@ -51,7 +51,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param snapshot: The name or ID a snapshot :param snapshot: The name or ID a snapshot
:param bool ignore_missing: When set to ``False`` :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 when the snapshot does not exist. When set to ``True``, None will
be returned when attempting to find a nonexistent resource. be returned when attempting to find a nonexistent resource.
:param bool details: When set to ``False``, an :param bool details: When set to ``False``, an
@ -66,7 +66,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: One :class:`~openstack.block_storage.v2.snapshot.Snapshot`, :returns: One :class:`~openstack.block_storage.v2.snapshot.Snapshot`,
one :class:`~openstack.block_storage.v2.snapshot.SnapshotDetail` one :class:`~openstack.block_storage.v2.snapshot.SnapshotDetail`
object, or None. object, or None.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -127,7 +127,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:class:`~openstack.block_storage.v2.snapshot.Snapshot` :class:`~openstack.block_storage.v2.snapshot.Snapshot`
instance. 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.NotFoundException` will be
raised when the snapshot does not exist. raised when the snapshot 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 snapshot. attempting to delete a nonexistent snapshot.
@ -159,7 +159,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:class:`~openstack.block_storage.v2.type.Type` instance. :class:`~openstack.block_storage.v2.type.Type` instance.
:returns: One :class:`~openstack.block_storage.v2.type.Type` :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. when no resource can be found.
""" """
return self._get(_type.Type, type) return self._get(_type.Type, type)
@ -189,7 +189,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param type: The value can be either the ID of a type or a :param type: The value can be either the ID of a type or a
:class:`~openstack.block_storage.v2.type.Type` instance. :class:`~openstack.block_storage.v2.type.Type` 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.NotFoundException` will be
raised when the type does not exist. raised when the type 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 type. attempting to delete a nonexistent type.
@ -244,7 +244,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:class:`~openstack.block_storage.v2.volume.Volume` instance. :class:`~openstack.block_storage.v2.volume.Volume` instance.
:returns: One :class:`~openstack.block_storage.v2.volume.Volume` :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. when no resource can be found.
""" """
return self._get(_volume.Volume, volume) return self._get(_volume.Volume, volume)
@ -261,7 +261,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param volume: The name or ID a volume :param volume: The name or ID a volume
:param bool ignore_missing: When set to ``False`` :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 the volume does not exist.
:param bool details: When set to ``False`` no extended attributes :param bool details: When set to ``False`` no extended attributes
will be returned. The default, ``True``, will cause an object with will be returned. The default, ``True``, will cause an object with
@ -272,7 +272,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: One :class:`~openstack.block_storage.v2.volume.Volume` or :returns: One :class:`~openstack.block_storage.v2.volume.Volume` or
None. None.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -329,7 +329,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param volume: The value can be either the ID of a volume or a :param volume: The value can be either the ID of a volume or a
:class:`~openstack.block_storage.v2.volume.Volume` instance. :class:`~openstack.block_storage.v2.volume.Volume` instance.
:param bool ignore_missing: When set to ``False`` :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 when the volume does not exist. When set to ``True``, no
exception will be set when attempting to delete a nonexistent exception will be set when attempting to delete a nonexistent
volume. volume.
@ -565,14 +565,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param snapshot: The name or ID a backup :param snapshot: The name or ID a backup
:param bool ignore_missing: When set to ``False`` :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. when the backup does not exist.
:param bool details: When set to ``False`` no additional details will :param bool details: When set to ``False`` no additional details will
be returned. The default, ``True``, will cause objects with be returned. The default, ``True``, will cause objects with
additional attributes to be returned. additional attributes to be returned.
:returns: One :class:`~openstack.block_storage.v2.backup.Backup` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -603,7 +603,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param backup: The value can be the ID of a backup or a :param backup: The value can be the ID of a backup or a
:class:`~openstack.block_storage.v2.backup.Backup` instance :class:`~openstack.block_storage.v2.backup.Backup` instance
:param bool ignore_missing: When set to ``False`` :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. the zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone. delete a nonexistent zone.
@ -669,7 +669,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: One :class: :returns: One :class:
`~openstack.block_storage.v2.capabilites.Capabilities` instance. `~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. resource can be found.
""" """
return self._get(_capabilities.Capabilities, host) return self._get(_capabilities.Capabilities, host)
@ -686,7 +686,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param dict query: Additional query parameters to use. :param dict query: Additional query parameters to use.
:returns: One :class:`~openstack.block_storage.v2.quota_set.QuotaSet` :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. when no resource can be found.
""" """
project = self._get_resource(_project.Project, project) project = self._get_resource(_project.Project, project)
@ -703,7 +703,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
which the quota should be retrieved which the quota should be retrieved
:returns: One :class:`~openstack.block_storage.v2.quota_set.QuotaSet` :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. when no resource can be found.
""" """
project = self._get_resource(_project.Project, project) project = self._get_resource(_project.Project, project)

@ -67,7 +67,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
instance. instance.
:returns: One :class:`~openstack.block_storage.v3.snapshot.Snapshot` :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. when no resource can be found.
""" """
return self._get(_snapshot.Snapshot, snapshot) return self._get(_snapshot.Snapshot, snapshot)
@ -84,7 +84,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param snapshot: The name or ID a snapshot :param snapshot: The name or ID a snapshot
:param bool ignore_missing: When set to ``False`` :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 when the snapshot does not exist. When set to ``True``, None will
be returned when attempting to find a nonexistent resource. be returned when attempting to find a nonexistent resource.
:param bool details: When set to ``False`` :class: :param bool details: When set to ``False`` :class:
@ -96,7 +96,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
a higher chance of duplicates. Admin-only by default. a higher chance of duplicates. Admin-only by default.
:returns: One :class:`~openstack.block_storage.v3.snapshot.Snapshot` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -168,7 +168,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param snapshot: The value can be either the ID of a snapshot or a :param snapshot: The value can be either the ID of a snapshot or a
:class:`~openstack.block_storage.v3.snapshot.Snapshot` instance. :class:`~openstack.block_storage.v3.snapshot.Snapshot` 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.NotFoundException` will be
raised when the snapshot does not exist. raised when the snapshot 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 snapshot. attempting to delete a nonexistent snapshot.
@ -290,7 +290,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:class:`~openstack.block_storage.v3.type.Type` instance. :class:`~openstack.block_storage.v3.type.Type` instance.
:returns: One :class:`~openstack.block_storage.v3.type.Type` :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. when no resource can be found.
""" """
return self._get(_type.Type, type) return self._get(_type.Type, type)
@ -300,11 +300,11 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param snapshot: The name or ID a volume type :param snapshot: The name or ID a volume type
:param bool ignore_missing: When set to ``False`` :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. when the volume type does not exist.
:returns: One :class:`~openstack.block_storage.v3.type.Type` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -340,7 +340,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param type: The value can be either the ID of a type or a :param type: The value can be either the ID of a type or a
:class:`~openstack.block_storage.v3.type.Type` instance. :class:`~openstack.block_storage.v3.type.Type` 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.NotFoundException` will be
raised when the type does not exist. raised when the type 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 type. attempting to delete a nonexistent type.
@ -435,7 +435,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
instance. instance.
:returns: One :class:`~openstack.block_storage.v3.type.TypeEncryption` :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. when no resource can be found.
""" """
volume_type = self._get_resource(_type.Type, volume_type_id) volume_type = self._get_resource(_type.Type, volume_type_id)
@ -481,7 +481,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
instance. Required if encryption_id is None. instance. Required if encryption_id is None.
: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.NotFoundException` will be
raised when the type does not exist. raised when the type 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 type. attempting to delete a nonexistent type.
@ -540,7 +540,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:class:`~openstack.block_storage.v3.volume.Volume` instance. :class:`~openstack.block_storage.v3.volume.Volume` instance.
:returns: One :class:`~openstack.block_storage.v3.volume.Volume` :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. when no resource can be found.
""" """
return self._get(_volume.Volume, volume) return self._get(_volume.Volume, volume)
@ -557,7 +557,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param snapshot: The name or ID a volume :param snapshot: The name or ID a volume
:param bool ignore_missing: When set to ``False`` :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 the volume does not exist.
:param bool details: When set to ``False`` no extended attributes :param bool details: When set to ``False`` no extended attributes
will be returned. The default, ``True``, will cause objects with will be returned. The default, ``True``, will cause objects with
@ -567,7 +567,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
a higher chance of duplicates. Admin-only by default. a higher chance of duplicates. Admin-only by default.
:returns: One :class:`~openstack.block_storage.v3.volume.Volume` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -624,7 +624,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param volume: The value can be either the ID of a volume or a :param volume: The value can be either the ID of a volume or a
:class:`~openstack.block_storage.v3.volume.Volume` instance. :class:`~openstack.block_storage.v3.volume.Volume` 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.NotFoundException` will be
raised when the volume does not exist. raised when the volume 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 volume. attempting to delete a nonexistent volume.
@ -1066,7 +1066,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:class:`~attachment.Attachment` instance. :class:`~attachment.Attachment` instance.
:returns: One :class:`~attachment.Attachment` :returns: One :class:`~attachment.Attachment`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_attachment.Attachment, attachment) return self._get(_attachment.Attachment, attachment)
@ -1094,7 +1094,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:class:`~openstack.block_storage.v3.attachment.Attachment` :class:`~openstack.block_storage.v3.attachment.Attachment`
instance. 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.NotFoundException` will be
raised when the attachment does not exist. raised when the attachment 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 attachment. attempting to delete a nonexistent attachment.
@ -1196,14 +1196,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param snapshot: The name or ID a backup :param snapshot: The name or ID a backup
:param bool ignore_missing: When set to ``False`` :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. when the backup does not exist.
:param bool details: When set to ``False`` no additional details will :param bool details: When set to ``False`` no additional details will
be returned. The default, ``True``, will cause objects with be returned. The default, ``True``, will cause objects with
additional attributes to be returned. additional attributes to be returned.
:returns: One :class:`~openstack.block_storage.v3.backup.Backup` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1234,7 +1234,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param backup: The value can be the ID of a backup or a :param backup: The value can be the ID of a backup or a
:class:`~openstack.block_storage.v3.backup.Backup` instance :class:`~openstack.block_storage.v3.backup.Backup` instance
:param bool ignore_missing: When set to ``False`` :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. the zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone. delete a nonexistent zone.
@ -1300,7 +1300,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: One :class: :returns: One :class:
`~openstack.block_storage.v3.capabilites.Capabilities` instance. `~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. resource can be found.
""" """
return self._get(_capabilities.Capabilities, host) return self._get(_capabilities.Capabilities, host)
@ -1323,14 +1323,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param name_or_id: The name or ID of a group. :param name_or_id: The name or ID of a group.
:param bool ignore_missing: When set to ``False`` :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. when the group snapshot does not exist.
:param bool details: When set to ``False``, no additional details will :param bool details: When set to ``False``, no additional details will
be returned. The default, ``True``, will cause additional details be returned. The default, ``True``, will cause additional details
to be returned. to be returned.
:returns: One :class:`~openstack.block_storage.v3.group.Group` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1462,14 +1462,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param name_or_id: The name or ID of a group snapshot. :param name_or_id: The name or ID of a group snapshot.
:param bool ignore_missing: When set to ``False`` :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. when the group snapshot does not exist.
:param bool details: When set to ``False``, no additional details will :param bool details: When set to ``False``, no additional details will
be returned. The default, ``True``, will cause additional details be returned. The default, ``True``, will cause additional details
to be returned. to be returned.
:returns: One :class:`~openstack.block_storage.v3.group_snapshot` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1550,7 +1550,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: One :class: :returns: One :class:
`~openstack.block_storage.v3.group_type.GroupType` instance. `~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. resource can be found.
""" """
return self._get(_group_type.GroupType, group_type) return self._get(_group_type.GroupType, group_type)
@ -1560,12 +1560,12 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param name_or_id: The name or ID of a group type. :param name_or_id: The name or ID of a group type.
:param bool ignore_missing: When set to ``False`` :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. when the group type does not exist.
:returns: One :returns: One
:class:`~openstack.block_storage.v3.group_type.GroupType` :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. resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1617,7 +1617,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
or a :class:`~openstack.block_storage.v3.group_type.GroupType` or a :class:`~openstack.block_storage.v3.group_type.GroupType`
instance. instance.
:param bool ignore_missing: When set to ``False`` :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. the zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone. delete a nonexistent zone.
@ -1713,7 +1713,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param dict query: Additional query parameters to use. :param dict query: Additional query parameters to use.
:returns: One :class:`~openstack.block_storage.v3.quota_set.QuotaSet` :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. when no resource can be found.
""" """
project = self._get_resource(_project.Project, project) project = self._get_resource(_project.Project, project)
@ -1730,7 +1730,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
which the quota should be retrieved which the quota should be retrieved
:returns: One :class:`~openstack.block_storage.v3.quota_set.QuotaSet` :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. when no resource can be found.
""" """
project = self._get_resource(_project.Project, project) project = self._get_resource(_project.Project, project)
@ -1810,14 +1810,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param name_or_id: The name or ID of a service :param name_or_id: The name or ID of a service
:param bool ignore_missing: When set to ``False`` :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. the resource does not exist.
When set to ``True``, None will be returned when attempting to find When set to ``True``, None will be returned when attempting to find
a nonexistent resource. a nonexistent resource.
:param dict query: Additional attributes like 'host' :param dict query: Additional attributes like 'host'
:returns: One: class:`~openstack.block_storage.v3.service.Service` or None :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1854,8 +1854,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: Updated service instance :returns: Updated service instance
:rtype: class: `~openstack.block_storage.v3.service.Service` :rtype: class: `~openstack.block_storage.v3.service.Service`
""" """
service = self._get_resource(_service.Service, service) service_obj = self._get_resource(_service.Service, service)
return service.enable(self) return service_obj.enable(self)
def disable_service( def disable_service(
self, self,
@ -1872,8 +1872,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: Updated service instance :returns: Updated service instance
:rtype: class: `~openstack.block_storage.v3.service.Service` :rtype: class: `~openstack.block_storage.v3.service.Service`
""" """
service = self._get_resource(_service.Service, service) service_obj = self._get_resource(_service.Service, service)
return service.disable(self, reason=reason) return service_obj.disable(self, reason=reason)
def thaw_service( def thaw_service(
self, self,
@ -1887,8 +1887,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: Updated service instance :returns: Updated service instance
:rtype: class: `~openstack.block_storage.v3.service.Service` :rtype: class: `~openstack.block_storage.v3.service.Service`
""" """
service = self._get_resource(_service.Service, service) service_obj = self._get_resource(_service.Service, service)
return service.thaw(self) return service_obj.thaw(self)
def freeze_service( def freeze_service(
self, self,
@ -1902,8 +1902,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: Updated service instance :returns: Updated service instance
:rtype: class: `~openstack.block_storage.v3.service.Service` :rtype: class: `~openstack.block_storage.v3.service.Service`
""" """
service = self._get_resource(_service.Service, service) service_obj = self._get_resource(_service.Service, service)
return service.freeze(self) return service_obj.freeze(self)
def failover_service( def failover_service(
self, self,
@ -1922,8 +1922,10 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:returns: Updated service instance :returns: Updated service instance
:rtype: class: `~openstack.block_storage.v3.service.Service` :rtype: class: `~openstack.block_storage.v3.service.Service`
""" """
service = self._get_resource(_service.Service, service) service_obj = self._get_resource(_service.Service, service)
return service.failover(self, cluster=cluster, backend_id=backend_id) return service_obj.failover(
self, cluster=cluster, backend_id=backend_id
)
# ====== RESOURCE FILTERS ====== # ====== RESOURCE FILTERS ======
def resource_filters(self, **query): def resource_filters(self, **query):
@ -1963,7 +1965,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param transfer: The value can be either the ID of a transfer or a :param transfer: The value can be either the ID of a transfer or a
:class:`~openstack.block_storage.v3.transfer.Transfer`` instance. :class:`~openstack.block_storage.v3.transfer.Transfer`` 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.NotFoundException` will be
raised when the transfer does not exist. raised when the transfer 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 transfer. attempting to delete a nonexistent transfer.
@ -1981,11 +1983,11 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
:param name_or_id: The name or ID a transfer :param name_or_id: The name or ID a transfer
:param bool ignore_missing: When set to ``False`` :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. when the volume transfer does not exist.
:returns: One :class:`~openstack.block_storage.v3.transfer.Transfer` :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. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -2004,7 +2006,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy):
instance. instance.
:returns: One :class:`~openstack.block_storage.v3.transfer.Transfer` :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. when no resource can be found.
""" """
return self._get(_transfer.Transfer, transfer) return self._get(_transfer.Transfer, transfer)

@ -86,7 +86,7 @@ class Service(resource.Resource):
if ignore_missing: if ignore_missing:
return None return None
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f"No {cls.__name__} found for {name_or_id}" f"No {cls.__name__} found for {name_or_id}"
) )

@ -130,7 +130,7 @@ class Transfer(resource.Resource):
:return: This :class:`Resource` instance. :return: This :class:`Resource` instance.
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
:data:`Resource.allow_fetch` is not set to ``True``. :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. the resource was not found.
""" """
@ -162,7 +162,7 @@ class Transfer(resource.Resource):
:return: This :class:`Resource` instance. :return: This :class:`Resource` instance.
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
:data:`Resource.allow_commit` is not set to ``True``. :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. the resource was not found.
""" """

@ -325,7 +325,7 @@ class ComputeCloudMixin:
try: try:
self.compute.remove_security_group_from_server(server, sg) 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 # NOTE(jamielennox): Is this ok? If we remove something that
# isn't present should we just conclude job done or is that an # 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. # error? Nova returns ok if you try to add a group twice.
@ -561,7 +561,7 @@ class ComputeCloudMixin:
try: try:
server = self.compute.get_server(id) server = self.compute.get_server(id)
return meta.add_server_interfaces(self, server) return meta.add_server_interfaces(self, server)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
return None return None
def get_server_group(self, name_or_id=None, filters=None): def get_server_group(self, name_or_id=None, filters=None):
@ -612,7 +612,7 @@ class ComputeCloudMixin:
""" """
try: try:
self.compute.delete_keypair(name, ignore_missing=False) self.compute.delete_keypair(name, ignore_missing=False)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug("Keypair %s not found for deleting", name) self.log.debug("Keypair %s not found for deleting", name)
return False return False
return True return True
@ -1399,7 +1399,7 @@ class ComputeCloudMixin:
try: try:
self.compute.delete_server(server) self.compute.delete_server(server)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
return False return False
except Exception: except Exception:
raise raise
@ -1708,7 +1708,7 @@ class ComputeCloudMixin:
try: try:
self.compute.delete_aggregate(name_or_id, ignore_missing=False) self.compute.delete_aggregate(name_or_id, ignore_missing=False)
return True return True
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug("Aggregate %s not found for deleting", name_or_id) self.log.debug("Aggregate %s not found for deleting", name_or_id)
return False return False

@ -439,7 +439,7 @@ class FloatingIPCloudMixin:
if network_name_or_id: if network_name_or_id:
try: try:
network = self.network.find_network(network_name_or_id) network = self.network.find_network(network_name_or_id)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
raise exceptions.NotFoundException( raise exceptions.NotFoundException(
"unable to find network for floating ips with ID " "unable to find network for floating ips with ID "
"{}".format(network_name_or_id) "{}".format(network_name_or_id)
@ -592,7 +592,7 @@ class FloatingIPCloudMixin:
def _neutron_delete_floating_ip(self, floating_ip_id): def _neutron_delete_floating_ip(self, floating_ip_id):
try: try:
self.network.delete_ip(floating_ip_id, ignore_missing=False) self.network.delete_ip(floating_ip_id, ignore_missing=False)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
return False return False
return True return True

@ -778,7 +778,7 @@ class NetworkCloudMixin:
self.network.delete_firewall_rule( self.network.delete_firewall_rule(
firewall_rule, ignore_missing=False firewall_rule, ignore_missing=False
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug( self.log.debug(
'Firewall rule %s not found for deleting', name_or_id 'Firewall rule %s not found for deleting', name_or_id
) )
@ -938,7 +938,7 @@ class NetworkCloudMixin:
:param bool shared: Visibility to other projects. :param bool shared: Visibility to other projects.
Defaults to False. Defaults to False.
:raises: BadRequestException if parameters are malformed :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. :returns: The created network ``FirewallPolicy`` object.
""" """
if 'firewall_rules' in kwargs: if 'firewall_rules' in kwargs:
@ -982,7 +982,7 @@ class NetworkCloudMixin:
self.network.delete_firewall_policy( self.network.delete_firewall_policy(
firewall_policy, ignore_missing=False firewall_policy, ignore_missing=False
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug( self.log.debug(
'Firewall policy %s not found for deleting', name_or_id 'Firewall policy %s not found for deleting', name_or_id
) )
@ -1078,7 +1078,7 @@ class NetworkCloudMixin:
:returns: The updated network ``FirewallPolicy`` object. :returns: The updated network ``FirewallPolicy`` object.
:raises: BadRequestException if parameters are malformed :raises: BadRequestException if parameters are malformed
:raises: DuplicateResource on multiple matches :raises: DuplicateResource on multiple matches
:raises: ResourceNotFound if resource is not found :raises: NotFoundException if resource is not found
""" """
if not filters: if not filters:
filters = {} filters = {}
@ -1115,7 +1115,7 @@ class NetworkCloudMixin:
:param insert_before: rule name or id that should succeed added rule :param insert_before: rule name or id that should succeed added rule
:param dict filters: optional filters :param dict filters: optional filters
:raises: DuplicateResource on multiple matches :raises: DuplicateResource on multiple matches
:raises: ResourceNotFound if firewall policy or any of the firewall :raises: NotFoundException if firewall policy or any of the firewall
rules (inserted, after, before) is not found. rules (inserted, after, before) is not found.
:return: updated firewall policy :return: updated firewall policy
:rtype: FirewallPolicy :rtype: FirewallPolicy
@ -1166,7 +1166,7 @@ class NetworkCloudMixin:
:param rule_name_or_id: firewall rule name or id :param rule_name_or_id: firewall rule name or id
:param dict filters: optional filters :param dict filters: optional filters
:raises: DuplicateResource on multiple matches :raises: DuplicateResource on multiple matches
:raises: ResourceNotFound if firewall policy is not found :raises: NotFoundException if firewall policy is not found
:return: updated firewall policy :return: updated firewall policy
:rtype: FirewallPolicy :rtype: FirewallPolicy
""" """
@ -1228,7 +1228,7 @@ class NetworkCloudMixin:
:param shared: Visibility to other projects. Defaults to False. :param shared: Visibility to other projects. Defaults to False.
:raises: BadRequestException if parameters are malformed :raises: BadRequestException if parameters are malformed
:raises: DuplicateResource on multiple matches :raises: DuplicateResource on multiple matches
:raises: ResourceNotFound if (ingress-, egress-) firewall policy or :raises: NotFoundException if (ingress-, egress-) firewall policy or
a port is not found. a port is not found.
:returns: The created network ``FirewallGroup`` object. :returns: The created network ``FirewallGroup`` object.
""" """
@ -1257,7 +1257,7 @@ class NetworkCloudMixin:
self.network.delete_firewall_group( self.network.delete_firewall_group(
firewall_group, ignore_missing=False firewall_group, ignore_missing=False
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug( self.log.debug(
'Firewall group %s not found for deleting', name_or_id 'Firewall group %s not found for deleting', name_or_id
) )
@ -1315,7 +1315,7 @@ class NetworkCloudMixin:
:returns: The updated network ``FirewallGroup`` object. :returns: The updated network ``FirewallGroup`` object.
:raises: BadRequestException if parameters are malformed :raises: BadRequestException if parameters are malformed
:raises: DuplicateResource on multiple matches :raises: DuplicateResource on multiple matches
:raises: ResourceNotFound if firewall group, a firewall policy :raises: NotFoundException if firewall group, a firewall policy
(egress, ingress) or port is not found (egress, ingress) or port is not found
""" """
if not filters: if not filters:
@ -1339,7 +1339,7 @@ class NetworkCloudMixin:
:param dict firewall_group: firewall group dict :param dict firewall_group: firewall group dict
:raises: DuplicateResource on multiple matches :raises: DuplicateResource on multiple matches
:raises: ResourceNotFound if a firewall policy is not found :raises: NotFoundException if a firewall policy is not found
""" """
for key in ('egress_firewall_policy', 'ingress_firewall_policy'): for key in ('egress_firewall_policy', 'ingress_firewall_policy'):
if key not in firewall_group: if key not in firewall_group:
@ -1665,7 +1665,7 @@ class NetworkCloudMixin:
self.network.delete_qos_bandwidth_limit_rule( self.network.delete_qos_bandwidth_limit_rule(
rule_id, policy, ignore_missing=False rule_id, policy, ignore_missing=False
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug( self.log.debug(
"QoS bandwidth limit rule {rule_id} not found in policy " "QoS bandwidth limit rule {rule_id} not found in policy "
"{policy_id}. Ignoring.".format( "{policy_id}. Ignoring.".format(
@ -1855,7 +1855,7 @@ class NetworkCloudMixin:
self.network.delete_qos_dscp_marking_rule( self.network.delete_qos_dscp_marking_rule(
rule_id, policy, ignore_missing=False rule_id, policy, ignore_missing=False
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug( self.log.debug(
"QoS DSCP marking rule {rule_id} not found in policy " "QoS DSCP marking rule {rule_id} not found in policy "
"{policy_id}. Ignoring.".format( "{policy_id}. Ignoring.".format(
@ -2058,7 +2058,7 @@ class NetworkCloudMixin:
self.network.delete_qos_minimum_bandwidth_rule( self.network.delete_qos_minimum_bandwidth_rule(
rule_id, policy, ignore_missing=False rule_id, policy, ignore_missing=False
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
self.log.debug( self.log.debug(
"QoS minimum bandwidth rule {rule_id} not found in policy " "QoS minimum bandwidth rule {rule_id} not found in policy "
"{policy_id}. Ignoring.".format( "{policy_id}. Ignoring.".format(
@ -2804,7 +2804,7 @@ class NetworkCloudMixin:
:param list[str] name_or_id_list: list of port names or ids :param list[str] name_or_id_list: list of port names or ids
:param dict filters: optional filters :param dict filters: optional filters
:raises: SDKException on multiple matches :raises: SDKException on multiple matches
:raises: ResourceNotFound if a port is not found :raises: NotFoundException if a port is not found
:return: list of port ids :return: list of port ids
:rtype: list[str] :rtype: list[str]
""" """
@ -2812,7 +2812,7 @@ class NetworkCloudMixin:
for name_or_id in name_or_id_list: for name_or_id in name_or_id_list:
port = self.get_port(name_or_id, filters) port = self.get_port(name_or_id, filters)
if not port: if not port:
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f'Port {name_or_id} not found' f'Port {name_or_id} not found'
) )
ids_list.append(port['id']) ids_list.append(port['id'])

@ -456,7 +456,7 @@ class ObjectStoreCloudMixin:
yield from self.object_store.stream_object( yield from self.object_store.stream_object(
obj, container, chunk_size=resp_chunk_size obj, container, chunk_size=resp_chunk_size
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
return return
def get_object( def get_object(
@ -498,7 +498,7 @@ class ObjectStoreCloudMixin:
headers = {k.lower(): v for k, v in obj._last_headers.items()} headers = {k.lower(): v for k, v in obj._last_headers.items()}
return (headers, obj.data) return (headers, obj.data)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
return None return None
def _wait_for_futures(self, futures, raise_on_error=True): def _wait_for_futures(self, futures, raise_on_error=True):

@ -584,7 +584,7 @@ class _OpenStackCloudMixin:
resource_type, name_or_id, *get_args, **get_kwargs resource_type, name_or_id, *get_args, **get_kwargs
) )
return [resource_by_id] return [resource_by_id]
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
pass pass
if not filters: if not filters:

@ -27,7 +27,7 @@ class AsyncResource(resource.Resource):
to populate the `Action` with status information. to populate the `Action` with status information.
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
:data:`Resource.allow_commit` is not set to ``True``. :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. the resource was not found.
""" """
response = self._raw_delete(session) response = self._raw_delete(session)

@ -68,7 +68,7 @@ class Proxy(proxy.Proxy):
:returns: A :class:`~openstack.clustering.v1.profile_type.ProfileType` :returns: A :class:`~openstack.clustering.v1.profile_type.ProfileType`
object. object.
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
profile_type matching the name could be found. profile_type matching the name could be found.
""" """
return self._get(_profile_type.ProfileType, profile_type) return self._get(_profile_type.ProfileType, profile_type)
@ -89,7 +89,7 @@ class Proxy(proxy.Proxy):
:returns: A :class:`~openstack.clustering.v1.policy_type.PolicyType` :returns: A :class:`~openstack.clustering.v1.policy_type.PolicyType`
object. object.
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
policy_type matching the name could be found. policy_type matching the name could be found.
""" """
return self._get(_policy_type.PolicyType, policy_type) return self._get(_policy_type.PolicyType, policy_type)
@ -112,7 +112,7 @@ class Proxy(proxy.Proxy):
:param profile: The value can be either the name or ID of a profile or :param profile: The value can be either the name or ID of a profile or
a :class:`~openstack.clustering.v1.profile.Profile` instance. a :class:`~openstack.clustering.v1.profile.Profile` instance.
:param bool ignore_missing: When set to ``False``, an exception :param bool ignore_missing: When set to ``False``, an exception
:class:`~openstack.exceptions.ResourceNotFound` will be raised when :class:`~openstack.exceptions.NotFoundException` will be raised when
the profile could not be found. When set to ``True``, no exception the profile could not be found. When set to ``True``, no exception
will be raised when attempting to delete a non-existent profile. will be raised when attempting to delete a non-existent profile.
@ -125,7 +125,7 @@ class Proxy(proxy.Proxy):
:param str name_or_id: The name or ID of a profile. :param str name_or_id: The name or ID of a profile.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -143,7 +143,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.clustering.v1.profile.Profile` instance. :class:`~openstack.clustering.v1.profile.Profile` instance.
:returns: One :class:`~openstack.clustering.v1.profile.Profile` :returns: One :class:`~openstack.clustering.v1.profile.Profile`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
profile matching the criteria could be found. profile matching the criteria could be found.
""" """
return self._get(_profile.Profile, profile) return self._get(_profile.Profile, profile)
@ -219,7 +219,7 @@ class Proxy(proxy.Proxy):
:param cluster: The value can be either the name or ID of a cluster or :param cluster: The value can be either the name or ID of a cluster or
a :class:`~openstack.cluster.v1.cluster.Cluster` instance. a :class:`~openstack.cluster.v1.cluster.Cluster` instance.
:param bool ignore_missing: When set to ``False``, an exception :param bool ignore_missing: When set to ``False``, an exception
:class:`~openstack.exceptions.ResourceNotFound` will be raised when :class:`~openstack.exceptions.NotFoundException` will be raised when
the cluster could not be found. When set to ``True``, no exception the cluster could not be found. When set to ``True``, no exception
will be raised when attempting to delete a non-existent cluster. will be raised when attempting to delete a non-existent cluster.
:param bool force_delete: When set to ``True``, the cluster deletion :param bool force_delete: When set to ``True``, the cluster deletion
@ -241,7 +241,7 @@ class Proxy(proxy.Proxy):
:param str name_or_id: The name or ID of a cluster. :param str name_or_id: The name or ID of a cluster.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -259,7 +259,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.clustering.v1.cluster.Cluster` instance. :class:`~openstack.clustering.v1.cluster.Cluster` instance.
:returns: One :class:`~openstack.clustering.v1.cluster.Cluster` :returns: One :class:`~openstack.clustering.v1.cluster.Cluster`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
cluster matching the criteria could be found. cluster matching the criteria could be found.
""" """
return self._get(_cluster.Cluster, cluster) return self._get(_cluster.Cluster, cluster)
@ -560,7 +560,7 @@ class Proxy(proxy.Proxy):
:param node: The value can be either the name or ID of a node or a :param node: The value can be either the name or ID of a node or a
:class:`~openstack.cluster.v1.node.Node` instance. :class:`~openstack.cluster.v1.node.Node` instance.
:param bool ignore_missing: When set to ``False``, an exception :param bool ignore_missing: When set to ``False``, an exception
:class:`~openstack.exceptions.ResourceNotFound` will be raised when :class:`~openstack.exceptions.NotFoundException` will be raised when
the node could not be found. When set to ``True``, no exception the node could not be found. When set to ``True``, no exception
will be raised when attempting to delete a non-existent node. will be raised when attempting to delete a non-existent node.
:param bool force_delete: When set to ``True``, the node deletion :param bool force_delete: When set to ``True``, the node deletion
@ -582,7 +582,7 @@ class Proxy(proxy.Proxy):
:param str name_or_id: The name or ID of a node. :param str name_or_id: The name or ID of a node.
: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.NotFoundException` will be
raised when the specified node does not exist. raised when the specified node does not exist.
when set to "True", None will be returned when when set to "True", None will be returned when
attempting to find a nonexistent policy attempting to find a nonexistent policy
@ -602,7 +602,7 @@ class Proxy(proxy.Proxy):
server should return more details when retrieving the node data. server should return more details when retrieving the node data.
:returns: One :class:`~openstack.clustering.v1.node.Node` :returns: One :class:`~openstack.clustering.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. node matching the name or ID could be found.
""" """
# NOTE: When retrieving node with details (using NodeDetail resource), # NOTE: When retrieving node with details (using NodeDetail resource),
@ -741,7 +741,7 @@ class Proxy(proxy.Proxy):
:param policy: The value can be either the name or ID of a policy or a :param policy: The value can be either the name or ID of a policy or a
:class:`~openstack.clustering.v1.policy.Policy` instance. :class:`~openstack.clustering.v1.policy.Policy` instance.
:param bool ignore_missing: When set to ``False``, an exception :param bool ignore_missing: When set to ``False``, an exception
:class:`~openstack.exceptions.ResourceNotFound` will be raised when :class:`~openstack.exceptions.NotFoundException` will be raised when
the policy could not be found. When set to ``True``, no exception the policy could not be found. When set to ``True``, no exception
will be raised when attempting to delete a non-existent policy. will be raised when attempting to delete a non-existent policy.
@ -754,7 +754,7 @@ class Proxy(proxy.Proxy):
:param str name_or_id: The name or ID of a policy. :param str name_or_id: The name or ID of a policy.
: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.NotFoundException` will be
raised when the specified policy does not exist. raised when the specified policy does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent policy. attempting to find a nonexistent policy.
@ -773,7 +773,7 @@ class Proxy(proxy.Proxy):
:returns: A policy object. :returns: A policy object.
:rtype: :class:`~openstack.clustering.v1.policy.Policy` :rtype: :class:`~openstack.clustering.v1.policy.Policy`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
policy matching the criteria could be found. policy matching the criteria could be found.
""" """
return self._get(_policy.Policy, policy) return self._get(_policy.Policy, policy)
@ -856,7 +856,7 @@ class Proxy(proxy.Proxy):
:returns: a cluster-policy binding object. :returns: a cluster-policy binding object.
:rtype: :class:`~openstack.clustering.v1.cluster_policy.CLusterPolicy` :rtype: :class:`~openstack.clustering.v1.cluster_policy.CLusterPolicy`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
cluster-policy binding matching the criteria could be found. cluster-policy binding matching the criteria could be found.
""" """
return self._get( return self._get(
@ -893,7 +893,7 @@ class Proxy(proxy.Proxy):
:param receiver: The value can be either the name or ID of a receiver :param receiver: The value can be either the name or ID of a receiver
or a :class:`~openstack.clustering.v1.receiver.Receiver` instance. or a :class:`~openstack.clustering.v1.receiver.Receiver` instance.
:param bool ignore_missing: When set to ``False``, an exception :param bool ignore_missing: When set to ``False``, an exception
:class:`~openstack.exceptions.ResourceNotFound` will be raised when :class:`~openstack.exceptions.NotFoundException` will be raised when
the receiver could not be found. When set to ``True``, no exception the receiver could not be found. When set to ``True``, no exception
will be raised when attempting to delete a non-existent receiver. will be raised when attempting to delete a non-existent receiver.
@ -908,7 +908,7 @@ class Proxy(proxy.Proxy):
:param str name_or_id: The name or ID of a receiver. :param str name_or_id: The name or ID of a receiver.
: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.NotFoundException` will be
raised when the specified receiver does not exist. When raised when the specified receiver does not exist. When
set to ``True``, None will be returned when attempting to set to ``True``, None will be returned when attempting to
find a nonexistent receiver. find a nonexistent receiver.
@ -927,7 +927,7 @@ class Proxy(proxy.Proxy):
:returns: A receiver object. :returns: A receiver object.
:rtype: :class:`~openstack.clustering.v1.receiver.Receiver` :rtype: :class:`~openstack.clustering.v1.receiver.Receiver`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
receiver matching the criteria could be found. receiver matching the criteria could be found.
""" """
return self._get(_receiver.Receiver, receiver) return self._get(_receiver.Receiver, receiver)
@ -960,7 +960,7 @@ class Proxy(proxy.Proxy):
:returns: an action object. :returns: an action object.
:rtype: :class:`~openstack.clustering.v1.action.Action` :rtype: :class:`~openstack.clustering.v1.action.Action`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
action matching the criteria could be found. action matching the criteria could be found.
""" """
return self._get(_action.Action, action) return self._get(_action.Action, action)
@ -1011,7 +1011,7 @@ class Proxy(proxy.Proxy):
:returns: an event object. :returns: an event object.
:rtype: :class:`~openstack.clustering.v1.event.Event` :rtype: :class:`~openstack.clustering.v1.event.Event`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
event matching the criteria could be found. event matching the criteria could be found.
""" """
return self._get(_event.Event, event) return self._get(_event.Event, event)
@ -1106,7 +1106,7 @@ class Proxy(proxy.Proxy):
:returns: A :class:`~openstack.clustering.v1.profile_type.ProfileType` :returns: A :class:`~openstack.clustering.v1.profile_type.ProfileType`
object. object.
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
profile_type matching the name could be found. profile_type matching the name could be found.
""" """
obj = self._get_resource(_profile_type.ProfileType, profile_type) obj = self._get_resource(_profile_type.ProfileType, profile_type)

@ -75,14 +75,14 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of an extension. :param name_or_id: The name or ID of an extension.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
:returns: One :class:`~openstack.compute.v2.extension.Extension` or :returns: One :class:`~openstack.compute.v2.extension.Extension` or
None None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -116,7 +116,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a flavor. :param name_or_id: The name or ID of a flavor.
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:param bool get_extra_specs: When set to ``True`` and extra_specs not :param bool get_extra_specs: When set to ``True`` and extra_specs not
@ -126,7 +126,7 @@ class Proxy(proxy.Proxy):
the flavors being returned. the flavors being returned.
:returns: One :class:`~openstack.compute.v2.flavor.Flavor` or None :returns: One :class:`~openstack.compute.v2.flavor.Flavor` or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -159,7 +159,7 @@ class Proxy(proxy.Proxy):
:param flavor: The value can be either the ID of a flavor or a :param flavor: The value can be either the ID of a flavor or a
:class:`~openstack.compute.v2.flavor.Flavor` instance. :class:`~openstack.compute.v2.flavor.Flavor` 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.NotFoundException` will be
raised when the flavor does not exist. raised when the flavor 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 flavor. attempting to delete a nonexistent flavor.
@ -191,7 +191,7 @@ class Proxy(proxy.Proxy):
extra_specs. extra_specs.
:returns: One :class:`~openstack.compute.v2.flavor.Flavor` :returns: One :class:`~openstack.compute.v2.flavor.Flavor`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
flavor = self._get(_flavor.Flavor, flavor) flavor = self._get(_flavor.Flavor, flavor)
@ -334,7 +334,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.compute.v2.aggregate.Aggregate` instance. :class:`~openstack.compute.v2.aggregate.Aggregate` instance.
:returns: One :class:`~openstack.compute.v2.aggregate.Aggregate` :returns: One :class:`~openstack.compute.v2.aggregate.Aggregate`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_aggregate.Aggregate, aggregate) return self._get(_aggregate.Aggregate, aggregate)
@ -344,13 +344,13 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of an aggregate. :param name_or_id: The name or ID of an aggregate.
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:returns: One :class:`~openstack.compute.v2.aggregate.Aggregate` :returns: One :class:`~openstack.compute.v2.aggregate.Aggregate`
or None or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -393,7 +393,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.compute.v2.aggregate.Aggregate` :class:`~openstack.compute.v2.aggregate.Aggregate`
instance. 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.NotFoundException` will be
raised when the aggregate does not exist. raised when the aggregate 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 aggregate. attempting to delete a nonexistent aggregate.
@ -473,7 +473,7 @@ class Proxy(proxy.Proxy):
:param image: The value can be either the ID of an image or a :param image: The value can be either the ID of an image or a
:class:`~openstack.compute.v2.image.Image` instance. :class:`~openstack.compute.v2.image.Image` 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.NotFoundException` will be
raised when the image does not exist. raised when the image 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 image. attempting to delete a nonexistent image.
@ -494,13 +494,13 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a image. :param name_or_id: The name or ID of a image.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
:returns: One :class:`~openstack.compute.v2.image.Image` or None :returns: One :class:`~openstack.compute.v2.image.Image` or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -523,7 +523,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.compute.v2.image.Image` instance. :class:`~openstack.compute.v2.image.Image` instance.
:returns: One :class:`~openstack.compute.v2.image.Image` :returns: One :class:`~openstack.compute.v2.image.Image`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
warnings.warn( warnings.warn(
@ -633,7 +633,7 @@ class Proxy(proxy.Proxy):
:param keypair: The value can be either the ID of a keypair or a :param keypair: The value can be either the ID of a keypair or a
:class:`~openstack.compute.v2.keypair.Keypair` instance. :class:`~openstack.compute.v2.keypair.Keypair` instance.
:param bool ignore_missing: When set to ``False`` :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 keypair does not exist. When set to ``True``, no exception the keypair does not exist. When set to ``True``, no exception
will be set when attempting to delete a nonexistent keypair. will be set when attempting to delete a nonexistent keypair.
:param str user_id: Optional user_id owning the keypair :param str user_id: Optional user_id owning the keypair
@ -656,7 +656,7 @@ class Proxy(proxy.Proxy):
:param str user_id: Optional user_id owning the keypair :param str user_id: Optional user_id owning the keypair
:returns: One :class:`~openstack.compute.v2.keypair.Keypair` :returns: One :class:`~openstack.compute.v2.keypair.Keypair`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
attrs = {'user_id': user_id} if user_id else {} attrs = {'user_id': user_id} if user_id else {}
@ -667,13 +667,13 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a keypair. :param name_or_id: The name or ID of a keypair.
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:param str user_id: Optional user_id owning the keypair :param str user_id: Optional user_id owning the keypair
:returns: One :class:`~openstack.compute.v2.keypair.Keypair` or None :returns: One :class:`~openstack.compute.v2.keypair.Keypair` or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -729,7 +729,7 @@ class Proxy(proxy.Proxy):
:param server: The value can be either the ID of a server or a :param server: The value can be either the ID of a server or a
:class:`~openstack.compute.v2.server.Server` instance. :class:`~openstack.compute.v2.server.Server` 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.NotFoundException` will be
raised when the server does not exist. raised when the server 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 server attempting to delete a nonexistent server
@ -756,7 +756,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a server. :param name_or_id: The name or ID of a server.
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:param bool details: When set to ``False`` :param bool details: When set to ``False``
@ -767,7 +767,7 @@ class Proxy(proxy.Proxy):
higher chance of duplicates. Admin-only by default. higher chance of duplicates. Admin-only by default.
:returns: One :class:`~openstack.compute.v2.server.Server` or None :returns: One :class:`~openstack.compute.v2.server.Server` or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -791,7 +791,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.compute.v2.server.Server` instance. :class:`~openstack.compute.v2.server.Server` instance.
:returns: One :class:`~openstack.compute.v2.server.Server` :returns: One :class:`~openstack.compute.v2.server.Server`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_server.Server, server) return self._get(_server.Server, server)
@ -1380,7 +1380,7 @@ class Proxy(proxy.Proxy):
server or a :class:`~openstack.compute.v2.server.Server` server or a :class:`~openstack.compute.v2.server.Server`
instance that the interface belongs to. instance that the interface belongs to.
: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.NotFoundException` will be
raised when the server interface does not exist. raised when the server interface 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 server interface. attempting to delete a nonexistent server interface.
@ -1415,7 +1415,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.compute.v2.server_interface.ServerInterface` :class:`~openstack.compute.v2.server_interface.ServerInterface`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
server_id = self._get_uri_attribute( server_id = self._get_uri_attribute(
@ -1561,7 +1561,7 @@ class Proxy(proxy.Proxy):
or a :class:`~openstack.compute.v2.server_group.ServerGroup` or a :class:`~openstack.compute.v2.server_group.ServerGroup`
instance. 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.NotFoundException` will be
raised when the server group does not exist. raised when the server group 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 server group. attempting to delete a nonexistent server group.
@ -1585,7 +1585,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a server group. :param name_or_id: The name or ID of a server group.
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:param bool all_projects: When set to ``True``, search for server :param bool all_projects: When set to ``True``, search for server
@ -1594,7 +1594,7 @@ class Proxy(proxy.Proxy):
:returns: One :class:`~openstack.compute.v2.server_group.ServerGroup` :returns: One :class:`~openstack.compute.v2.server_group.ServerGroup`
or None or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1618,7 +1618,7 @@ class Proxy(proxy.Proxy):
:returns: :returns:
A :class:`~openstack.compute.v2.server_group.ServerGroup` object. A :class:`~openstack.compute.v2.server_group.ServerGroup` object.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_server_group.ServerGroup, server_group) return self._get(_server_group.ServerGroup, server_group)
@ -1674,7 +1674,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a hypervisor :param name_or_id: The name or ID of a hypervisor
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:param bool details: When set to ``False`` :param bool details: When set to ``False``
@ -1683,7 +1683,7 @@ class Proxy(proxy.Proxy):
:returns: One: class:`~openstack.compute.v2.hypervisor.Hypervisor` :returns: One: class:`~openstack.compute.v2.hypervisor.Hypervisor`
or None or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1705,7 +1705,7 @@ class Proxy(proxy.Proxy):
:returns: :returns:
A :class:`~openstack.compute.v2.hypervisor.Hypervisor` object. A :class:`~openstack.compute.v2.hypervisor.Hypervisor` object.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_hypervisor.Hypervisor, hypervisor) return self._get(_hypervisor.Hypervisor, hypervisor)
@ -1719,7 +1719,7 @@ class Proxy(proxy.Proxy):
:returns: :returns:
A :class:`~openstack.compute.v2.hypervisor.Hypervisor` object. A :class:`~openstack.compute.v2.hypervisor.Hypervisor` object.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
hypervisor = self._get_resource(_hypervisor.Hypervisor, hypervisor) hypervisor = self._get_resource(_hypervisor.Hypervisor, hypervisor)
@ -1819,14 +1819,14 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or id of a service :param name_or_id: The name or id of a service
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
:param dict query: Additional attributes like 'host' :param dict query: Additional attributes like 'host'
:returns: One: class:`~openstack.compute.v2.service.Service` or None :returns: One: class:`~openstack.compute.v2.service.Service` or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.
@ -1845,7 +1845,7 @@ class Proxy(proxy.Proxy):
The value can be either the ID of a service or a The value can be either the ID of a service or a
:class:`~openstack.compute.v2.service.Service` instance. :class:`~openstack.compute.v2.service.Service` instance.
:param bool ignore_missing: When set to ``False`` :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 service does not exist. When set to ``True``, no exception the service does not exist. When set to ``True``, no exception
will be set when attempting to delete a nonexistent service. will be set when attempting to delete a nonexistent service.
@ -2024,7 +2024,7 @@ class Proxy(proxy.Proxy):
:param volume: The value can be the ID of a volume or a :param volume: The value can be the ID of a volume or a
:class:`~openstack.block_storage.v3.volume.Volume` instance. :class:`~openstack.block_storage.v3.volume.Volume` instance.
:param bool ignore_missing: When set to ``False`` :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 volume attachment does not exist. When set to ``True``, no the volume attachment does not exist. When set to ``True``, no
exception will be set when attempting to delete a nonexistent exception will be set when attempting to delete a nonexistent
volume attachment. volume attachment.
@ -2058,7 +2058,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.compute.v2.volume_attachment.VolumeAttachment` :class:`~openstack.compute.v2.volume_attachment.VolumeAttachment`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
server_id = resource.Resource._get_id(server) server_id = resource.Resource._get_id(server)
@ -2151,7 +2151,7 @@ class Proxy(proxy.Proxy):
server or a :class:`~openstack.compute.v2.server.Server` instance server or a :class:`~openstack.compute.v2.server.Server` instance
that the migration belongs to. that the migration belongs to.
:param bool ignore_missing: When set to ``False`` :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 server migration does not exist. When set to ``True``, no the server migration does not exist. When set to ``True``, no
exception will be set when attempting to delete a nonexistent exception will be set when attempting to delete a nonexistent
server migration. server migration.
@ -2215,14 +2215,14 @@ class Proxy(proxy.Proxy):
:class:`~openstack.compute.v2.server.Server` instance that the :class:`~openstack.compute.v2.server.Server` instance that the
migration belongs to. migration belongs to.
:param bool ignore_missing: When set to ``False`` :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 server migration does not exist. When set to ``True``, no the server migration does not exist. When set to ``True``, no
exception will be set when attempting to delete a nonexistent exception will be set when attempting to delete a nonexistent
server migration. server migration.
:returns: One :returns: One
:class:`~openstack.compute.v2.server_migration.ServerMigration` :class:`~openstack.compute.v2.server_migration.ServerMigration`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
server_id = self._get_uri_attribute( server_id = self._get_uri_attribute(
@ -2279,7 +2279,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.compute.v2.server_diagnostics.ServerDiagnostics` :class:`~openstack.compute.v2.server_diagnostics.ServerDiagnostics`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
server_id = self._get_resource(_server.Server, server).id server_id = self._get_resource(_server.Server, server).id
@ -2416,7 +2416,7 @@ class Proxy(proxy.Proxy):
:param dict query: Additional query parameters to use. :param dict query: Additional query parameters to use.
:returns: One :class:`~openstack.compute.v2.quota_set.QuotaSet` :returns: One :class:`~openstack.compute.v2.quota_set.QuotaSet`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
project = self._get_resource(_project.Project, project) project = self._get_resource(_project.Project, project)
@ -2435,7 +2435,7 @@ class Proxy(proxy.Proxy):
which the quota should be retrieved which the quota should be retrieved
:returns: One :class:`~openstack.compute.v2.quota_set.QuotaSet` :returns: One :class:`~openstack.compute.v2.quota_set.QuotaSet`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
project = self._get_resource(_project.Project, project) project = self._get_resource(_project.Project, project)
@ -2496,13 +2496,13 @@ class Proxy(proxy.Proxy):
:class:`~openstack.compute.v2.server.Server` instance that the :class:`~openstack.compute.v2.server.Server` instance that the
action is associated with. action is associated with.
:param bool ignore_missing: When set to ``False`` :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 server action does not exist. When set to ``True``, no the server action does not exist. When set to ``True``, no
exception will be set when attempting to retrieve a non-existent exception will be set when attempting to retrieve a non-existent
server action. server action.
:returns: One :class:`~openstack.compute.v2.server_action.ServerAction` :returns: One :class:`~openstack.compute.v2.server_action.ServerAction`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
server_id = self._get_uri_attribute(server_action, server, 'server_id') server_id = self._get_uri_attribute(server_action, server, 'server_id')

@ -83,7 +83,7 @@ class Service(resource.Resource):
if ignore_missing: if ignore_missing:
return None return None
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f"No {cls.__name__} found for {name_or_id}" f"No {cls.__name__} found for {name_or_id}"
) )

@ -51,7 +51,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.container_infrastructure_management.v1.cluster.Cluster` :class:`~openstack.container_infrastructure_management.v1.cluster.Cluster`
instance. instance.
:param bool ignore_missing: When set to ``False`` :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 cluster does not exist. When set to ``True``, no exception will the cluster does not exist. When set to ``True``, no exception will
be set when attempting to delete a nonexistent cluster. be set when attempting to delete a nonexistent cluster.
:returns: ``None`` :returns: ``None``
@ -63,7 +63,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a cluster. :param name_or_id: The name or ID of a cluster.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -86,7 +86,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.container_infrastructure_management.v1.cluster.Cluster` :class:`~openstack.container_infrastructure_management.v1.cluster.Cluster`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_cluster.Cluster, cluster) return self._get(_cluster.Cluster, cluster)
@ -139,7 +139,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate` :class:`~openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate`
instance. instance.
:param bool ignore_missing: When set to ``False`` :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 cluster_template does not exist. When set to ``True``, no the cluster_template does not exist. When set to ``True``, no
exception will be set when attempting to delete a nonexistent exception will be set when attempting to delete a nonexistent
cluster_template. cluster_template.
@ -156,7 +156,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a cluster_template. :param name_or_id: The name or ID of a cluster_template.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -180,7 +180,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate` :class:`~openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_cluster_template.ClusterTemplate, cluster_template) return self._get(_cluster_template.ClusterTemplate, cluster_template)
@ -237,7 +237,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.container_infrastructure_management.v1.cluster_certificate.ClusterCertificate` :class:`~openstack.container_infrastructure_management.v1.cluster_certificate.ClusterCertificate`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_cluster_cert.ClusterCertificate, cluster_certificate) return self._get(_cluster_cert.ClusterCertificate, cluster_certificate)

@ -134,7 +134,7 @@ class Cluster(resource.Resource):
:param nodes_to_remove: The server ID list will be removed if :param nodes_to_remove: The server ID list will be removed if
downsizing the cluster. downsizing the cluster.
:returns: The UUID of the resized cluster. :returns: The UUID of the resized cluster.
:raises: :exc:`~openstack.exceptions.ResourceNotFound` if :raises: :exc:`~openstack.exceptions.NotFoundException` if
the resource was not found. the resource was not found.
""" """
url = utils.urljoin(Cluster.base_path, self.id, 'actions', 'resize') url = utils.urljoin(Cluster.base_path, self.id, 'actions', 'resize')
@ -154,7 +154,7 @@ class Cluster(resource.Resource):
:param max_batch_size: The max batch size each time when doing upgrade. :param max_batch_size: The max batch size each time when doing upgrade.
The default is 1 The default is 1
:returns: The UUID of the updated cluster. :returns: The UUID of the updated cluster.
:raises: :exc:`~openstack.exceptions.ResourceNotFound` if :raises: :exc:`~openstack.exceptions.NotFoundException` if
the resource was not found. the resource was not found.
""" """
url = utils.urljoin(Cluster.base_path, self.id, 'actions', 'upgrade') url = utils.urljoin(Cluster.base_path, self.id, 'actions', 'upgrade')

@ -52,7 +52,7 @@ class Proxy(proxy.Proxy):
It can be either the ID of an instance It can be either the ID of an instance
or a :class:`~openstack.database.v1.instance.Instance` or a :class:`~openstack.database.v1.instance.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.NotFoundException` will be
raised when the database does not exist. raised when the database 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 database. attempting to delete a nonexistent database.
@ -76,7 +76,7 @@ class Proxy(proxy.Proxy):
:param instance: This can be either the ID of an instance :param instance: This can be either the ID of an instance
or a :class:`~openstack.database.v1.instance.Instance` or a :class:`~openstack.database.v1.instance.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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -117,7 +117,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.database.v1.database.Database` :returns: One :class:`~openstack.database.v1.database.Database`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_database.Database, database) return self._get(_database.Database, database)
@ -127,7 +127,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a flavor. :param name_or_id: The name or ID of a flavor.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -144,7 +144,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.database.v1.flavor.Flavor` instance. :class:`~openstack.database.v1.flavor.Flavor` instance.
:returns: One :class:`~openstack.database.v1.flavor.Flavor` :returns: One :class:`~openstack.database.v1.flavor.Flavor`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_flavor.Flavor, flavor) return self._get(_flavor.Flavor, flavor)
@ -178,7 +178,7 @@ class Proxy(proxy.Proxy):
:param instance: The value can be either the ID of an instance or a :param instance: The value can be either the ID of an instance or a
:class:`~openstack.database.v1.instance.Instance` instance. :class:`~openstack.database.v1.instance.Instance` 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.NotFoundException` will be
raised when the instance does not exist. raised when the instance 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 instance. attempting to delete a nonexistent instance.
@ -194,7 +194,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a instance. :param name_or_id: The name or ID of a 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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -212,7 +212,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.database.v1.instance.Instance` :returns: One :class:`~openstack.database.v1.instance.Instance`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_instance.Instance, instance) return self._get(_instance.Instance, instance)
@ -266,7 +266,7 @@ class Proxy(proxy.Proxy):
It can be either the ID of an instance It can be either the ID of an instance
or a :class:`~openstack.database.v1.instance.Instance` or a :class:`~openstack.database.v1.instance.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.NotFoundException` will be
raised when the user does not exist. raised when the user 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 user. attempting to delete a nonexistent user.
@ -288,7 +288,7 @@ class Proxy(proxy.Proxy):
:param instance: This can be either the ID of an instance :param instance: This can be either the ID of an instance
or a :class:`~openstack.database.v1.instance.Instance` or a :class:`~openstack.database.v1.instance.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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -327,7 +327,7 @@ class Proxy(proxy.Proxy):
or a :class:`~openstack.database.v1.instance.Instance` or a :class:`~openstack.database.v1.instance.Instance`
:returns: One :class:`~openstack.database.v1.user.User` :returns: One :class:`~openstack.database.v1.user.User`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
instance = self._get_resource(_instance.Instance, instance) instance = self._get_resource(_instance.Instance, instance)

@ -27,7 +27,7 @@ class Resource(resource.Resource):
:param name_or_id: This resource's identifier, if needed by :param name_or_id: This resource's identifier, if needed by
the request. The default is ``None``. the request. The default is ``None``.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -40,7 +40,7 @@ class Resource(resource.Resource):
or None if nothing matches. or None if nothing matches.
:raises: :class:`openstack.exceptions.DuplicateResource` if more :raises: :class:`openstack.exceptions.DuplicateResource` if more
than one resource is found for this request. than one resource is found for this request.
:raises: :class:`openstack.exceptions.ResourceNotFound` if nothing :raises: :class:`openstack.exceptions.NotFoundException` if nothing
is found and ignore_missing is ``False``. is found and ignore_missing is ``False``.
""" """
session = cls._get_session(session) session = cls._get_session(session)
@ -68,7 +68,7 @@ class Resource(resource.Resource):
if ignore_missing: if ignore_missing:
return None return None
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f"No {cls.__name__} found for {name_or_id}" f"No {cls.__name__} found for {name_or_id}"
) )

@ -77,7 +77,7 @@ class Proxy(proxy.Proxy):
:param zone: The value can be the ID of a zone :param zone: The value can be the ID of a zone
or a :class:`~openstack.dns.v2.zone.Zone` instance. or a :class:`~openstack.dns.v2.zone.Zone` instance.
:param bool ignore_missing: When set to ``False`` :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. the zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone. delete a nonexistent zone.
@ -111,7 +111,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a zone :param name_or_id: The name or ID of a zone
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the zone does not exist. when the zone does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent zone. to delete a nonexistent zone.
@ -221,7 +221,7 @@ class Proxy(proxy.Proxy):
:param zone: The value can be the ID of a zone :param zone: The value can be the ID of a zone
or a :class:`~openstack.dns.v2.zone.Zone` instance. or a :class:`~openstack.dns.v2.zone.Zone` instance.
:param bool ignore_missing: When set to ``False`` :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 the zone does not exist. When set to ``True``, no exception will
be set when attempting to delete a nonexistent zone. be set when attempting to delete a nonexistent zone.
@ -242,7 +242,7 @@ class Proxy(proxy.Proxy):
or a :class:`~openstack.dns.v2.zone.Zone` instance. or a :class:`~openstack.dns.v2.zone.Zone` instance.
:param name_or_id: The name or ID of a zone :param name_or_id: The name or ID of a zone
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the zone does not exist. when the zone does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent zone. to delete a nonexistent zone.
@ -303,7 +303,7 @@ class Proxy(proxy.Proxy):
:param zone_import: The value can be the ID of a zone import :param zone_import: The value can be the ID of a zone import
or a :class:`~openstack.dns.v2.zone_import.ZoneImport` instance. or a :class:`~openstack.dns.v2.zone_import.ZoneImport` instance.
:param bool ignore_missing: When set to ``False`` :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. the zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone. delete a nonexistent zone.
@ -380,7 +380,7 @@ class Proxy(proxy.Proxy):
:param zone_export: The value can be the ID of a zone import :param zone_export: The value can be the ID of a zone import
or a :class:`~openstack.dns.v2.zone_export.ZoneExport` instance. or a :class:`~openstack.dns.v2.zone_export.ZoneExport` instance.
:param bool ignore_missing: When set to ``False`` :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. the zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone. delete a nonexistent zone.
@ -510,7 +510,7 @@ class Proxy(proxy.Proxy):
or a :class:`~openstack.dns.v2.zone_transfer.ZoneTransferRequest` or a :class:`~openstack.dns.v2.zone_transfer.ZoneTransferRequest`
instance. instance.
:param bool ignore_missing: When set to ``False`` :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. the zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone. delete a nonexistent zone.
@ -600,7 +600,7 @@ class Proxy(proxy.Proxy):
or a :class:`~openstack.dns.v2.zone.Zone` instance. or a :class:`~openstack.dns.v2.zone.Zone` instance.
:param zone_share_id: The zone share ID :param zone_share_id: The zone share ID
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the zone share does not exist. when the zone share does not exist.
When set to ``True``, None will be returned when attempting to When set to ``True``, None will be returned when attempting to
find a nonexistent zone share. find a nonexistent zone share.
@ -641,7 +641,7 @@ class Proxy(proxy.Proxy):
share or a :class:`~openstack.dns.v2.zone_share.ZoneShare` instance share or a :class:`~openstack.dns.v2.zone_share.ZoneShare` instance
that the zone share belongs to. that the zone share belongs to.
:param bool ignore_missing: When set to ``False`` :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 share does not exist. the zone share does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent zone share. delete a nonexistent zone share.

@ -120,6 +120,10 @@ class BadRequestException(HttpException):
"""HTTP 400 Bad Request.""" """HTTP 400 Bad Request."""
class NotFoundException(HttpException):
"""HTTP 404 Not Found."""
class ForbiddenException(HttpException): class ForbiddenException(HttpException):
"""HTTP 403 Forbidden Request.""" """HTTP 403 Forbidden Request."""
@ -154,13 +158,6 @@ class DuplicateResource(SDKException):
"""More than one resource exists with that name.""" """More than one resource exists with that name."""
class ResourceNotFound(HttpException):
"""No resource exists with that name or ID."""
NotFoundException = ResourceNotFound
class ResourceTimeout(SDKException): class ResourceTimeout(SDKException):
"""Timeout waiting for resource.""" """Timeout waiting for resource."""
@ -275,3 +272,4 @@ class ServiceDiscoveryException(SDKException):
# Backwards compatibility # Backwards compatibility
OpenStackCloudException = SDKException OpenStackCloudException = SDKException
ResourceNotFound = NotFoundException

@ -34,7 +34,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.identity.v2.extension.Extension` :returns: One :class:`~openstack.identity.v2.extension.Extension`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no extension can be found. when no extension can be found.
""" """
return self._get(_extension.Extension, extension) return self._get(_extension.Extension, extension)
@ -57,7 +57,7 @@ class Proxy(proxy.Proxy):
:param role: The value can be either the ID of a role or a :param role: The value can be either the ID of a role or a
:class:`~openstack.identity.v2.role.Role` instance. :class:`~openstack.identity.v2.role.Role` 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.NotFoundException` will be
raised when the role does not exist. raised when the role 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 role. attempting to delete a nonexistent role.
@ -71,7 +71,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a role. :param name_or_id: The name or ID of a role.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -88,7 +88,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v2.role.Role` instance. :class:`~openstack.identity.v2.role.Role` instance.
:returns: One :class:`~openstack.identity.v2.role.Role` :returns: One :class:`~openstack.identity.v2.role.Role`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_role.Role, role) return self._get(_role.Role, role)
@ -135,7 +135,7 @@ class Proxy(proxy.Proxy):
:param tenant: The value can be either the ID of a tenant or a :param tenant: The value can be either the ID of a tenant or a
:class:`~openstack.identity.v2.tenant.Tenant` instance. :class:`~openstack.identity.v2.tenant.Tenant` 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.NotFoundException` will be
raised when the tenant does not exist. raised when the tenant 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 tenant. attempting to delete a nonexistent tenant.
@ -149,7 +149,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a tenant. :param name_or_id: The name or ID of a tenant.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -166,7 +166,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v2.tenant.Tenant` instance. :class:`~openstack.identity.v2.tenant.Tenant` instance.
:returns: One :class:`~openstack.identity.v2.tenant.Tenant` :returns: One :class:`~openstack.identity.v2.tenant.Tenant`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_tenant.Tenant, tenant) return self._get(_tenant.Tenant, tenant)
@ -213,7 +213,7 @@ class Proxy(proxy.Proxy):
:param user: The value can be either the ID of a user or a :param user: The value can be either the ID of a user or a
:class:`~openstack.identity.v2.user.User` instance. :class:`~openstack.identity.v2.user.User` 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.NotFoundException` will be
raised when the user does not exist. raised when the user 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 user. attempting to delete a nonexistent user.
@ -227,7 +227,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a user. :param name_or_id: The name or ID of a user.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -244,7 +244,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v2.user.User` instance. :class:`~openstack.identity.v2.user.User` instance.
:returns: One :class:`~openstack.identity.v2.user.User` :returns: One :class:`~openstack.identity.v2.user.User`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_user.User, user) return self._get(_user.User, user)

@ -108,7 +108,7 @@ class Proxy(proxy.Proxy):
:param credential: The value can be either the ID of a credential or a :param credential: The value can be either the ID of a credential or a
:class:`~openstack.identity.v3.credential.Credential` instance. :class:`~openstack.identity.v3.credential.Credential` 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.NotFoundException` will be
raised when the credential does not exist. raised when the credential 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 credential. attempting to delete a nonexistent credential.
@ -124,7 +124,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a credential. :param name_or_id: The name or ID of a credential.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -142,7 +142,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.credential.Credential` instance. :class:`~openstack.identity.v3.credential.Credential` instance.
:returns: One :class:`~openstack.identity.v3.credential.Credential` :returns: One :class:`~openstack.identity.v3.credential.Credential`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_credential.Credential, credential) return self._get(_credential.Credential, credential)
@ -192,7 +192,7 @@ class Proxy(proxy.Proxy):
:param domain: The value can be either the ID of a domain or a :param domain: The value can be either the ID of a domain or a
:class:`~openstack.identity.v3.domain.Domain` instance. :class:`~openstack.identity.v3.domain.Domain` 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.NotFoundException` will be
raised when the domain does not exist. raised when the domain 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 domain. attempting to delete a nonexistent domain.
@ -206,7 +206,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a domain. :param name_or_id: The name or ID of a domain.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -223,7 +223,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.domain.Domain` instance. :class:`~openstack.identity.v3.domain.Domain` instance.
:returns: One :class:`~openstack.identity.v3.domain.Domain` :returns: One :class:`~openstack.identity.v3.domain.Domain`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_domain.Domain, domain) return self._get(_domain.Domain, domain)
@ -280,7 +280,7 @@ class Proxy(proxy.Proxy):
:param domain: The value can be the ID of a domain or a :param domain: The value can be the ID of a domain or a
a :class:`~openstack.identity.v3.domain.Domain` instance. a :class:`~openstack.identity.v3.domain.Domain` 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.NotFoundException` will be
raised when the identity provider does not exist. raised when the identity provider 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 config for a domain. attempting to delete a nonexistent config for a domain.
@ -302,7 +302,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.identity.v3.domain_config.DomainConfig` :class:`~openstack.identity.v3.domain_config.DomainConfig`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
domain_id = resource.Resource._get_id(domain) domain_id = resource.Resource._get_id(domain)
@ -350,7 +350,7 @@ class Proxy(proxy.Proxy):
:param endpoint: The value can be either the ID of an endpoint or a :param endpoint: The value can be either the ID of an endpoint or a
:class:`~openstack.identity.v3.endpoint.Endpoint` instance. :class:`~openstack.identity.v3.endpoint.Endpoint` 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.NotFoundException` will be
raised when the endpoint does not exist. raised when the endpoint 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 endpoint. attempting to delete a nonexistent endpoint.
@ -366,7 +366,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a endpoint. :param name_or_id: The name or ID of a endpoint.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -384,7 +384,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.identity.v3.endpoint.Endpoint` :returns: One :class:`~openstack.identity.v3.endpoint.Endpoint`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_endpoint.Endpoint, endpoint) return self._get(_endpoint.Endpoint, endpoint)
@ -434,7 +434,7 @@ class Proxy(proxy.Proxy):
:param group: The value can be either the ID of a group or a :param group: The value can be either the ID of a group or a
:class:`~openstack.identity.v3.group.Group` instance. :class:`~openstack.identity.v3.group.Group` 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.NotFoundException` will be
raised when the group does not exist. raised when the group 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 group. attempting to delete a nonexistent group.
@ -448,7 +448,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a group. :param name_or_id: The name or ID of a group.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -469,7 +469,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.identity.v3.group.Group` :returns: One :class:`~openstack.identity.v3.group.Group`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_group.Group, group) return self._get(_group.Group, group)
@ -572,7 +572,7 @@ class Proxy(proxy.Proxy):
:param policy: The value can be either the ID of a policy or a :param policy: The value can be either the ID of a policy or a
:class:`~openstack.identity.v3.policy.Policy` instance. :class:`~openstack.identity.v3.policy.Policy` 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.NotFoundException` will be
raised when the policy does not exist. raised when the policy 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 policy. attempting to delete a nonexistent policy.
@ -586,7 +586,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a policy. :param name_or_id: The name or ID of a policy.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -603,7 +603,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.policy.Policy` instance. :class:`~openstack.identity.v3.policy.Policy` instance.
:returns: One :class:`~openstack.identity.v3.policy.Policy` :returns: One :class:`~openstack.identity.v3.policy.Policy`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_policy.Policy, policy) return self._get(_policy.Policy, policy)
@ -653,7 +653,7 @@ class Proxy(proxy.Proxy):
:param project: The value can be either the ID of a project or a :param project: The value can be either the ID of a project or a
:class:`~openstack.identity.v3.project.Project` instance. :class:`~openstack.identity.v3.project.Project` 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.NotFoundException` will be
raised when the project does not exist. raised when the project 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 project. attempting to delete a nonexistent project.
@ -667,7 +667,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a project. :param name_or_id: The name or ID of a project.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -687,7 +687,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.project.Project` instance. :class:`~openstack.identity.v3.project.Project` instance.
:returns: One :class:`~openstack.identity.v3.project.Project` :returns: One :class:`~openstack.identity.v3.project.Project`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_project.Project, project) return self._get(_project.Project, project)
@ -752,7 +752,7 @@ class Proxy(proxy.Proxy):
:param service: The value can be either the ID of a service or a :param service: The value can be either the ID of a service or a
:class:`~openstack.identity.v3.service.Service` instance. :class:`~openstack.identity.v3.service.Service` 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.NotFoundException` will be
raised when the service does not exist. raised when the service 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 service. attempting to delete a nonexistent service.
@ -766,7 +766,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a service. :param name_or_id: The name or ID of a service.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -783,7 +783,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.service.Service` instance. :class:`~openstack.identity.v3.service.Service` instance.
:returns: One :class:`~openstack.identity.v3.service.Service` :returns: One :class:`~openstack.identity.v3.service.Service`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_service.Service, service) return self._get(_service.Service, service)
@ -833,7 +833,7 @@ class Proxy(proxy.Proxy):
:param user: The value can be either the ID of a user or a :param user: The value can be either the ID of a user or a
:class:`~openstack.identity.v3.user.User` instance. :class:`~openstack.identity.v3.user.User` 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.NotFoundException` will be
raised when the user does not exist. raised when the user 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 user. attempting to delete a nonexistent user.
@ -847,7 +847,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a user. :param name_or_id: The name or ID of a user.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -867,7 +867,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.user.User` instance. :class:`~openstack.identity.v3.user.User` instance.
:returns: One :class:`~openstack.identity.v3.user.User` :returns: One :class:`~openstack.identity.v3.user.User`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_user.User, user) return self._get(_user.User, user)
@ -917,7 +917,7 @@ class Proxy(proxy.Proxy):
:param trust: The value can be either the ID of a trust or a :param trust: The value can be either the ID of a trust or a
:class:`~openstack.identity.v3.trust.Trust` instance. :class:`~openstack.identity.v3.trust.Trust` 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.NotFoundException` will be
raised when the credential does not exist. raised when the credential 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 credential. attempting to delete a nonexistent credential.
@ -931,7 +931,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a trust. :param name_or_id: The name or ID of a trust.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -948,7 +948,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.trust.Trust` instance. :class:`~openstack.identity.v3.trust.Trust` instance.
:returns: One :class:`~openstack.identity.v3.trust.Trust` :returns: One :class:`~openstack.identity.v3.trust.Trust`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_trust.Trust, trust) return self._get(_trust.Trust, trust)
@ -985,7 +985,7 @@ class Proxy(proxy.Proxy):
:param region: The value can be either the ID of a region or a :param region: The value can be either the ID of a region or a
:class:`~openstack.identity.v3.region.Region` instance. :class:`~openstack.identity.v3.region.Region` 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.NotFoundException` will be
raised when the region does not exist. raised when the region does not exist.
When set to ``True``, no exception will be thrown when When set to ``True``, no exception will be thrown when
attempting to delete a nonexistent region. attempting to delete a nonexistent region.
@ -999,7 +999,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a region. :param name_or_id: The name or ID of a region.
: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.NotFoundException` will be
raised when the region does not exist. raised when the region does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent region. attempting to find a nonexistent region.
@ -1016,7 +1016,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.region.Region` instance. :class:`~openstack.identity.v3.region.Region` instance.
:returns: One :class:`~openstack.identity.v3.region.Region` :returns: One :class:`~openstack.identity.v3.region.Region`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no matching region can be found. when no matching region can be found.
""" """
return self._get(_region.Region, region) return self._get(_region.Region, region)
@ -1066,7 +1066,7 @@ class Proxy(proxy.Proxy):
:param role: The value can be either the ID of a role or a :param role: The value can be either the ID of a role or a
:class:`~openstack.identity.v3.role.Role` instance. :class:`~openstack.identity.v3.role.Role` 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.NotFoundException` will be
raised when the role does not exist. raised when the role does not exist.
When set to ``True``, no exception will be thrown when When set to ``True``, no exception will be thrown when
attempting to delete a nonexistent role. attempting to delete a nonexistent role.
@ -1080,7 +1080,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a role. :param name_or_id: The name or ID of a role.
: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.NotFoundException` will be
raised when the role does not exist. raised when the role does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent role. attempting to find a nonexistent role.
@ -1100,7 +1100,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.role.Role` instance. :class:`~openstack.identity.v3.role.Role` instance.
:returns: One :class:`~openstack.identity.v3.role.Role` :returns: One :class:`~openstack.identity.v3.role.Role`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no matching role can be found. when no matching role can be found.
""" """
return self._get(_role.Role, role) return self._get(_role.Role, role)
@ -1543,7 +1543,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.identity.v3.registered_limit.RegisteredLimit` :returns: One :class:`~openstack.identity.v3.registered_limit.RegisteredLimit`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_registered_limit.RegisteredLimit, registered_limit) return self._get(_registered_limit.RegisteredLimit, registered_limit)
@ -1585,7 +1585,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.registered_limit.RegisteredLimit` :class:`~openstack.identity.v3.registered_limit.RegisteredLimit`
instance. instance.
:param bool ignore_missing: When set to ``False`` :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 registered_limit does not exist. When set to ``True``, no the registered_limit does not exist. When set to ``True``, no
exception will be thrown when attempting to delete a nonexistent exception will be thrown when attempting to delete a nonexistent
registered_limit. registered_limit.
@ -1618,7 +1618,7 @@ class Proxy(proxy.Proxy):
or a :class:`~openstack.identity.v3.limit.Limit` instance. or a :class:`~openstack.identity.v3.limit.Limit` instance.
:returns: One :class:`~openstack.identity.v3.limit.Limit` :returns: One :class:`~openstack.identity.v3.limit.Limit`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
return self._get(_limit.Limit, limit) return self._get(_limit.Limit, limit)
@ -1654,7 +1654,7 @@ class Proxy(proxy.Proxy):
:param limit: The value can be either the ID of a limit or a :param limit: The value can be either the ID of a limit or a
:class:`~openstack.identity.v3.limit.Limit` instance. :class:`~openstack.identity.v3.limit.Limit` instance.
:param bool ignore_missing: When set to ``False`` :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 limit does not exist. When set to ``True``, no exception will the limit does not exist. When set to ``True``, no exception will
be thrown when attempting to delete a nonexistent limit. be thrown when attempting to delete a nonexistent limit.
@ -1697,7 +1697,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.identity.v3.application_credential.ApplicationCredential` :class:`~openstack.identity.v3.application_credential.ApplicationCredential`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
user = self._get_resource(_user.User, user) user = self._get_resource(_user.User, user)
@ -1745,7 +1745,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.user.User` instance. :class:`~openstack.identity.v3.user.User` instance.
:param name_or_id: The name or ID of an application credential. :param name_or_id: The name or ID of an application credential.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -1775,7 +1775,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.application_credential.ApplicationCredential` :class:`~openstack.identity.v3.application_credential.ApplicationCredential`
instance. instance.
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the application credential does not exist. When set to when the application credential does not exist. When set to
``True``, no exception will be thrown when attempting to delete ``True``, no exception will be thrown when attempting to delete
a nonexistent application credential. a nonexistent application credential.
@ -1831,7 +1831,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.federation_protocol.FederationProtocol` :class:`~openstack.identity.v3.federation_protocol.FederationProtocol`
instance. instance.
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the federation protocol does not exist. When set to when the federation protocol does not exist. When set to
``True``, no exception will be set when attempting to delete a ``True``, no exception will be set when attempting to delete a
nonexistent federation protocol. nonexistent federation protocol.
@ -1856,7 +1856,7 @@ class Proxy(proxy.Proxy):
representing the identity provider the protocol is attached to. representing the identity provider the protocol is attached to.
:param protocol: The name or ID of a federation protocol. :param protocol: The name or ID of a federation protocol.
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the resource does not exist. When set to ``True``, None will when the resource does not exist. When set to ``True``, None will
be returned when attempting to find a nonexistent resource. be returned when attempting to find a nonexistent resource.
:returns: One federation protocol or None :returns: One federation protocol or None
@ -1888,7 +1888,7 @@ class Proxy(proxy.Proxy):
:returns: One federation protocol :returns: One federation protocol
:rtype: :rtype:
:class:`~openstack.identity.v3.federation_protocol.FederationProtocol` :class:`~openstack.identity.v3.federation_protocol.FederationProtocol`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
cls = _federation_protocol.FederationProtocol cls = _federation_protocol.FederationProtocol
@ -1966,7 +1966,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.mapping.Mapping` :class:`~openstack.identity.v3.mapping.Mapping`
instance. 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.NotFoundException` will be
raised when the mapping does not exist. raised when the mapping 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 mapping. attempting to delete a nonexistent mapping.
@ -1980,7 +1980,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a mapping. :param name_or_id: The name or ID of a mapping.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -1998,7 +1998,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.identity.v3.mapping.Mapping` :returns: One :class:`~openstack.identity.v3.mapping.Mapping`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_mapping.Mapping, mapping) return self._get(_mapping.Mapping, mapping)
@ -2049,7 +2049,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.identity_provider.IdentityProvider` :class:`~openstack.identity.v3.identity_provider.IdentityProvider`
instance. 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.NotFoundException` will be
raised when the identity provider does not exist. raised when the identity provider 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 identity provider. attempting to delete a nonexistent identity provider.
@ -2067,7 +2067,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of an identity provider :param name_or_id: The name or ID of an identity provider
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -2091,7 +2091,7 @@ class Proxy(proxy.Proxy):
:returns: The details of an identity provider. :returns: The details of an identity provider.
:rtype: :rtype:
:class:`~openstack.identity.v3.identity_provider.IdentityProvider` :class:`~openstack.identity.v3.identity_provider.IdentityProvider`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -2152,7 +2152,7 @@ class Proxy(proxy.Proxy):
:class:`~.access_rule.AccessRule` instance. :class:`~.access_rule.AccessRule` instance.
:returns: One :class:`~.access_rule.AccessRule` :returns: One :class:`~.access_rule.AccessRule`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
user = self._get_resource(_user.User, user) user = self._get_resource(_user.User, user)
@ -2166,7 +2166,7 @@ class Proxy(proxy.Proxy):
:param access rule: The value can be either the ID of an :param access rule: The value can be either the ID of an
access rule or a :class:`~.access_rule.AccessRule` instance. access rule or a :class:`~.access_rule.AccessRule` instance.
:param bool ignore_missing: When set to ``False`` :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 access rule does not exist. When set to ``True``, no exception the access rule does not exist. When set to ``True``, no exception
will be thrown when attempting to delete a nonexistent access rule. will be thrown when attempting to delete a nonexistent access rule.
@ -2202,7 +2202,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.identity.v3.service_provider.ServiceProvider` :class:`~openstack.identity.v3.service_provider.ServiceProvider`
instance. 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.NotFoundException` will be
raised when the service provider does not exist. raised when the service provider 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 service provider. attempting to delete a nonexistent service provider.
@ -2220,7 +2220,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a service provider :param name_or_id: The name or ID of a service provider
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
@ -2245,7 +2245,7 @@ class Proxy(proxy.Proxy):
:returns: The details of an service provider. :returns: The details of an service provider.
:rtype: :rtype:
:class:`~openstack.identity.v3.service_provider.ServiceProvider` :class:`~openstack.identity.v3.service_provider.ServiceProvider`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_service_provider.ServiceProvider, service_provider) return self._get(_service_provider.ServiceProvider, service_provider)

@ -322,7 +322,7 @@ class Proxy(proxy.Proxy):
:param image: The value can be either the ID of an image or a :param image: The value can be either the ID of an image or a
:class:`~openstack.image.v1.image.Image` instance. :class:`~openstack.image.v1.image.Image` 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.NotFoundException` will be
raised when the image does not exist. raised when the image 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 image. attempting to delete a nonexistent image.
@ -336,7 +336,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a image. :param name_or_id: The name or ID of a image.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -353,7 +353,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v1.image.Image` instance. :class:`~openstack.image.v1.image.Image` instance.
:returns: One :class:`~openstack.image.v1.image.Image` :returns: One :class:`~openstack.image.v1.image.Image`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_image.Image, image) return self._get(_image.Image, image)

@ -96,7 +96,7 @@ class Image(resource.Resource, _download.DownloadMixin):
:param name_or_id: This resource's identifier, if needed by :param name_or_id: This resource's identifier, if needed by
the request. The default is ``None``. the request. The default is ``None``.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -109,7 +109,7 @@ class Image(resource.Resource, _download.DownloadMixin):
or None if nothing matches. or None if nothing matches.
:raises: :class:`openstack.exceptions.DuplicateResource` if more :raises: :class:`openstack.exceptions.DuplicateResource` if more
than one resource is found for this request. than one resource is found for this request.
:raises: :class:`openstack.exceptions.ResourceNotFound` if nothing :raises: :class:`openstack.exceptions.NotFoundException` if nothing
is found and ignore_missing is ``False``. is found and ignore_missing is ``False``.
""" """
session = cls._get_session(session) session = cls._get_session(session)
@ -134,6 +134,6 @@ class Image(resource.Resource, _download.DownloadMixin):
if ignore_missing: if ignore_missing:
return None return None
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f"No {cls.__name__} found for {name_or_id}" f"No {cls.__name__} found for {name_or_id}"
) )

@ -90,7 +90,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.image.Image` :class:`~openstack.image.v2.image.Image`
instance. instance.
:param bool ignore_missing: When set to ``False``, :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 metadef namespace does not exist. the metadef namespace does not exist.
:returns: ``None`` :returns: ``None``
""" """
@ -832,7 +832,7 @@ class Proxy(proxy.Proxy):
image is associated with. If specified, the image will only be image is associated with. If specified, the image will only be
deleted from the specified store. deleted from the specified store.
: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.NotFoundException` will be
raised when the image does not exist. raised when the image 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 image. attempting to delete a nonexistent image.
@ -850,7 +850,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a image. :param name_or_id: The name or ID of a image.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -869,7 +869,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.image.Image` instance. :class:`~openstack.image.v2.image.Image` instance.
:returns: One :class:`~openstack.image.v2.image.Image` :returns: One :class:`~openstack.image.v2.image.Image`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_image.Image, image) return self._get(_image.Image, image)
@ -1018,7 +1018,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.image.Image` instance that the member :class:`~openstack.image.v2.image.Image` instance that the member
is part of. This is required if ``member`` is an ID. is part of. This is required if ``member`` is an ID.
:param bool ignore_missing: When set to ``False`` :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 member does not exist. When set to ``True``, no exception will the member does not exist. When set to ``True``, no exception will
be set when attempting to delete a nonexistent member. be set when attempting to delete a nonexistent member.
@ -1041,7 +1041,7 @@ class Proxy(proxy.Proxy):
the value can be the ID of a image or a the value can be the ID of a image or a
:class:`~openstack.image.v2.image.Image` instance. :class:`~openstack.image.v2.image.Image` 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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -1064,7 +1064,7 @@ class Proxy(proxy.Proxy):
The value can be the ID of a image or a The value can be the ID of a image or a
:class:`~openstack.image.v2.image.Image` instance. :class:`~openstack.image.v2.image.Image` instance.
:returns: One :class:`~openstack.image.v2.member.Member` :returns: One :class:`~openstack.image.v2.member.Member`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
member_id = resource.Resource._get_id(member) member_id = resource.Resource._get_id(member)
@ -1136,7 +1136,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace`
instance. instance.
:param bool ignore_missing: When set to ``False``, :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 metadef namespace does not exist. the metadef namespace does not exist.
:returns: ``None`` :returns: ``None``
""" """
@ -1159,7 +1159,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~~openstack.image.v2.metadef_namespace.MetadefNamespace` :class:`~~openstack.image.v2.metadef_namespace.MetadefNamespace`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
return self._get( return self._get(
@ -1172,7 +1172,7 @@ class Proxy(proxy.Proxy):
:returns: A generator object of metadef namespaces :returns: A generator object of metadef namespaces
:rtype: :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` :rtype: :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._list(_metadef_namespace.MetadefNamespace, **query) return self._list(_metadef_namespace.MetadefNamespace, **query)
@ -1234,7 +1234,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace`
instance. instance.
:returns: One :class:`~openstack.image.v2.metadef_object.MetadefObject` :returns: One :class:`~openstack.image.v2.metadef_object.MetadefObject`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
object_name = resource.Resource._get_id(metadef_object) object_name = resource.Resource._get_id(metadef_object)
@ -1254,7 +1254,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.image.v2.metadef_object.MetadefObject` :returns: One :class:`~openstack.image.v2.metadef_object.MetadefObject`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
namespace_name = resource.Resource._get_id(namespace) namespace_name = resource.Resource._get_id(namespace)
@ -1276,7 +1276,7 @@ class Proxy(proxy.Proxy):
a :class:`~openstack.image.v2.metadef_object.MetadefObject` a :class:`~openstack.image.v2.metadef_object.MetadefObject`
:returns: One :class:`~openstack.image.v2.metadef_object.MetadefObject` :returns: One :class:`~openstack.image.v2.metadef_object.MetadefObject`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
namespace_name = resource.Resource._get_id(namespace) namespace_name = resource.Resource._get_id(namespace)
@ -1301,7 +1301,7 @@ class Proxy(proxy.Proxy):
a :class:`~openstack.image.v2.metadef_object.MetadefObject` a :class:`~openstack.image.v2.metadef_object.MetadefObject`
:returns: ``None`` :returns: ``None``
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
namespace_name = resource.Resource._get_id(namespace) namespace_name = resource.Resource._get_id(namespace)
@ -1320,7 +1320,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace`
instance. instance.
:returns: ``None`` :returns: ``None``
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
namespace = self._get_resource( namespace = self._get_resource(
@ -1335,7 +1335,7 @@ class Proxy(proxy.Proxy):
:return: A generator object of metadef resource types :return: A generator object of metadef resource types
:rtype: :rtype:
:class:`~openstack.image.v2.metadef_resource_type.MetadefResourceType` :class:`~openstack.image.v2.metadef_resource_type.MetadefResourceType`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._list(_metadef_resource_type.MetadefResourceType, **query) return self._list(_metadef_resource_type.MetadefResourceType, **query)
@ -1382,7 +1382,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace`
instance instance
:param bool ignore_missing: When set to ``False``, :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 metadef resource type association does not exist. the metadef resource type association does not exist.
:returns: ``None`` :returns: ``None``
""" """
@ -1404,7 +1404,7 @@ class Proxy(proxy.Proxy):
:return: A generator object of metadef resource type associations :return: A generator object of metadef resource type associations
:rtype: :rtype:
:class:`~openstack.image.v2.metadef_resource_type.MetadefResourceTypeAssociation` :class:`~openstack.image.v2.metadef_resource_type.MetadefResourceTypeAssociation`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
namespace_name = resource.Resource._get_id(metadef_namespace) namespace_name = resource.Resource._get_id(metadef_namespace)
@ -1477,7 +1477,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace`
instance instance
:param bool ignore_missing: When set to :param bool ignore_missing: When set to
``False`` :class:`~openstack.exceptions.ResourceNotFound` will be ``False`` :class:`~openstack.exceptions.NotFoundException` will be
raised when the instance does not exist. When set to ``True``, raised when the instance does not exist. When set to ``True``,
no exception will be set when attempting to delete a nonexistent no exception will be set when attempting to delete a nonexistent
instance. instance.
@ -1529,7 +1529,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~~openstack.image.v2.metadef_property.MetadefProperty` :class:`~~openstack.image.v2.metadef_property.MetadefProperty`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
namespace_name = resource.Resource._get_id(metadef_namespace) namespace_name = resource.Resource._get_id(metadef_namespace)
@ -1549,7 +1549,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: ``None`` :returns: ``None``
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
namespace = self._get_resource( namespace = self._get_resource(
@ -1562,7 +1562,7 @@ class Proxy(proxy.Proxy):
"""Get images schema """Get images schema
:returns: One :class:`~openstack.image.v2.schema.Schema` :returns: One :class:`~openstack.image.v2.schema.Schema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1575,7 +1575,7 @@ class Proxy(proxy.Proxy):
"""Get single image schema """Get single image schema
:returns: One :class:`~openstack.image.v2.schema.Schema` :returns: One :class:`~openstack.image.v2.schema.Schema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1588,7 +1588,7 @@ class Proxy(proxy.Proxy):
"""Get image members schema """Get image members schema
:returns: One :class:`~openstack.image.v2.schema.Schema` :returns: One :class:`~openstack.image.v2.schema.Schema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1601,7 +1601,7 @@ class Proxy(proxy.Proxy):
"""Get image member schema """Get image member schema
:returns: One :class:`~openstack.image.v2.schema.Schema` :returns: One :class:`~openstack.image.v2.schema.Schema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1614,7 +1614,7 @@ class Proxy(proxy.Proxy):
"""Get image tasks schema """Get image tasks schema
:returns: One :class:`~openstack.image.v2.schema.Schema` :returns: One :class:`~openstack.image.v2.schema.Schema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1627,7 +1627,7 @@ class Proxy(proxy.Proxy):
"""Get image task schema """Get image task schema
:returns: One :class:`~openstack.image.v2.schema.Schema` :returns: One :class:`~openstack.image.v2.schema.Schema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1640,7 +1640,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition namespace schema """Get metadata definition namespace schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1653,7 +1653,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition namespaces schema """Get metadata definition namespaces schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1666,7 +1666,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition resource type association schema """Get metadata definition resource type association schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1679,7 +1679,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition resource type associations schema """Get metadata definition resource type associations schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1692,7 +1692,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition object schema """Get metadata definition object schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1705,7 +1705,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition objects schema """Get metadata definition objects schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1718,7 +1718,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition property schema """Get metadata definition property schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1731,7 +1731,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition properties schema """Get metadata definition properties schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1744,7 +1744,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition tag schema """Get metadata definition tag schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1757,7 +1757,7 @@ class Proxy(proxy.Proxy):
"""Get metadata definition tags schema """Get metadata definition tags schema
:returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema` :returns: One :class:`~openstack.image.v2.metadef_schema.MetadefSchema`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get( return self._get(
@ -1785,7 +1785,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.image.v2.task.Task` instance. :class:`~openstack.image.v2.task.Task` instance.
:returns: One :class:`~openstack.image.v2.task.Task` :returns: One :class:`~openstack.image.v2.task.Task`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_task.Task, task) return self._get(_task.Task, task)
@ -1895,7 +1895,7 @@ class Proxy(proxy.Proxy):
"""Get a info about image constraints """Get a info about image constraints
:returns: One :class:`~openstack.image.v2.service_info.Import` :returns: One :class:`~openstack.image.v2.service_info.Import`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_si.Import, requires_id=False) return self._get(_si.Import, requires_id=False)

@ -418,6 +418,6 @@ class Image(resource.Resource, tag.TagMixin, _download.DownloadMixin):
if ignore_missing: if ignore_missing:
return None return None
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f"No {cls.__name__} found for {name_or_id}" f"No {cls.__name__} found for {name_or_id}"
) )

@ -47,7 +47,7 @@ class Store(resource.Resource):
:class:`~openstack.image.v2.image.Image` instance. :class:`~openstack.image.v2.image.Image` instance.
:returns: The result of the ``delete`` if resource found, else None. :returns: The result of the ``delete`` if resource found, else None.
:raises: :class:`~openstack.exceptions.ResourceNotFound` when :raises: :class:`~openstack.exceptions.NotFoundException` when
ignore_missing if ``False`` and a nonexistent resource ignore_missing if ``False`` and a nonexistent resource
is attempted to be deleted. is attempted to be deleted.
""" """
@ -57,7 +57,7 @@ class Store(resource.Resource):
try: try:
response = session.delete(url) response = session.delete(url)
exceptions.raise_from_response(response) exceptions.raise_from_response(response)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
if ignore_missing: if ignore_missing:
return None return None
raise raise

@ -51,7 +51,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :returns: One
:class:`~masakariclient.sdk.ha.v1.notification.Notification` :class:`~masakariclient.sdk.ha.v1.notification.Notification`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_notification.Notification, notification) return self._get(_notification.Notification, notification)
@ -82,7 +82,7 @@ class Proxy(proxy.Proxy):
: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:`~masakariclient.sdk.ha.v1.segment.Segment` instance. :class:`~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.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_segment.Segment, segment) return self._get(_segment.Segment, segment)
@ -118,7 +118,7 @@ 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.NotFoundException` 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.
@ -159,7 +159,7 @@ class Proxy(proxy.Proxy):
`~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.NotFoundException`
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.
@ -179,7 +179,7 @@ class Proxy(proxy.Proxy):
: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.NotFoundException`
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.
@ -196,13 +196,13 @@ class Proxy(proxy.Proxy):
: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.NotFoundException` 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.NotFoundException`
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.
@ -246,7 +246,7 @@ class Proxy(proxy.Proxy):
a :class: `~masakariclient.sdk.ha.v1.notification.Notification` a :class: `~masakariclient.sdk.ha.v1.notification.Notification`
instance. instance.
:returns: one 'VMove' resource class. :returns: one 'VMove' resource class.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:raises: :class:`~openstack.exceptions.InvalidRequest` :raises: :class:`~openstack.exceptions.InvalidRequest`
when notification_id is None. when notification_id is None.

@ -42,7 +42,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.key_manager.v1.container.Container` :class:`~openstack.key_manager.v1.container.Container`
instance. 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.NotFoundException` will be
raised when the container does not exist. raised when the container 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 container. attempting to delete a nonexistent container.
@ -58,7 +58,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a container. :param name_or_id: The name or ID of a container.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -77,7 +77,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.key_manager.v1.container.Container` :returns: One :class:`~openstack.key_manager.v1.container.Container`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_container.Container, container) return self._get(_container.Container, container)
@ -125,7 +125,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.key_manager.v1.order.Order` :class:`~openstack.key_manager.v1.order.Order`
instance. 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.NotFoundException` will be
raised when the order does not exist. raised when the order 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 order. attempting to delete a nonexistent order.
@ -139,7 +139,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a order. :param name_or_id: The name or ID of a order.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -157,7 +157,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.key_manager.v1.order.Order` :returns: One :class:`~openstack.key_manager.v1.order.Order`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_order.Order, order) return self._get(_order.Order, order)
@ -205,7 +205,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.key_manager.v1.secret.Secret` :class:`~openstack.key_manager.v1.secret.Secret`
instance. 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.NotFoundException` will be
raised when the secret does not exist. raised when the secret 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 secret. attempting to delete a nonexistent secret.
@ -219,7 +219,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a secret. :param name_or_id: The name or ID of a secret.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -238,7 +238,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.key_manager.v1.secret.Secret` :returns: One :class:`~openstack.key_manager.v1.secret.Secret`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_secret.Secret, secret) return self._get(_secret.Secret, secret)

@ -102,7 +102,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.load_balancer.LoadBalancer` :class:`~openstack.load_balancer.v2.load_balancer.LoadBalancer`
instance instance
:param bool ignore_missing: When set to ``False`` :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 load balancer does not exist. the load balancer does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent load balancer. delete a nonexistent load balancer.
@ -122,7 +122,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a load balancer :param name_or_id: The name or ID of a load balancer
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the load balancer does not exist. when the load balancer does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent load balancer. to delete a nonexistent load balancer.
@ -216,7 +216,7 @@ class Proxy(proxy.Proxy):
:param listener: The value can be either the ID of a listener or a :param listener: The value can be either the ID of a listener or a
:class:`~openstack.load_balancer.v2.listener.Listener` instance. :class:`~openstack.load_balancer.v2.listener.Listener` 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.NotFoundException` will be
raised when the listner does not exist. raised when the listner 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 listener. attempting to delete a nonexistent listener.
@ -232,7 +232,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a listener. :param name_or_id: The name or ID of a listener.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -252,7 +252,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.load_balancer.v2.listener.Listener` :returns: One :class:`~openstack.load_balancer.v2.listener.Listener`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_listener.Listener, listener) return self._get(_listener.Listener, listener)
@ -266,7 +266,7 @@ class Proxy(proxy.Proxy):
:returns: One :returns: One
:class:`~openstack.load_balancer.v2.listener.ListenerStats` :class:`~openstack.load_balancer.v2.listener.ListenerStats`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
return self._get( return self._get(
@ -335,7 +335,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.pool.Pool` :class:`~openstack.load_balancer.v2.pool.Pool`
instance instance
:param bool ignore_missing: When set to ``False`` :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 pool does not exist. the pool does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent pool. delete a nonexistent pool.
@ -349,7 +349,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a pool :param name_or_id: The name or ID of a pool
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the pool does not exist. when the pool does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent pool. to delete a nonexistent pool.
@ -400,7 +400,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.pool.Pool` instance :class:`~openstack.load_balancer.v2.pool.Pool` instance
that the member belongs to. that the member belongs to.
: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.NotFoundException` will be
raised when the member does not exist. raised when the member 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 member. attempting to delete a nonexistent member.
@ -423,7 +423,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.pool.Pool` instance :class:`~openstack.load_balancer.v2.pool.Pool` instance
that the member belongs to. that the member belongs to.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -450,7 +450,7 @@ class Proxy(proxy.Proxy):
that the member belongs to. that the member belongs to.
:returns: One :class:`~openstack.load_balancer.v2.member.Member` :returns: One :class:`~openstack.load_balancer.v2.member.Member`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
poolobj = self._get_resource(_pool.Pool, pool) poolobj = self._get_resource(_pool.Pool, pool)
@ -496,7 +496,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a health monitor :param name_or_id: The name or ID of a health monitor
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the health monitor does not exist. when the health monitor does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to find a nonexistent health monitor. to find a nonexistent health monitor.
@ -507,7 +507,7 @@ class Proxy(proxy.Proxy):
:raises: :class:`openstack.exceptions.DuplicateResource` if more :raises: :class:`openstack.exceptions.DuplicateResource` if more
than one resource is found for this request. than one resource is found for this request.
:raises: :class:`openstack.exceptions.ResourceNotFound` if nothing :raises: :class:`openstack.exceptions.NotFoundException` if nothing
is found and ignore_missing is ``False``. is found and ignore_missing is ``False``.
""" """
return self._find( return self._find(
@ -565,7 +565,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.healthmonitor.HealthMonitor` :class:`~openstack.load_balancer.v2.healthmonitor.HealthMonitor`
instance instance
:param bool ignore_missing: When set to ``False`` :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 healthmonitor does not exist. the healthmonitor does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent healthmonitor. delete a nonexistent healthmonitor.
@ -610,7 +610,7 @@ class Proxy(proxy.Proxy):
:param l7_policy: The value can be either the ID of a l7policy or a :param l7_policy: The value can be either the ID of a l7policy or a
:class:`~openstack.load_balancer.v2.l7_policy.L7Policy` instance. :class:`~openstack.load_balancer.v2.l7_policy.L7Policy` 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.NotFoundException` will be
raised when the l7policy does not exist. raised when the l7policy 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 l7policy. attempting to delete a nonexistent l7policy.
@ -626,7 +626,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a l7policy. :param name_or_id: The name or ID of a l7policy.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -646,7 +646,7 @@ class Proxy(proxy.Proxy):
instance. instance.
:returns: One :class:`~openstack.load_balancer.v2.l7_policy.L7Policy` :returns: One :class:`~openstack.load_balancer.v2.l7_policy.L7Policy`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_l7policy.L7Policy, l7_policy) return self._get(_l7policy.L7Policy, l7_policy)
@ -703,7 +703,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.l7_policy.L7Policy` :class:`~openstack.load_balancer.v2.l7_policy.L7Policy`
instance that the l7rule belongs to. instance that the l7rule belongs to.
: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.NotFoundException` will be
raised when the l7rule does not exist. raised when the l7rule 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 l7rule. attempting to delete a nonexistent l7rule.
@ -726,7 +726,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.l7_policy.L7Policy` :class:`~openstack.load_balancer.v2.l7_policy.L7Policy`
instance that the l7rule belongs to. instance that the l7rule belongs to.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -753,7 +753,7 @@ class Proxy(proxy.Proxy):
instance that the l7rule belongs to. instance that the l7rule belongs to.
:returns: One :class:`~openstack.load_balancer.v2.l7_rule.L7Rule` :returns: One :class:`~openstack.load_balancer.v2.l7_rule.L7Rule`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
l7policyobj = self._get_resource(_l7policy.L7Policy, l7_policy) l7policyobj = self._get_resource(_l7policy.L7Policy, l7_policy)
@ -815,7 +815,7 @@ class Proxy(proxy.Proxy):
ID for the quota. ID for the quota.
:returns: One :class:`~openstack.load_balancer.v2.quota.Quota` :returns: One :class:`~openstack.load_balancer.v2.quota.Quota`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_quota.Quota, quota) return self._get(_quota.Quota, quota)
@ -850,7 +850,7 @@ class Proxy(proxy.Proxy):
instance. The ID of a quota is the same as the instance. The ID of a quota is the same as the
project ID for the quota. project ID for the quota.
: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.NotFoundException` will be
raised when quota does not exist. raised when quota 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 quota. attempting to delete a nonexistent quota.
@ -914,7 +914,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.flavor_profile.FlavorProfile` :class:`~openstack.load_balancer.v2.flavor_profile.FlavorProfile`
instance instance
:param bool ignore_missing: When set to ``False`` :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 flavor profile does not exist. the flavor profile does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent flavor profile. delete a nonexistent flavor profile.
@ -932,7 +932,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a flavor profile :param name_or_id: The name or ID of a flavor profile
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the flavor profile does not exist. when the flavor profile does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent flavor profile. to delete a nonexistent flavor profile.
@ -998,7 +998,7 @@ class Proxy(proxy.Proxy):
:param flavor: The flavorcan be either the ID or a :param flavor: The flavorcan be either the ID or a
:class:`~openstack.load_balancer.v2.flavor.Flavor` instance :class:`~openstack.load_balancer.v2.flavor.Flavor` instance
:param bool ignore_missing: When set to ``False`` :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 flavor does not exist. the flavor does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent flavor. delete a nonexistent flavor.
@ -1012,7 +1012,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a flavor :param name_or_id: The name or ID of a flavor
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the flavor does not exist. when the flavor does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent flavor. to delete a nonexistent flavor.
@ -1059,7 +1059,7 @@ class Proxy(proxy.Proxy):
:param amphora_id: The ID of a amphora :param amphora_id: The ID of a amphora
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the amphora does not exist. when the amphora does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to find a nonexistent amphora. to find a nonexistent amphora.
@ -1138,7 +1138,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile` :class:`~openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile`
instance instance
:param bool ignore_missing: When set to ``False`` :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 availability zone profile does not exist. the availability zone profile does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent availability zone profile. delete a nonexistent availability zone profile.
@ -1156,7 +1156,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a availability zone profile :param name_or_id: The name or ID of a availability zone profile
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the availability zone profile does not exist. when the availability zone profile does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent availability zone profile. to delete a nonexistent availability zone profile.
@ -1232,7 +1232,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.load_balancer.v2.availability_zone.AvailabilityZone` :class:`~openstack.load_balancer.v2.availability_zone.AvailabilityZone`
instance instance
:param bool ignore_missing: When set to ``False`` :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 availability zone does not exist. the availability zone does not exist.
When set to ``True``, no exception will be set when attempting to When set to ``True``, no exception will be set when attempting to
delete a nonexistent availability zone. delete a nonexistent availability zone.
@ -1250,7 +1250,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a availability zone :param name_or_id: The name or ID of a availability zone
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised :class:`~openstack.exceptions.NotFoundException` will be raised
when the availability zone does not exist. when the availability zone does not exist.
When set to ``True``, no exception will be set when attempting When set to ``True``, no exception will be set when attempting
to delete a nonexistent availability zone. to delete a nonexistent availability zone.

@ -45,7 +45,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.message.v2.queue.Queue` instance. :class:`~openstack.message.v2.queue.Queue` instance.
:returns: One :class:`~openstack.message.v2.queue.Queue` :returns: One :class:`~openstack.message.v2.queue.Queue`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
queue matching the name could be found. queue matching the name could be found.
""" """
return self._get(_queue.Queue, queue) return self._get(_queue.Queue, queue)
@ -73,7 +73,7 @@ class Proxy(proxy.Proxy):
:param value: The value can be either the name of a queue or a :param value: The value can be either the name of a queue or a
:class:`~openstack.message.v2.queue.Queue` instance. :class:`~openstack.message.v2.queue.Queue` 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.NotFoundException` will be
raised when the queue does not exist. raised when the queue 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 queue. attempting to delete a nonexistent queue.
@ -127,7 +127,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.message.v2.message.Message` instance. :class:`~openstack.message.v2.message.Message` instance.
:returns: One :class:`~openstack.message.v2.message.Message` :returns: One :class:`~openstack.message.v2.message.Message`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
message matching the criteria could be found. message matching the criteria could be found.
""" """
message = self._get_resource( message = self._get_resource(
@ -148,7 +148,7 @@ class Proxy(proxy.Proxy):
the claim seizing the message. If None, the message has the claim seizing the message. If None, the message has
not been claimed. not been claimed.
: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.NotFoundException` will be
raised when the message does not exist. raised when the message 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 message. attempting to delete a nonexistent message.
@ -206,7 +206,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.message.v2.subscription.Subscription` instance. :class:`~openstack.message.v2.subscription.Subscription` instance.
:returns: One :class:`~openstack.message.v2.subscription.Subscription` :returns: One :class:`~openstack.message.v2.subscription.Subscription`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
subscription matching the criteria could be found. subscription matching the criteria could be found.
""" """
subscription = self._get_resource( subscription = self._get_resource(
@ -223,7 +223,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.message.v2.subscription.Subscription` :class:`~openstack.message.v2.subscription.Subscription`
instance. 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.NotFoundException` will be
raised when the subscription does not exist. raised when the subscription does not exist.
When set to ``True``, no exception will be thrown when When set to ``True``, no exception will be thrown when
attempting to delete a nonexistent subscription. attempting to delete a nonexistent subscription.
@ -260,7 +260,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.message.v2.claim.Claim` instance. :class:`~openstack.message.v2.claim.Claim` instance.
:returns: One :class:`~openstack.message.v2.claim.Claim` :returns: One :class:`~openstack.message.v2.claim.Claim`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
claim matching the criteria could be found. claim matching the criteria could be found.
""" """
return self._get(_claim.Claim, claim, queue_name=queue_name) return self._get(_claim.Claim, claim, queue_name=queue_name)
@ -289,7 +289,7 @@ class Proxy(proxy.Proxy):
:param claim: The value can be either the ID of a claim or a :param claim: The value can be either the ID of a claim or a
:class:`~openstack.message.v2.claim.Claim` instance. :class:`~openstack.message.v2.claim.Claim` 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.NotFoundException` will be
raised when the claim does not exist. raised when the claim does not exist.
When set to ``True``, no exception will be thrown when When set to ``True``, no exception will be thrown when
attempting to delete a nonexistent claim. attempting to delete a nonexistent claim.

File diff suppressed because it is too large Load Diff

@ -157,7 +157,7 @@ class Proxy(proxy.Proxy):
:param container: The value can be either the name of a container or a :param container: The value can be either the name of a container or a
:class:`~openstack.object_store.v1.container.Container` instance. :class:`~openstack.object_store.v1.container.Container` instance.
:param bool ignore_missing: When set to ``False`` :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 container does not exist. When set to ``True``, no exception the container does not exist. When set to ``True``, no exception
will be set when attempting to delete a nonexistent server. will be set when attempting to delete a nonexistent server.
@ -174,7 +174,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.object_store.v1.container.Container` instance. :class:`~openstack.object_store.v1.container.Container` instance.
:returns: One :class:`~openstack.object_store.v1.container.Container` :returns: One :class:`~openstack.object_store.v1.container.Container`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._head(_container.Container, container) return self._head(_container.Container, container)
@ -279,7 +279,7 @@ class Proxy(proxy.Proxy):
:returns: Instance of the :returns: Instance of the
:class:`~openstack.object_store.v1.obj.Object` objects. :class:`~openstack.object_store.v1.obj.Object` objects.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
container_name = self._get_container_name(obj=obj, container=container) container_name = self._get_container_name(obj=obj, container=container)
@ -323,7 +323,7 @@ class Proxy(proxy.Proxy):
:param container: The value can be the name of a container or a :param container: The value can be the name of a container or a
:class:`~openstack.object_store.v1.container.Container` instance. :class:`~openstack.object_store.v1.container.Container` instance.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
container_name = self._get_container_name(obj=obj, container=container) container_name = self._get_container_name(obj=obj, container=container)
@ -340,7 +340,7 @@ class Proxy(proxy.Proxy):
:param container: The value can be the name of a container or a :param container: The value can be the name of a container or a
:class:`~openstack.object_store.v1.container.Container` instance. :class:`~openstack.object_store.v1.container.Container` instance.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
:returns: An iterator that iterates over chunk_size bytes :returns: An iterator that iterates over chunk_size bytes
""" """
@ -491,7 +491,7 @@ class Proxy(proxy.Proxy):
:param container: The value can be the ID of a container or a :param container: The value can be the ID of a container or a
:class:`~openstack.object_store.v1.container.Container` instance. :class:`~openstack.object_store.v1.container.Container` instance.
:param bool ignore_missing: When set to ``False`` :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 object does not exist. When set to ``True``, no exception will the object does not exist. When set to ``True``, no exception will
be set when attempting to delete a nonexistent server. be set when attempting to delete a nonexistent server.
@ -515,7 +515,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.object_store.v1.container.Container` instance. :class:`~openstack.object_store.v1.container.Container` instance.
:returns: One :class:`~openstack.object_store.v1.obj.Object` :returns: One :class:`~openstack.object_store.v1.obj.Object`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
container_name = self._get_container_name(obj, container) container_name = self._get_container_name(obj, container)

@ -75,7 +75,7 @@ class Info(resource.Resource):
:return: This :class:`Resource` instance. :return: This :class:`Resource` instance.
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
:data:`Resource.allow_fetch` is not set to ``True``. :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. the resource was not found.
""" """
if not self.allow_fetch: if not self.allow_fetch:

@ -130,7 +130,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a stack. :param name_or_id: The name or ID of a stack.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -162,7 +162,7 @@ class Proxy(proxy.Proxy):
:param resolve_outputs: Whether stack should contain outputs resolved. :param resolve_outputs: Whether stack should contain outputs resolved.
:returns: One :class:`~openstack.orchestration.v1.stack.Stack` :returns: One :class:`~openstack.orchestration.v1.stack.Stack`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
return self._get(_stack.Stack, stack, resolve_outputs=resolve_outputs) return self._get(_stack.Stack, stack, resolve_outputs=resolve_outputs)
@ -177,7 +177,7 @@ class Proxy(proxy.Proxy):
:returns: The updated stack :returns: The updated stack
:rtype: :class:`~openstack.orchestration.v1.stack.Stack` :rtype: :class:`~openstack.orchestration.v1.stack.Stack`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
res = self._get_resource(_stack.Stack, stack, **attrs) res = self._get_resource(_stack.Stack, stack, **attrs)
@ -190,7 +190,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.orchestration.v1.stack.Stack` :class:`~openstack.orchestration.v1.stack.Stack`
instance. 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.NotFoundException` will be
raised when the stack does not exist. raised when the stack 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 stack. attempting to delete a nonexistent stack.
@ -232,7 +232,7 @@ class Proxy(proxy.Proxy):
:param stack: The value can be the ID or a name or :param stack: The value can be the ID or a name or
an instance of :class:`~openstack.orchestration.v1.stack.Stack` an instance of :class:`~openstack.orchestration.v1.stack.Stack`
:returns: A dictionary containing the stack data. :returns: A dictionary containing the stack data.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
if isinstance(stack, _stack.Stack): if isinstance(stack, _stack.Stack):
@ -269,7 +269,7 @@ class Proxy(proxy.Proxy):
:returns: One object of :returns: One object of
:class:`~openstack.orchestration.v1.stack_template.StackTemplate` :class:`~openstack.orchestration.v1.stack_template.StackTemplate`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when no resource can be found. when no resource can be found.
""" """
if isinstance(stack, _stack.Stack): if isinstance(stack, _stack.Stack):
@ -292,7 +292,7 @@ class Proxy(proxy.Proxy):
:returns: One object of :returns: One object of
:class:`~openstack.orchestration.v1.stack_environment.StackEnvironment` :class:`~openstack.orchestration.v1.stack_environment.StackEnvironment`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
""" """
if isinstance(stack, _stack.Stack): if isinstance(stack, _stack.Stack):
@ -315,7 +315,7 @@ class Proxy(proxy.Proxy):
:returns: A dictionary containing the names and contents of all files :returns: A dictionary containing the names and contents of all files
used by the stack. used by the stack.
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when the stack cannot be found. when the stack cannot be found.
""" """
if isinstance(stack, _stack.Stack): if isinstance(stack, _stack.Stack):
@ -339,7 +339,7 @@ class Proxy(proxy.Proxy):
an exception is thrown. an exception is thrown.
:rtype: A generator of :rtype: A generator of
:class:`~openstack.orchestration.v1.resource.Resource` :class:`~openstack.orchestration.v1.resource.Resource`
:raises: :class:`~openstack.exceptions.ResourceNotFound` :raises: :class:`~openstack.exceptions.NotFoundException`
when the stack cannot be found. when the stack cannot be found.
""" """
# first try treat the value as a stack object or an ID # first try treat the value as a stack object or an ID
@ -395,7 +395,7 @@ class Proxy(proxy.Proxy):
config or an instance of config or an instance of
:class:`~openstack.orchestration.v1.software_config.SoftwareConfig` :class:`~openstack.orchestration.v1.software_config.SoftwareConfig`
: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.NotFoundException` will be
raised when the software config does not exist. raised when the software config 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 software config. attempting to delete a nonexistent software config.
@ -450,7 +450,7 @@ class Proxy(proxy.Proxy):
software deployment or an instance of software deployment or an instance of
:class:`~openstack.orchestration.v1.software_deployment.SoftwareDeployment` :class:`~openstack.orchestration.v1.software_deployment.SoftwareDeployment`
: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.NotFoundException` will be
raised when the software deployment does not exist. raised when the software deployment 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 software deployment. attempting to delete a nonexistent software deployment.

@ -242,7 +242,7 @@ class Stack(resource.Resource):
self._translate_response(response, **kwargs) self._translate_response(response, **kwargs)
if self and self.status in ['DELETE_COMPLETE', 'ADOPT_COMPLETE']: if self and self.status in ['DELETE_COMPLETE', 'ADOPT_COMPLETE']:
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
"No stack found for %s" % self.id "No stack found for %s" % self.id
) )
return self return self
@ -256,7 +256,7 @@ class Stack(resource.Resource):
:param name_or_id: This resource's identifier, if needed by :param name_or_id: This resource's identifier, if needed by
the request. The default is ``None``. the request. The default is ``None``.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -269,7 +269,7 @@ class Stack(resource.Resource):
or None if nothing matches. or None if nothing matches.
:raises: :class:`openstack.exceptions.DuplicateResource` if more :raises: :class:`openstack.exceptions.DuplicateResource` if more
than one resource is found for this request. than one resource is found for this request.
:raises: :class:`openstack.exceptions.ResourceNotFound` if nothing :raises: :class:`openstack.exceptions.NotFoundException` if nothing
is found and ignore_missing is ``False``. is found and ignore_missing is ``False``.
""" """
session = cls._get_session(session) session = cls._get_session(session)
@ -287,7 +287,7 @@ class Stack(resource.Resource):
if ignore_missing: if ignore_missing:
return None return None
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f"No {cls.__name__} found for {name_or_id}" f"No {cls.__name__} found for {name_or_id}"
) )

@ -48,7 +48,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.placement.v1.resource_class.ResourceClass`, :class:`~openstack.placement.v1.resource_class.ResourceClass`,
instance. instance.
:param bool ignore_missing: When set to ``False`` :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 class does not exist. When set to ``True``, no the resource class does not exist. When set to ``True``, no
exception will be set when attempting to delete a nonexistent exception will be set when attempting to delete a nonexistent
resource class. resource class.
@ -90,7 +90,7 @@ class Proxy(proxy.Proxy):
:returns: An instance of :returns: An instance of
:class:`~openstack.placement.v1.resource_class.ResourceClass` :class:`~openstack.placement.v1.resource_class.ResourceClass`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource class matching the criteria could be found. resource class matching the criteria could be found.
""" """
return self._get( return self._get(
@ -130,7 +130,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.placement.v1.resource_provider.ResourceProvider`, :class:`~openstack.placement.v1.resource_provider.ResourceProvider`,
instance. instance.
:param bool ignore_missing: When set to ``False`` :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 provider does not exist. When set to ``True``, no the resource provider does not exist. When set to ``True``, no
exception will be set when attempting to delete a nonexistent exception will be set when attempting to delete a nonexistent
resource provider. resource provider.
@ -172,7 +172,7 @@ class Proxy(proxy.Proxy):
:returns: An instance of :returns: An instance of
:class:`~openstack.placement.v1.resource_provider.ResourceProvider` :class:`~openstack.placement.v1.resource_provider.ResourceProvider`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource provider matching the criteria could be found. resource provider matching the criteria could be found.
""" """
return self._get( return self._get(
@ -185,13 +185,13 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a resource provider. :param name_or_id: The name or ID of a resource provider.
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:returns: An instance of :returns: An instance of
:class:`~openstack.placement.v1.resource_provider.ResourceProvider` :class:`~openstack.placement.v1.resource_provider.ResourceProvider`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource provider matching the criteria could be found. resource provider matching the criteria could be found.
""" """
return self._find( return self._find(
@ -223,7 +223,7 @@ class Proxy(proxy.Proxy):
:returns: An instance of :returns: An instance of
:class:`~openstack.placement.v1.resource_provider.ResourceProvider` :class:`~openstack.placement.v1.resource_provider.ResourceProvider`
with the ``aggregates`` attribute populated. with the ``aggregates`` attribute populated.
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource provider matching the criteria could be found. resource provider matching the criteria could be found.
""" """
res = self._get_resource( res = self._get_resource(
@ -245,7 +245,7 @@ class Proxy(proxy.Proxy):
:returns: An instance of :returns: An instance of
:class:`~openstack.placement.v1.resource_provider.ResourceProvider` :class:`~openstack.placement.v1.resource_provider.ResourceProvider`
with the ``aggregates`` attribute populated with the updated value. with the ``aggregates`` attribute populated with the updated value.
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource provider matching the criteria could be found. resource provider matching the criteria could be found.
""" """
res = self._get_resource( res = self._get_resource(
@ -305,7 +305,7 @@ class Proxy(proxy.Proxy):
instance. This value must be specified when instance. This value must be specified when
``resource_provider_inventory`` is an ID. ``resource_provider_inventory`` is an ID.
:param bool ignore_missing: When set to ``False`` :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 provider inventory does not exist. When set to the resource provider inventory does not exist. When set to
``True``, no exception will be set when attempting to delete a ``True``, no exception will be set when attempting to delete a
nonexistent resource provider inventory. nonexistent resource provider inventory.
@ -379,7 +379,7 @@ class Proxy(proxy.Proxy):
:returns: An instance of :returns: An instance of
:class:`~openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory` :class:`~openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource provider inventory matching the criteria could be found. resource provider inventory matching the criteria could be found.
""" """
resource_provider_id = self._get_uri_attribute( resource_provider_id = self._get_uri_attribute(
@ -429,7 +429,7 @@ class Proxy(proxy.Proxy):
:param trait: The value can be either the ID of a trait or an :param trait: The value can be either the ID of a trait or an
:class:`~openstack.placement.v1.trait.Trait`, instance. :class:`~openstack.placement.v1.trait.Trait`, instance.
:param bool ignore_missing: When set to ``False`` :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 provider inventory does not exist. When set to the resource provider inventory does not exist. When set to
``True``, no exception will be set when attempting to delete a ``True``, no exception will be set when attempting to delete a
nonexistent resource provider inventory. nonexistent resource provider inventory.
@ -446,7 +446,7 @@ class Proxy(proxy.Proxy):
:returns: An instance of :returns: An instance of
:class:`~openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory` :class:`~openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
trait matching the criteria could be found. trait matching the criteria could be found.
""" """
return self._get(_trait.Trait, trait) return self._get(_trait.Trait, trait)

@ -519,7 +519,7 @@ class Proxy(adapter.Adapter):
:param name_or_id: The name or ID of a resource to find. :param name_or_id: The name or ID of a resource to find.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -550,7 +550,7 @@ class Proxy(adapter.Adapter):
resource or a :class:`~openstack.resource.Resource` resource or a :class:`~openstack.resource.Resource`
subclass. subclass.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource 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 resource. attempting to delete a nonexistent resource.
@ -560,7 +560,7 @@ class Proxy(adapter.Adapter):
:raises: ``ValueError`` if ``value`` is a :raises: ``ValueError`` if ``value`` is a
:class:`~openstack.resource.Resource` that doesn't match :class:`~openstack.resource.Resource` that doesn't match
the ``resource_type``. the ``resource_type``.
:class:`~openstack.exceptions.ResourceNotFound` when :class:`~openstack.exceptions.NotFoundException` when
ignore_missing if ``False`` and a nonexistent resource ignore_missing if ``False`` and a nonexistent resource
is attempted to be deleted. is attempted to be deleted.
""" """
@ -568,7 +568,7 @@ class Proxy(adapter.Adapter):
try: try:
rv = res.delete(self) rv = res.delete(self)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
if ignore_missing: if ignore_missing:
return None return None
raise raise

@ -1680,7 +1680,7 @@ class Resource(dict):
:return: This :class:`Resource` instance. :return: This :class:`Resource` instance.
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
:data:`Resource.allow_fetch` is not set to ``True``. :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. the resource was not found.
""" """
if not self.allow_fetch: if not self.allow_fetch:
@ -1721,7 +1721,7 @@ class Resource(dict):
:return: This :class:`Resource` instance. :return: This :class:`Resource` instance.
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
:data:`Resource.allow_head` is not set to ``True``. :data:`Resource.allow_head` is not set to ``True``.
:raises: :exc:`~openstack.exceptions.ResourceNotFound` if the resource :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource
was not found. was not found.
""" """
if not self.allow_head: if not self.allow_head:
@ -1952,7 +1952,7 @@ class Resource(dict):
:return: This :class:`Resource` instance. :return: This :class:`Resource` instance.
:raises: :exc:`~openstack.exceptions.MethodNotSupported` if :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
:data:`Resource.allow_commit` is not set to ``True``. :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. the resource was not found.
""" """
@ -2316,9 +2316,9 @@ class Resource(dict):
:param name_or_id: This resource's identifier, if needed by :param name_or_id: This resource's identifier, if needed by
the request. The default is ``None``. the request. The default is ``None``.
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will be raised when :class:`~openstack.exceptions.NotFoundException` will be raised
the resource does not exist. When set to ``True``, None will be when the resource does not exist. When set to ``True``, None will
returned when attempting to find a nonexistent resource. be returned when attempting to find a nonexistent resource.
:param str list_base_path: base_path to be used when need listing :param str list_base_path: base_path to be used when need listing
resources. resources.
:param str microversion: API version to override the negotiated one. :param str microversion: API version to override the negotiated one.
@ -2331,8 +2331,8 @@ class Resource(dict):
or None if nothing matches. or None if nothing matches.
:raises: :class:`openstack.exceptions.DuplicateResource` if more :raises: :class:`openstack.exceptions.DuplicateResource` if more
than one resource is found for this request. than one resource is found for this request.
:raises: :class:`openstack.exceptions.ResourceNotFound` if nothing :raises: :class:`openstack.exceptions.NotFoundException` if nothing is
is found and ignore_missing is ``False``. found and ignore_missing is ``False``.
""" """
session = cls._get_session(session) session = cls._get_session(session)
@ -2377,7 +2377,7 @@ class Resource(dict):
if ignore_missing: if ignore_missing:
return None return None
raise exceptions.ResourceNotFound( raise exceptions.NotFoundException(
f"No {cls.__name__} found for {name_or_id}" f"No {cls.__name__} found for {name_or_id}"
) )

@ -124,7 +124,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a share. :param name_or_id: The name or ID of a share.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -312,7 +312,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a share group. :param name_or_id: The name or ID of a share group.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.

@ -93,7 +93,7 @@ class ShareAccessRule(resource.Resource):
try: try:
response = self._action(session, body, url) response = self._action(session, body, url)
self._translate_response(response) self._translate_response(response)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
if not ignore_missing: if not ignore_missing:
raise raise
return response return response

@ -64,7 +64,7 @@ class TestBareMetalAllocation(Base):
self.conn.baremetal.delete_allocation(allocation, ignore_missing=False) self.conn.baremetal.delete_allocation(allocation, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_allocation, self.conn.baremetal.get_allocation,
allocation.id, allocation.id,
) )
@ -113,12 +113,12 @@ class TestBareMetalAllocation(Base):
def test_allocation_negative_non_existing(self): def test_allocation_negative_non_existing(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_allocation, self.conn.baremetal.get_allocation,
uuid, uuid,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_allocation, self.conn.baremetal.delete_allocation,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
@ -158,7 +158,7 @@ class TestBareMetalAllocationUpdate(Base):
self.conn.baremetal.delete_allocation(allocation, ignore_missing=False) self.conn.baremetal.delete_allocation(allocation, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_allocation, self.conn.baremetal.get_allocation,
allocation.id, allocation.id,
) )
@ -203,7 +203,7 @@ class TestBareMetalAllocationUpdate(Base):
self.conn.baremetal.delete_allocation(allocation, ignore_missing=False) self.conn.baremetal.delete_allocation(allocation, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_allocation, self.conn.baremetal.get_allocation,
allocation.id, allocation.id,
) )

@ -24,7 +24,7 @@ class TestBareMetalChassis(base.BaseBaremetalTest):
self.conn.baremetal.delete_chassis(chassis, ignore_missing=False) self.conn.baremetal.delete_chassis(chassis, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_chassis, self.conn.baremetal.get_chassis,
chassis.id, chassis.id,
) )
@ -53,16 +53,16 @@ class TestBareMetalChassis(base.BaseBaremetalTest):
def test_chassis_negative_non_existing(self): def test_chassis_negative_non_existing(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, self.conn.baremetal.get_chassis, uuid exceptions.NotFoundException, self.conn.baremetal.get_chassis, uuid
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.find_chassis, self.conn.baremetal.find_chassis,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_chassis, self.conn.baremetal.delete_chassis,
uuid, uuid,
ignore_missing=False, ignore_missing=False,

@ -40,7 +40,7 @@ class TestBareMetalDeployTemplate(base.BaseBaremetalTest):
deploy_template, ignore_missing=False deploy_template, ignore_missing=False
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_deploy_template, self.conn.baremetal.get_deploy_template,
deploy_template.id, deploy_template.id,
) )
@ -165,12 +165,12 @@ class TestBareMetalDeployTemplate(base.BaseBaremetalTest):
def test_deploy_template_negative_non_existing(self): def test_deploy_template_negative_non_existing(self):
uuid = "bbb45f41-d4bc-4307-8d1d-32f95ce1e920" uuid = "bbb45f41-d4bc-4307-8d1d-32f95ce1e920"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_deploy_template, self.conn.baremetal.get_deploy_template,
uuid, uuid,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_deploy_template, self.conn.baremetal.delete_deploy_template,
uuid, uuid,
ignore_missing=False, ignore_missing=False,

@ -27,7 +27,7 @@ class TestBareMetalDriver(base.BaseBaremetalTest):
def test_driver_negative_non_existing(self): def test_driver_negative_non_existing(self):
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_driver, self.conn.baremetal.get_driver,
'not-a-driver', 'not-a-driver',
) )

@ -50,7 +50,7 @@ class TestBareMetalNode(base.BaseBaremetalTest):
self.conn.baremetal.delete_node(node, ignore_missing=False) self.conn.baremetal.delete_node(node, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_node, self.conn.baremetal.get_node,
self.node_id, self.node_id,
) )
@ -63,7 +63,7 @@ class TestBareMetalNode(base.BaseBaremetalTest):
self.conn.baremetal.delete_node(node, ignore_missing=False) self.conn.baremetal.delete_node(node, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_node, self.conn.baremetal.get_node,
self.node_id, self.node_id,
) )
@ -223,22 +223,22 @@ class TestBareMetalNode(base.BaseBaremetalTest):
def test_node_negative_non_existing(self): def test_node_negative_non_existing(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, self.conn.baremetal.get_node, uuid exceptions.NotFoundException, self.conn.baremetal.get_node, uuid
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.find_node, self.conn.baremetal.find_node,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_node, self.conn.baremetal.delete_node,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.update_node, self.conn.baremetal.update_node,
uuid, uuid,
name='new-name', name='new-name',
@ -422,18 +422,18 @@ class TestBareMetalVif(base.BaseBaremetalTest):
def test_node_vif_negative(self): def test_node_vif_negative(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.attach_vif_to_node, self.conn.baremetal.attach_vif_to_node,
uuid, uuid,
self.vif_id, self.vif_id,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.list_node_vifs, self.conn.baremetal.list_node_vifs,
uuid, uuid,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.detach_vif_from_node, self.conn.baremetal.detach_vif_from_node,
uuid, uuid,
self.vif_id, self.vif_id,

@ -40,7 +40,7 @@ class TestBareMetalPort(base.BaseBaremetalTest):
self.conn.baremetal.delete_port(port, ignore_missing=False) self.conn.baremetal.delete_port(port, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, self.conn.baremetal.get_port, port.id exceptions.NotFoundException, self.conn.baremetal.get_port, port.id
) )
def test_port_list(self): def test_port_list(self):
@ -107,22 +107,22 @@ class TestBareMetalPort(base.BaseBaremetalTest):
def test_port_negative_non_existing(self): def test_port_negative_non_existing(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, self.conn.baremetal.get_port, uuid exceptions.NotFoundException, self.conn.baremetal.get_port, uuid
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.find_port, self.conn.baremetal.find_port,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_port, self.conn.baremetal.delete_port,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.update_port, self.conn.baremetal.update_port,
uuid, uuid,
pxe_enabled=True, pxe_enabled=True,

@ -37,7 +37,7 @@ class TestBareMetalPortGroup(base.BaseBaremetalTest):
self.conn.baremetal.delete_port_group(port_group, ignore_missing=False) self.conn.baremetal.delete_port_group(port_group, ignore_missing=False)
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_port_group, self.conn.baremetal.get_port_group,
port_group.id, port_group.id,
) )
@ -100,18 +100,18 @@ class TestBareMetalPortGroup(base.BaseBaremetalTest):
def test_port_group_negative_non_existing(self): def test_port_group_negative_non_existing(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_port_group, self.conn.baremetal.get_port_group,
uuid, uuid,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.find_port_group, self.conn.baremetal.find_port_group,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_port_group, self.conn.baremetal.delete_port_group,
uuid, uuid,
ignore_missing=False, ignore_missing=False,

@ -45,7 +45,7 @@ class TestBareMetalVolumeconnector(base.BaseBaremetalTest):
volume_connector, ignore_missing=False volume_connector, ignore_missing=False
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_volume_connector, self.conn.baremetal.get_volume_connector,
volume_connector.id, volume_connector.id,
) )
@ -152,18 +152,18 @@ class TestBareMetalVolumeconnector(base.BaseBaremetalTest):
def test_volume_connector_negative_non_existing(self): def test_volume_connector_negative_non_existing(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_volume_connector, self.conn.baremetal.get_volume_connector,
uuid, uuid,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.find_volume_connector, self.conn.baremetal.find_volume_connector,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_volume_connector, self.conn.baremetal.delete_volume_connector,
uuid, uuid,
ignore_missing=False, ignore_missing=False,

@ -47,7 +47,7 @@ class TestBareMetalVolumetarget(base.BaseBaremetalTest):
volume_target, ignore_missing=False volume_target, ignore_missing=False
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_volume_target, self.conn.baremetal.get_volume_target,
volume_target.id, volume_target.id,
) )
@ -166,18 +166,18 @@ class TestBareMetalVolumetarget(base.BaseBaremetalTest):
def test_volume_target_negative_non_existing(self): def test_volume_target_negative_non_existing(self):
uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971"
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.get_volume_target, self.conn.baremetal.get_volume_target,
uuid, uuid,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.find_volume_target, self.conn.baremetal.find_volume_target,
uuid, uuid,
ignore_missing=False, ignore_missing=False,
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.baremetal.delete_volume_target, self.conn.baremetal.delete_volume_target,
uuid, uuid,
ignore_missing=False, ignore_missing=False,

@ -48,7 +48,7 @@ class TestFlavor(base.BaseFunctionalTest):
def test_find_flavors_no_match_ignore_false(self): def test_find_flavors_no_match_ignore_false(self):
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.conn.compute.find_flavor, self.conn.compute.find_flavor,
"not a flavor", "not a flavor",
ignore_missing=False, ignore_missing=False,

@ -123,7 +123,7 @@ class TestZoneShare(base.BaseFunctionalTest):
def test_find_zone_share_ignore_missing_false(self): def test_find_zone_share_ignore_missing_false(self):
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.operator_cloud.dns.find_zone_share, self.operator_cloud.dns.find_zone_share,
self.zone, self.zone,
'bogus_id', 'bogus_id',

@ -72,7 +72,7 @@ class TestStack(base.BaseFunctionalTest):
self.conn.orchestration.wait_for_status( self.conn.orchestration.wait_for_status(
self.stack, 'DELETE_COMPLETE', wait=self._wait_for_timeout self.stack, 'DELETE_COMPLETE', wait=self._wait_for_timeout
) )
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
pass pass
test_network.delete_network(self.conn, self.network, self.subnet) test_network.delete_network(self.conn, self.network, self.subnet)
super().tearDown() super().tearDown()

@ -192,7 +192,7 @@ class ManageUnmanageShareTest(base.BaseSharedFileSystemTest):
try: try:
self.operator_cloud.share.get_share(self.SHARE_ID) self.operator_cloud.share.get_share(self.SHARE_ID)
except exceptions.ResourceNotFound: except exceptions.NotFoundException:
pass pass
managed_share = self.operator_cloud.share.manage_share( managed_share = self.operator_cloud.share.manage_share(

@ -66,7 +66,7 @@ class TestNovaExtensions(base.TestCase):
] ]
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, self.cloud._nova_extensions exceptions.NotFoundException, self.cloud._nova_extensions
) )
self.assert_calls() self.assert_calls()

@ -235,7 +235,7 @@ class TestDomains(base.TestCase):
), ),
] ]
) )
with testtools.ExpectedException(exceptions.ResourceNotFound): with testtools.ExpectedException(exceptions.NotFoundException):
self.cloud.delete_domain(domain_data.domain_id) self.cloud.delete_domain(domain_data.domain_id)
self.assert_calls() self.assert_calls()

@ -444,7 +444,7 @@ class TestFirewallPolicy(FirewallTestCase):
with mock.patch.object(self.cloud.network, 'create_firewall_policy'): with mock.patch.object(self.cloud.network, 'create_firewall_policy'):
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.cloud.create_firewall_policy, self.cloud.create_firewall_policy,
**posted_policy **posted_policy
) )
@ -947,7 +947,7 @@ class TestFirewallPolicy(FirewallTestCase):
with mock.patch.object(self.cloud.network, 'find_firewall_rule'): with mock.patch.object(self.cloud.network, 'find_firewall_rule'):
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.cloud.insert_rule_into_policy, self.cloud.insert_rule_into_policy,
policy_name, policy_name,
'bogus_rule', 'bogus_rule',
@ -979,7 +979,7 @@ class TestFirewallPolicy(FirewallTestCase):
] ]
) )
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.cloud.insert_rule_into_policy, self.cloud.insert_rule_into_policy,
self.firewall_policy_id, self.firewall_policy_id,
rule_name, rule_name,
@ -1088,7 +1088,7 @@ class TestFirewallPolicy(FirewallTestCase):
with mock.patch.object(self.cloud.network, 'find_firewall_rule'): with mock.patch.object(self.cloud.network, 'find_firewall_rule'):
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.cloud.remove_rule_from_policy, self.cloud.remove_rule_from_policy,
self.firewall_policy_name, self.firewall_policy_name,
TestFirewallRule.firewall_rule_name, TestFirewallRule.firewall_rule_name,

@ -66,7 +66,7 @@ class TestNeutronExtensions(base.TestCase):
) )
] ]
) )
with testtools.ExpectedException(exceptions.ResourceNotFound): with testtools.ExpectedException(exceptions.NotFoundException):
self.cloud._neutron_extensions() self.cloud._neutron_extensions()
self.assert_calls() self.assert_calls()

@ -64,7 +64,7 @@ class TestSearch(base.TestCase):
) )
def test_search_resources_list(self): def test_search_resources_list(self):
self.session._get.side_effect = exceptions.ResourceNotFound self.session._get.side_effect = exceptions.NotFoundException
self.session._list.return_value = [self.FakeResource(foo="bar")] self.session._list.return_value = [self.FakeResource(foo="bar")]
ret = self.cloud.search_resources("mock_session.fake", "fake_name") ret = self.cloud.search_resources("mock_session.fake", "fake_name")
@ -79,7 +79,7 @@ class TestSearch(base.TestCase):
) )
def test_search_resources_args(self): def test_search_resources_args(self):
self.session._get.side_effect = exceptions.ResourceNotFound self.session._get.side_effect = exceptions.NotFoundException
self.session._list.return_value = [] self.session._list.return_value = []
self.cloud.search_resources( self.cloud.search_resources(

@ -127,7 +127,7 @@ class TestService(base.TestCase):
list_mock.return_value = data list_mock.return_value = data
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
service.Service.find, service.Service.find,
self.sess, self.sess,
'fake', 'fake',

@ -78,7 +78,7 @@ class TestTrunk(base.TestCase):
'segmentation_type': 'vlan', 'segmentation_type': 'vlan',
} }
] ]
with testtools.ExpectedException(exceptions.ResourceNotFound, msg): with testtools.ExpectedException(exceptions.NotFoundException, msg):
sot.add_subports(sess, subports) sot.add_subports(sess, subports)
def test_delete_subports_4xx(self): def test_delete_subports_4xx(self):
@ -100,5 +100,5 @@ class TestTrunk(base.TestCase):
'segmentation_type': 'vlan', 'segmentation_type': 'vlan',
} }
] ]
with testtools.ExpectedException(exceptions.ResourceNotFound, msg): with testtools.ExpectedException(exceptions.NotFoundException, msg):
sot.delete_subports(sess, subports) sot.delete_subports(sess, subports)

@ -348,12 +348,12 @@ class TestOrchestrationResource(TestOrchestrationProxy):
@mock.patch.object(resource.Resource, 'list') @mock.patch.object(resource.Resource, 'list')
def test_resources_stack_not_found(self, mock_list, mock_find): def test_resources_stack_not_found(self, mock_list, mock_find):
stack_name = 'test_stack' stack_name = 'test_stack'
mock_find.side_effect = exceptions.ResourceNotFound( mock_find.side_effect = exceptions.NotFoundException(
'No stack found for test_stack' 'No stack found for test_stack'
) )
ex = self.assertRaises( ex = self.assertRaises(
exceptions.ResourceNotFound, self.proxy.resources, stack_name exceptions.NotFoundException, self.proxy.resources, stack_name
) )
self.assertEqual('No stack found for test_stack', str(ex)) self.assertEqual('No stack found for test_stack', str(ex))

@ -230,7 +230,7 @@ class TestStack(base.TestCase):
test_resource.FakeResponse( test_resource.FakeResponse(
{'stack': {'stack_status': 'CREATE_COMPLETE'}}, 200 {'stack': {'stack_status': 'CREATE_COMPLETE'}}, 200
), ),
exceptions.ResourceNotFound(message='oops'), exceptions.NotFoundException(message='oops'),
test_resource.FakeResponse( test_resource.FakeResponse(
{'stack': {'stack_status': 'DELETE_COMPLETE'}}, 200 {'stack': {'stack_status': 'DELETE_COMPLETE'}}, 200
), ),
@ -248,9 +248,9 @@ class TestStack(base.TestCase):
microversion=None, microversion=None,
skip_cache=False, skip_cache=False,
) )
ex = self.assertRaises(exceptions.ResourceNotFound, sot.fetch, sess) ex = self.assertRaises(exceptions.NotFoundException, sot.fetch, sess)
self.assertEqual('oops', str(ex)) self.assertEqual('oops', str(ex))
ex = self.assertRaises(exceptions.ResourceNotFound, sot.fetch, sess) ex = self.assertRaises(exceptions.NotFoundException, sot.fetch, sess)
self.assertEqual('No stack found for %s' % FAKE_ID, str(ex)) self.assertEqual('No stack found for %s' % FAKE_ID, str(ex))
def test_abandon(self): def test_abandon(self):

@ -236,7 +236,7 @@ class TestProxyDelete(base.TestCase):
self.assertEqual(rv, self.fake_id) self.assertEqual(rv, self.fake_id)
def test_delete_ignore_missing(self): def test_delete_ignore_missing(self):
self.res.delete.side_effect = exceptions.ResourceNotFound( self.res.delete.side_effect = exceptions.NotFoundException(
message="test", http_status=404 message="test", http_status=404
) )
@ -244,12 +244,12 @@ class TestProxyDelete(base.TestCase):
self.assertIsNone(rv) self.assertIsNone(rv)
def test_delete_NotFound(self): def test_delete_NotFound(self):
self.res.delete.side_effect = exceptions.ResourceNotFound( self.res.delete.side_effect = exceptions.NotFoundException(
message="test", http_status=404 message="test", http_status=404
) )
self.assertRaisesRegex( self.assertRaisesRegex(
exceptions.ResourceNotFound, exceptions.NotFoundException,
# TODO(shade) The mocks here are hiding the thing we want to test. # TODO(shade) The mocks here are hiding the thing we want to test.
"test", "test",
self.sot._delete, self.sot._delete,
@ -467,12 +467,12 @@ class TestProxyGet(base.TestCase):
self.assertEqual(rv, self.fake_result) self.assertEqual(rv, self.fake_result)
def test_get_not_found(self): def test_get_not_found(self):
self.res.fetch.side_effect = exceptions.ResourceNotFound( self.res.fetch.side_effect = exceptions.NotFoundException(
message="test", http_status=404 message="test", http_status=404
) )
self.assertRaisesRegex( self.assertRaisesRegex(
exceptions.ResourceNotFound, exceptions.NotFoundException,
"test", "test",
self.sot._get, self.sot._get,
RetrieveableResource, RetrieveableResource,

@ -3302,7 +3302,7 @@ class TestResourceFind(base.TestCase):
def existing(cls, **kwargs): def existing(cls, **kwargs):
response = mock.Mock() response = mock.Mock()
response.status_code = 404 response.status_code = 404
raise exceptions.ResourceNotFound('Not Found', response=response) raise exceptions.NotFoundException('Not Found', response=response)
@classmethod @classmethod
def list(cls, session, **params): def list(cls, session, **params):
@ -3343,7 +3343,7 @@ class TestResourceFind(base.TestCase):
def test_no_match_raise(self): def test_no_match_raise(self):
self.assertRaises( self.assertRaises(
exceptions.ResourceNotFound, exceptions.NotFoundException,
self.no_results.find, self.no_results.find,
self.cloud.compute, self.cloud.compute,
"name", "name",
@ -3736,7 +3736,7 @@ class TestWaitForDelete(TestWait):
res.fetch.side_effect = [ res.fetch.side_effect = [
res, res,
res, res,
exceptions.ResourceNotFound('Not Found', response), exceptions.NotFoundException('Not Found', response),
] ]
result = resource.wait_for_delete(self.cloud.compute, res, 1, 3) result = resource.wait_for_delete(self.cloud.compute, res, 1, 3)

@ -56,7 +56,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.workflow.v2.workflow.Workflow` instance. :class:`~openstack.workflow.v2.workflow.Workflow` instance.
:returns: One :class:`~openstack.workflow.v2.workflow.Workflow` :returns: One :class:`~openstack.workflow.v2.workflow.Workflow`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
workflow matching the name could be found. workflow matching the name could be found.
""" """
return self._get(_workflow.Workflow, *attrs) return self._get(_workflow.Workflow, *attrs)
@ -86,7 +86,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.workflow.v2.workflow.Workflow` :class:`~openstack.workflow.v2.workflow.Workflow`
instance. instance.
:param bool ignore_missing: When set to ``False`` :param bool ignore_missing: When set to ``False``
:class:`~openstack.exceptions.ResourceNotFound` will :class:`~openstack.exceptions.NotFoundException` will
be raised when the workflow does not exist. be raised when the workflow 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 workflow. attempting to delete a nonexistent workflow.
@ -102,7 +102,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of an workflow. :param name_or_id: The name or ID of an workflow.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -134,7 +134,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.workflow.v2.execution.Execution` instance. :class:`~openstack.workflow.v2.execution.Execution` instance.
:returns: One :class:`~openstack.workflow.v2.execution.Execution` :returns: One :class:`~openstack.workflow.v2.execution.Execution`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
execution matching the criteria could be found. execution matching the criteria could be found.
""" """
return self._get(_execution.Execution, *attrs) return self._get(_execution.Execution, *attrs)
@ -164,7 +164,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.workflow.v2.execute.Execution` :class:`~openstack.workflow.v2.execute.Execution`
instance. 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.NotFoundException` will be
raised when the execution does not exist. raised when the execution 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 execution. attempting to delete a nonexistent execution.
@ -180,7 +180,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of an execution. :param name_or_id: The name or ID of an execution.
: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.NotFoundException` will be
raised when the resource does not exist. raised when the resource does not exist.
When set to ``True``, None will be returned when When set to ``True``, None will be returned when
attempting to find a nonexistent resource. attempting to find a nonexistent resource.
@ -210,7 +210,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.workflow.v2.cron_trigger.CronTrigger` instance. :class:`~openstack.workflow.v2.cron_trigger.CronTrigger` instance.
:returns: One :class:`~openstack.workflow.v2.cron_trigger.CronTrigger` :returns: One :class:`~openstack.workflow.v2.cron_trigger.CronTrigger`
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
cron triggers matching the criteria could be found. cron triggers matching the criteria could be found.
""" """
return self._get(_cron_trigger.CronTrigger, cron_trigger) return self._get(_cron_trigger.CronTrigger, cron_trigger)
@ -244,7 +244,7 @@ class Proxy(proxy.Proxy):
:class:`~openstack.workflow.v2.cron_trigger.CronTrigger` :class:`~openstack.workflow.v2.cron_trigger.CronTrigger`
instance. 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.NotFoundException` will be
raised when the cron trigger does not exist. raised when the cron trigger 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 cron trigger. attempting to delete a nonexistent cron trigger.
@ -268,7 +268,7 @@ class Proxy(proxy.Proxy):
:param name_or_id: The name or ID of a cron trigger. :param name_or_id: The name or ID of a cron trigger.
:param bool ignore_missing: When set to ``False`` :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 the resource does not exist. When set to ``True``, None will be
returned when attempting to find a nonexistent resource. returned when attempting to find a nonexistent resource.
:param bool all_projects: When set to ``True``, search for cron :param bool all_projects: When set to ``True``, search for cron
@ -279,7 +279,7 @@ class Proxy(proxy.Proxy):
:returns: One :class:`~openstack.compute.v2.cron_trigger.CronTrigger` :returns: One :class:`~openstack.compute.v2.cron_trigger.CronTrigger`
or None or None
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no :raises: :class:`~openstack.exceptions.NotFoundException` when no
resource can be found. resource can be found.
:raises: :class:`~openstack.exceptions.DuplicateResource` when multiple :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple
resources are found. resources are found.