diff --git a/openstack/accelerator/v2/_proxy.py b/openstack/accelerator/v2/_proxy.py index 7f40ccace..69f2b2cba 100644 --- a/openstack/accelerator/v2/_proxy.py +++ b/openstack/accelerator/v2/_proxy.py @@ -32,7 +32,7 @@ class Proxy(proxy.Proxy): :param uuid: The value can be the UUID of a deployable. :returns: One :class:`~openstack.accelerator.v2.deployable.Deployable` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no deployable matching the criteria could be found. """ return self._get(_deployable.Deployable, uuid) @@ -76,7 +76,7 @@ class Proxy(proxy.Proxy): :param uuid: The value can be the UUID of a device. :returns: One :class:`~openstack.accelerator.v2.device.Device` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no device matching the criteria could be found. """ return self._get(_device.Device, uuid) @@ -106,7 +106,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.accelerator.v2.device_profile.DeviceProfile` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the device profile does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent device profile. @@ -124,7 +124,7 @@ class Proxy(proxy.Proxy): :param uuid: The value can be the UUID of a device profile. :returns: One :class: `~openstack.accelerator.v2.device_profile.DeviceProfile` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no device profile matching the criteria could be found. """ return self._get(_device_profile.DeviceProfile, uuid) @@ -158,7 +158,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.accelerator.v2.device_profile.DeviceProfile` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the device profile does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent accelerator request. @@ -176,7 +176,7 @@ class Proxy(proxy.Proxy): :param uuid: The value can be the UUID of a accelerator request. :returns: One :class: `~openstack.accelerator.v2.accelerator_request.AcceleratorRequest` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no accelerator request matching the criteria could be found. """ return self._get(_arq.AcceleratorRequest, uuid) diff --git a/openstack/baremetal/v1/_proxy.py b/openstack/baremetal/v1/_proxy.py index 71699fb5d..4a4d4a66e 100644 --- a/openstack/baremetal/v1/_proxy.py +++ b/openstack/baremetal/v1/_proxy.py @@ -118,7 +118,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The ID of a chassis. :param bool ignore_missing: When set to ``False``, an exception of - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the chassis does not exist. When set to `True``, None will be returned when attempting to find a nonexistent chassis. :returns: One :class:`~openstack.baremetal.v1.chassis.Chassis` object @@ -136,7 +136,7 @@ class Proxy(proxy.Proxy): :param fields: Limit the resource fields to fetch. :returns: One :class:`~openstack.baremetal.v1.chassis.Chassis` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no chassis matching the name or ID could be found. """ return self._get_with_fields(_chassis.Chassis, chassis, fields=fields) @@ -172,7 +172,7 @@ class Proxy(proxy.Proxy): :param chassis: The value can be either the ID of a chassis or a :class:`~openstack.baremetal.v1.chassis.Chassis` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the chassis could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent chassis. @@ -206,7 +206,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.baremetal.v1.driver.Driver` instance. :returns: One :class:`~openstack.baremetal.v1.driver.Driver` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no driver matching the name could be found. """ return self._get(_driver.Driver, driver) @@ -218,7 +218,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.baremetal.v1.driver.Driver` instance. :returns: One :dict: of vendor methods with corresponding usages - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no driver matching the name could be found. """ driver = self.get_driver(driver) @@ -310,7 +310,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The name or ID of a node. :param bool ignore_missing: When set to ``False``, an exception of - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the node does not exist. When set to `True``, None will be returned when attempting to find a nonexistent node. :returns: One :class:`~openstack.baremetal.v1.node.Node` object @@ -328,7 +328,7 @@ class Proxy(proxy.Proxy): :param fields: Limit the resource fields to fetch. :returns: One :class:`~openstack.baremetal.v1.node.Node` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no node matching the name or ID could be found. """ return self._get_with_fields(_node.Node, node, fields=fields) @@ -340,7 +340,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.baremetal.v1.node.Node` instance. :returns: The node inventory - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no inventory could be found. """ res = self._get_resource(_node.Node, node) @@ -702,7 +702,7 @@ class Proxy(proxy.Proxy): :param node: The value can be either the name or ID of a node or a :class:`~openstack.baremetal.v1.node.Node` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the node could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent node. @@ -773,7 +773,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The ID of a port. :param bool ignore_missing: When set to ``False``, an exception of - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the port does not exist. When set to `True``, None will be returned when attempting to find a nonexistent port. :returns: One :class:`~openstack.baremetal.v1.port.Port` object @@ -791,7 +791,7 @@ class Proxy(proxy.Proxy): :param fields: Limit the resource fields to fetch. :returns: One :class:`~openstack.baremetal.v1.port.Port` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no port matching the name or ID could be found. """ return self._get_with_fields(_port.Port, port, fields=fields) @@ -827,7 +827,7 @@ class Proxy(proxy.Proxy): :param port: The value can be either the ID of a port or a :class:`~openstack.baremetal.v1.port.Port` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the port could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent port. @@ -892,7 +892,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The name or ID of a portgroup. :param bool ignore_missing: When set to ``False``, an exception of - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the port group does not exist. When set to `True``, None will be returned when attempting to find a nonexistent port group. :returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup` @@ -910,7 +910,7 @@ class Proxy(proxy.Proxy): :param fields: Limit the resource fields to fetch. :returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no port group matching the name or ID could be found. """ return self._get_with_fields( @@ -952,7 +952,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.baremetal.v1.port_group.PortGroup` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the port group could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent port group. @@ -997,7 +997,7 @@ class Proxy(proxy.Proxy): a :class:`~openstack.baremetal.v1.node.Node` instance. :param string vif_id: Backend-specific VIF ID. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the VIF does not exist. Otherwise, ``False`` is returned. :return: ``True`` if the VIF was detached, otherwise ``False``. @@ -1075,7 +1075,7 @@ class Proxy(proxy.Proxy): :param fields: Limit the resource fields to fetch. :returns: One :class:`~openstack.baremetal.v1.allocation.Allocation` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no allocation matching the name or ID could be found. """ return self._get_with_fields( @@ -1115,7 +1115,7 @@ class Proxy(proxy.Proxy): :param allocation: The value can be the name or ID of an allocation or a :class:`~openstack.baremetal.v1.allocation.Allocation` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the allocation could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent allocation. @@ -1167,7 +1167,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.baremetal.v1.node.Node` instance. :param trait: trait to remove from the node. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the trait could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent trait. @@ -1310,7 +1310,7 @@ class Proxy(proxy.Proxy): :param str vc_id: The ID of a volume connector. :param bool ignore_missing: When set to ``False``, an exception of - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume connector does not exist. When set to `True``, None will be returned when attempting to find a nonexistent volume connector. @@ -1335,7 +1335,7 @@ class Proxy(proxy.Proxy): :returns: One :class: `~openstack.baremetal.v1.volume_connector.VolumeConnector` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no volume_connector matching the name or ID could be found.` """ return self._get_with_fields( @@ -1385,7 +1385,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.baremetal.v1.volume_connector.VolumeConnector` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume_connector could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent volume_connector. @@ -1457,7 +1457,7 @@ class Proxy(proxy.Proxy): :param str vt_id: The ID of a volume target. :param bool ignore_missing: When set to ``False``, an exception of - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume connector does not exist. When set to `True``, None will be returned when attempting to find a nonexistent volume target. @@ -1480,7 +1480,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.baremetal.v1.volume_target.VolumeTarget` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no volume_target matching the name or ID could be found.` """ return self._get_with_fields( @@ -1527,7 +1527,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.baremetal.v1.volume_target.VolumeTarget` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume_target could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent volume_target. @@ -1595,7 +1595,7 @@ class Proxy(proxy.Proxy): instance. :param bool ignore_missing: When set to ``False``, - an exception:class:`~openstack.exceptions.ResourceNotFound` + an exception:class:`~openstack.exceptions.NotFoundException` will be raised when the deploy_template could not be found. When set to ``True``, no @@ -1626,7 +1626,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.baremetal.v1.deploy_templates.DeployTemplate` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no deployment template matching the name or ID could be found. """ @@ -1673,7 +1673,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.baremetal.v1.conductor.Conductor` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no conductor matching the name could be found. """ return self._get_with_fields( diff --git a/openstack/baremetal/v1/node.py b/openstack/baremetal/v1/node.py index 2832c93c0..62d184319 100644 --- a/openstack/baremetal/v1/node.py +++ b/openstack/baremetal/v1/node.py @@ -847,7 +847,7 @@ class Node(_common.Resource): :type session: :class:`~keystoneauth1.adapter.Adapter` :param string vif_id: Backend-specific VIF ID. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the VIF does not exist. Otherwise, ``False`` is returned. :return: ``True`` if the VIF was detached, otherwise ``False``. @@ -1188,7 +1188,7 @@ class Node(_common.Resource): :param session: The session to use for making this request. :param trait: The trait to remove from the node. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the trait does not exist. Otherwise, ``False`` is returned. :returns bool: True on success removing the trait. diff --git a/openstack/baremetal_introspection/v1/_proxy.py b/openstack/baremetal_introspection/v1/_proxy.py index b82cee8fe..eca563c7c 100644 --- a/openstack/baremetal_introspection/v1/_proxy.py +++ b/openstack/baremetal_introspection/v1/_proxy.py @@ -89,7 +89,7 @@ class Proxy(proxy.Proxy): introspection (matching bare metal node name or ID) or an :class:`~.introspection.Introspection` instance. :returns: :class:`~.introspection.Introspection` instance. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no introspection matching the name or ID could be found. """ return self._get(_introspect.Introspection, introspection) @@ -118,7 +118,7 @@ class Proxy(proxy.Proxy): introspection (matching bare metal node name or ID) or an :class:`~.introspection.Introspection` instance. :param bool ignore_missing: When set to ``False``, an exception - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the introspection could not be found. When set to ``True``, no exception will be raised when attempting to abort a non-existent introspection. @@ -127,7 +127,7 @@ class Proxy(proxy.Proxy): res = self._get_resource(_introspect.Introspection, introspection) try: res.abort(self) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: if not ignore_missing: raise @@ -177,7 +177,7 @@ class Proxy(proxy.Proxy): introspection rule or a :class:`~.introspection_rule.IntrospectionRule` instance. :param bool ignore_missing: When set to ``False``, an - exception:class:`~openstack.exceptions.ResourceNotFound` will be + exception:class:`~openstack.exceptions.NotFoundException` will be raised when the introspection rule could not be found. When set to ``True``, no exception will be raised when attempting to delete a non-existent introspection rule. @@ -198,7 +198,7 @@ class Proxy(proxy.Proxy): :class:`~.introspection_rule.IntrospectionRule` instance. :returns: :class:`~.introspection_rule.IntrospectionRule` instance. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no introspection rule matching the name or ID could be found. """ return self._get( diff --git a/openstack/block_storage/v2/_proxy.py b/openstack/block_storage/v2/_proxy.py index dea1fdf6d..b89551a17 100644 --- a/openstack/block_storage/v2/_proxy.py +++ b/openstack/block_storage/v2/_proxy.py @@ -38,7 +38,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): instance. :returns: One :class:`~openstack.block_storage.v2.snapshot.Snapshot` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_snapshot.Snapshot, snapshot) @@ -55,7 +55,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param snapshot: The name or ID a snapshot :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the snapshot does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param bool details: When set to ``False``, an @@ -70,7 +70,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: One :class:`~openstack.block_storage.v2.snapshot.Snapshot`, one :class:`~openstack.block_storage.v2.snapshot.SnapshotDetail` object, or None. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -131,7 +131,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :class:`~openstack.block_storage.v2.snapshot.Snapshot` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the snapshot does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent snapshot. @@ -163,7 +163,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :class:`~openstack.block_storage.v2.type.Type` instance. :returns: One :class:`~openstack.block_storage.v2.type.Type` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_type.Type, type) @@ -193,7 +193,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param type: The value can be either the ID of a type or a :class:`~openstack.block_storage.v2.type.Type` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the type does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent type. @@ -248,7 +248,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :class:`~openstack.block_storage.v2.volume.Volume` instance. :returns: One :class:`~openstack.block_storage.v2.volume.Volume` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_volume.Volume, volume) @@ -265,7 +265,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param volume: The name or ID a volume :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume does not exist. :param bool details: When set to ``False`` no extended attributes will be returned. The default, ``True``, will cause an object with @@ -276,7 +276,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: One :class:`~openstack.block_storage.v2.volume.Volume` or None. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -333,7 +333,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param volume: The value can be either the ID of a volume or a :class:`~openstack.block_storage.v2.volume.Volume` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent volume. @@ -569,14 +569,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param snapshot: The name or ID a backup :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the backup does not exist. :param bool details: When set to ``False`` no additional details will be returned. The default, ``True``, will cause objects with additional attributes to be returned. :returns: One :class:`~openstack.block_storage.v2.backup.Backup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -607,7 +607,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param backup: The value can be the ID of a backup or a :class:`~openstack.block_storage.v2.backup.Backup` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -673,7 +673,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: One :class: `~openstack.block_storage.v2.capabilites.Capabilities` instance. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_capabilities.Capabilities, host) @@ -727,7 +727,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param dict query: Additional query parameters to use. :returns: One :class:`~openstack.block_storage.v2.quota_set.QuotaSet` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ project = self._get_resource(_project.Project, project) @@ -744,7 +744,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): which the quota should be retrieved :returns: One :class:`~openstack.block_storage.v2.quota_set.QuotaSet` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ project = self._get_resource(_project.Project, project) diff --git a/openstack/block_storage/v3/_proxy.py b/openstack/block_storage/v3/_proxy.py index 16638052f..6b17f9151 100644 --- a/openstack/block_storage/v3/_proxy.py +++ b/openstack/block_storage/v3/_proxy.py @@ -70,7 +70,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): instance. :returns: One :class:`~openstack.block_storage.v3.snapshot.Snapshot` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_snapshot.Snapshot, snapshot) @@ -87,7 +87,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param snapshot: The name or ID a snapshot :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the snapshot does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param bool details: When set to ``False`` :class: @@ -99,7 +99,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): a higher chance of duplicates. Admin-only by default. :returns: One :class:`~openstack.block_storage.v3.snapshot.Snapshot` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -171,7 +171,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param snapshot: The value can be either the ID of a snapshot or a :class:`~openstack.block_storage.v3.snapshot.Snapshot` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the snapshot does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent snapshot. @@ -293,7 +293,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :class:`~openstack.block_storage.v3.type.Type` instance. :returns: One :class:`~openstack.block_storage.v3.type.Type` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_type.Type, type) @@ -303,11 +303,11 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param snapshot: The name or ID a volume type :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume type does not exist. :returns: One :class:`~openstack.block_storage.v3.type.Type` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -343,7 +343,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param type: The value can be either the ID of a type or a :class:`~openstack.block_storage.v3.type.Type` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the type does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent type. @@ -438,7 +438,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): instance. :returns: One :class:`~openstack.block_storage.v3.type.TypeEncryption` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ volume_type = self._get_resource(_type.Type, volume_type_id) @@ -484,7 +484,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): instance. Required if encryption_id is None. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the type does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent type. @@ -543,7 +543,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :class:`~openstack.block_storage.v3.volume.Volume` instance. :returns: One :class:`~openstack.block_storage.v3.volume.Volume` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_volume.Volume, volume) @@ -560,7 +560,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param snapshot: The name or ID a volume :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume does not exist. :param bool details: When set to ``False`` no extended attributes will be returned. The default, ``True``, will cause objects with @@ -570,7 +570,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): a higher chance of duplicates. Admin-only by default. :returns: One :class:`~openstack.block_storage.v3.volume.Volume` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -627,7 +627,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param volume: The value can be either the ID of a volume or a :class:`~openstack.block_storage.v3.volume.Volume` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent volume. @@ -1069,7 +1069,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :class:`~attachment.Attachment` instance. :returns: One :class:`~attachment.Attachment` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_attachment.Attachment, attachment) @@ -1097,7 +1097,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :class:`~openstack.block_storage.v3.attachment.Attachment` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the attachment does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent attachment. @@ -1199,14 +1199,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param snapshot: The name or ID a backup :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the backup does not exist. :param bool details: When set to ``False`` no additional details will be returned. The default, ``True``, will cause objects with additional attributes to be returned. :returns: One :class:`~openstack.block_storage.v3.backup.Backup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1237,7 +1237,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param backup: The value can be the ID of a backup or a :class:`~openstack.block_storage.v3.backup.Backup` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -1303,7 +1303,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: One :class: `~openstack.block_storage.v3.capabilites.Capabilities` instance. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_capabilities.Capabilities, host) @@ -1326,14 +1326,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param name_or_id: The name or ID of a group. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the group snapshot does not exist. :param bool details: When set to ``False``, no additional details will be returned. The default, ``True``, will cause additional details to be returned. :returns: One :class:`~openstack.block_storage.v3.group.Group` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1465,14 +1465,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param name_or_id: The name or ID of a group snapshot. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the group snapshot does not exist. :param bool details: When set to ``False``, no additional details will be returned. The default, ``True``, will cause additional details to be returned. :returns: One :class:`~openstack.block_storage.v3.group_snapshot` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1553,7 +1553,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: One :class: `~openstack.block_storage.v3.group_type.GroupType` instance. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_group_type.GroupType, group_type) @@ -1563,12 +1563,12 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param name_or_id: The name or ID of a group type. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the group type does not exist. :returns: One :class:`~openstack.block_storage.v3.group_type.GroupType` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1620,7 +1620,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): or a :class:`~openstack.block_storage.v3.group_type.GroupType` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -1753,7 +1753,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param dict query: Additional query parameters to use. :returns: One :class:`~openstack.block_storage.v3.quota_set.QuotaSet` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ project = self._get_resource(_project.Project, project) @@ -1770,7 +1770,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): which the quota should be retrieved :returns: One :class:`~openstack.block_storage.v3.quota_set.QuotaSet` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ project = self._get_resource(_project.Project, project) @@ -1865,14 +1865,14 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param name_or_id: The name or ID of a service :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param dict query: Additional attributes like 'host' :returns: One: class:`~openstack.block_storage.v3.service.Service` or None - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1909,8 +1909,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: Updated service instance :rtype: class: `~openstack.block_storage.v3.service.Service` """ - service = self._get_resource(_service.Service, service) - return service.enable(self) + service_obj = self._get_resource(_service.Service, service) + return service_obj.enable(self) def disable_service( self, @@ -1927,8 +1927,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: Updated service instance :rtype: class: `~openstack.block_storage.v3.service.Service` """ - service = self._get_resource(_service.Service, service) - return service.disable(self, reason=reason) + service_obj = self._get_resource(_service.Service, service) + return service_obj.disable(self, reason=reason) def thaw_service( self, @@ -1942,8 +1942,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: Updated service instance :rtype: class: `~openstack.block_storage.v3.service.Service` """ - service = self._get_resource(_service.Service, service) - return service.thaw(self) + service_obj = self._get_resource(_service.Service, service) + return service_obj.thaw(self) def freeze_service( self, @@ -1957,8 +1957,8 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: Updated service instance :rtype: class: `~openstack.block_storage.v3.service.Service` """ - service = self._get_resource(_service.Service, service) - return service.freeze(self) + service_obj = self._get_resource(_service.Service, service) + return service_obj.freeze(self) def failover_service( self, @@ -1977,8 +1977,10 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :returns: Updated service instance :rtype: class: `~openstack.block_storage.v3.service.Service` """ - service = self._get_resource(_service.Service, service) - return service.failover(self, cluster=cluster, backend_id=backend_id) + service_obj = self._get_resource(_service.Service, service) + return service_obj.failover( + self, cluster=cluster, backend_id=backend_id + ) # ====== RESOURCE FILTERS ====== def resource_filters(self, **query): @@ -2018,7 +2020,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param transfer: The value can be either the ID of a transfer or a :class:`~openstack.block_storage.v3.transfer.Transfer`` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the transfer does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent transfer. @@ -2036,11 +2038,11 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): :param name_or_id: The name or ID a transfer :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume transfer does not exist. :returns: One :class:`~openstack.block_storage.v3.transfer.Transfer` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -2059,7 +2061,7 @@ class Proxy(_base_proxy.BaseBlockStorageProxy): instance. :returns: One :class:`~openstack.block_storage.v3.transfer.Transfer` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_transfer.Transfer, transfer) diff --git a/openstack/block_storage/v3/service.py b/openstack/block_storage/v3/service.py index a0c229da7..1454fc8f1 100644 --- a/openstack/block_storage/v3/service.py +++ b/openstack/block_storage/v3/service.py @@ -86,7 +86,7 @@ class Service(resource.Resource): if ignore_missing: return None - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f"No {cls.__name__} found for {name_or_id}" ) diff --git a/openstack/block_storage/v3/transfer.py b/openstack/block_storage/v3/transfer.py index e05cb3f98..0081d9413 100644 --- a/openstack/block_storage/v3/transfer.py +++ b/openstack/block_storage/v3/transfer.py @@ -130,7 +130,7 @@ class Transfer(resource.Resource): :return: This :class:`Resource` instance. :raises: :exc:`~openstack.exceptions.MethodNotSupported` if :data:`Resource.allow_fetch` is not set to ``True``. - :raises: :exc:`~openstack.exceptions.ResourceNotFound` if + :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource was not found. """ @@ -162,7 +162,7 @@ class Transfer(resource.Resource): :return: This :class:`Resource` instance. :raises: :exc:`~openstack.exceptions.MethodNotSupported` if :data:`Resource.allow_commit` is not set to ``True``. - :raises: :exc:`~openstack.exceptions.ResourceNotFound` if + :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource was not found. """ diff --git a/openstack/cloud/_compute.py b/openstack/cloud/_compute.py index 4163ad6a8..c77d5bb73 100644 --- a/openstack/cloud/_compute.py +++ b/openstack/cloud/_compute.py @@ -324,7 +324,7 @@ class ComputeCloudMixin: try: self.compute.remove_security_group_from_server(server, sg) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: # NOTE(jamielennox): Is this ok? If we remove something that # isn't present should we just conclude job done or is that an # error? Nova returns ok if you try to add a group twice. @@ -560,7 +560,7 @@ class ComputeCloudMixin: try: server = self.compute.get_server(id) return meta.add_server_interfaces(self, server) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: return None def get_server_group(self, name_or_id=None, filters=None): @@ -611,7 +611,7 @@ class ComputeCloudMixin: """ try: self.compute.delete_keypair(name, ignore_missing=False) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug("Keypair %s not found for deleting", name) return False return True @@ -1398,7 +1398,7 @@ class ComputeCloudMixin: try: self.compute.delete_server(server) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: return False except Exception: raise @@ -1707,7 +1707,7 @@ class ComputeCloudMixin: try: self.compute.delete_aggregate(name_or_id, ignore_missing=False) return True - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug("Aggregate %s not found for deleting", name_or_id) return False diff --git a/openstack/cloud/_floating_ip.py b/openstack/cloud/_floating_ip.py index 60ed7c9e1..e0c698a08 100644 --- a/openstack/cloud/_floating_ip.py +++ b/openstack/cloud/_floating_ip.py @@ -439,7 +439,7 @@ class FloatingIPCloudMixin: if network_name_or_id: try: network = self.network.find_network(network_name_or_id) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: raise exceptions.NotFoundException( "unable to find network for floating ips with ID " "{}".format(network_name_or_id) @@ -592,7 +592,7 @@ class FloatingIPCloudMixin: def _neutron_delete_floating_ip(self, floating_ip_id): try: self.network.delete_ip(floating_ip_id, ignore_missing=False) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: return False return True diff --git a/openstack/cloud/_network.py b/openstack/cloud/_network.py index b88bec504..3d25bbdd2 100644 --- a/openstack/cloud/_network.py +++ b/openstack/cloud/_network.py @@ -778,7 +778,7 @@ class NetworkCloudMixin: self.network.delete_firewall_rule( firewall_rule, ignore_missing=False ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug( 'Firewall rule %s not found for deleting', name_or_id ) @@ -938,7 +938,7 @@ class NetworkCloudMixin: :param bool shared: Visibility to other projects. Defaults to False. :raises: BadRequestException if parameters are malformed - :raises: ResourceNotFound if a resource from firewall_list not found + :raises: NotFoundException if a resource from firewall_list not found :returns: The created network ``FirewallPolicy`` object. """ if 'firewall_rules' in kwargs: @@ -982,7 +982,7 @@ class NetworkCloudMixin: self.network.delete_firewall_policy( firewall_policy, ignore_missing=False ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug( 'Firewall policy %s not found for deleting', name_or_id ) @@ -1078,7 +1078,7 @@ class NetworkCloudMixin: :returns: The updated network ``FirewallPolicy`` object. :raises: BadRequestException if parameters are malformed :raises: DuplicateResource on multiple matches - :raises: ResourceNotFound if resource is not found + :raises: NotFoundException if resource is not found """ if not filters: filters = {} @@ -1115,7 +1115,7 @@ class NetworkCloudMixin: :param insert_before: rule name or id that should succeed added rule :param dict filters: optional filters :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. :return: updated firewall policy :rtype: FirewallPolicy @@ -1166,7 +1166,7 @@ class NetworkCloudMixin: :param rule_name_or_id: firewall rule name or id :param dict filters: optional filters :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 :rtype: FirewallPolicy """ @@ -1228,7 +1228,7 @@ class NetworkCloudMixin: :param shared: Visibility to other projects. Defaults to False. :raises: BadRequestException if parameters are malformed :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. :returns: The created network ``FirewallGroup`` object. """ @@ -1257,7 +1257,7 @@ class NetworkCloudMixin: self.network.delete_firewall_group( firewall_group, ignore_missing=False ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug( 'Firewall group %s not found for deleting', name_or_id ) @@ -1315,7 +1315,7 @@ class NetworkCloudMixin: :returns: The updated network ``FirewallGroup`` object. :raises: BadRequestException if parameters are malformed :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 """ if not filters: @@ -1339,7 +1339,7 @@ class NetworkCloudMixin: :param dict firewall_group: firewall group dict :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'): if key not in firewall_group: @@ -1665,7 +1665,7 @@ class NetworkCloudMixin: self.network.delete_qos_bandwidth_limit_rule( rule_id, policy, ignore_missing=False ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug( "QoS bandwidth limit rule {rule_id} not found in policy " "{policy_id}. Ignoring.".format( @@ -1855,7 +1855,7 @@ class NetworkCloudMixin: self.network.delete_qos_dscp_marking_rule( rule_id, policy, ignore_missing=False ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug( "QoS DSCP marking rule {rule_id} not found in policy " "{policy_id}. Ignoring.".format( @@ -2058,7 +2058,7 @@ class NetworkCloudMixin: self.network.delete_qos_minimum_bandwidth_rule( rule_id, policy, ignore_missing=False ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: self.log.debug( "QoS minimum bandwidth rule {rule_id} not found in policy " "{policy_id}. Ignoring.".format( @@ -2804,7 +2804,7 @@ class NetworkCloudMixin: :param list[str] name_or_id_list: list of port names or ids :param dict filters: optional filters :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 :rtype: list[str] """ @@ -2812,7 +2812,7 @@ class NetworkCloudMixin: for name_or_id in name_or_id_list: port = self.get_port(name_or_id, filters) if not port: - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f'Port {name_or_id} not found' ) ids_list.append(port['id']) diff --git a/openstack/cloud/_object_store.py b/openstack/cloud/_object_store.py index f918d3235..1dcba4876 100644 --- a/openstack/cloud/_object_store.py +++ b/openstack/cloud/_object_store.py @@ -456,7 +456,7 @@ class ObjectStoreCloudMixin: yield from self.object_store.stream_object( obj, container, chunk_size=resp_chunk_size ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: return def get_object( @@ -498,7 +498,7 @@ class ObjectStoreCloudMixin: headers = {k.lower(): v for k, v in obj._last_headers.items()} return (headers, obj.data) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: return None def _wait_for_futures(self, futures, raise_on_error=True): diff --git a/openstack/cloud/openstackcloud.py b/openstack/cloud/openstackcloud.py index 81abdb436..5f4ff9ede 100644 --- a/openstack/cloud/openstackcloud.py +++ b/openstack/cloud/openstackcloud.py @@ -584,7 +584,7 @@ class _OpenStackCloudMixin: resource_type, name_or_id, *get_args, **get_kwargs ) return [resource_by_id] - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: pass if not filters: diff --git a/openstack/clustering/v1/_async_resource.py b/openstack/clustering/v1/_async_resource.py index 060415d69..f37bb629b 100644 --- a/openstack/clustering/v1/_async_resource.py +++ b/openstack/clustering/v1/_async_resource.py @@ -27,7 +27,7 @@ class AsyncResource(resource.Resource): to populate the `Action` with status information. :raises: :exc:`~openstack.exceptions.MethodNotSupported` if :data:`Resource.allow_commit` is not set to ``True``. - :raises: :exc:`~openstack.exceptions.ResourceNotFound` if + :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource was not found. """ response = self._raw_delete(session) diff --git a/openstack/clustering/v1/_proxy.py b/openstack/clustering/v1/_proxy.py index aae729c61..f63b95934 100644 --- a/openstack/clustering/v1/_proxy.py +++ b/openstack/clustering/v1/_proxy.py @@ -68,7 +68,7 @@ class Proxy(proxy.Proxy): :returns: A :class:`~openstack.clustering.v1.profile_type.ProfileType` object. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no profile_type matching the name could be found. """ 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` object. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no policy_type matching the name could be found. """ 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 a :class:`~openstack.clustering.v1.profile.Profile` instance. :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 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -143,7 +143,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.clustering.v1.profile.Profile` instance. :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. """ 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 a :class:`~openstack.cluster.v1.cluster.Cluster` instance. :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 will be raised when attempting to delete a non-existent cluster. :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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -259,7 +259,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.clustering.v1.cluster.Cluster` instance. :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. """ 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 :class:`~openstack.cluster.v1.node.Node` instance. :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 will be raised when attempting to delete a non-existent node. :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 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. when set to "True", None will be returned when attempting to find a nonexistent policy @@ -602,7 +602,7 @@ class Proxy(proxy.Proxy): server should return more details when retrieving the node data. :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. """ # 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 :class:`~openstack.clustering.v1.policy.Policy` instance. :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 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent policy. @@ -773,7 +773,7 @@ class Proxy(proxy.Proxy): :returns: A policy object. :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. """ return self._get(_policy.Policy, policy) @@ -856,7 +856,7 @@ class Proxy(proxy.Proxy): :returns: a cluster-policy binding object. :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. """ 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 or a :class:`~openstack.clustering.v1.receiver.Receiver` instance. :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 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 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 set to ``True``, None will be returned when attempting to find a nonexistent receiver. @@ -927,7 +927,7 @@ class Proxy(proxy.Proxy): :returns: A receiver object. :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. """ return self._get(_receiver.Receiver, receiver) @@ -960,7 +960,7 @@ class Proxy(proxy.Proxy): :returns: an action object. :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. """ return self._get(_action.Action, action) @@ -1011,7 +1011,7 @@ class Proxy(proxy.Proxy): :returns: an event object. :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. """ return self._get(_event.Event, event) @@ -1106,7 +1106,7 @@ class Proxy(proxy.Proxy): :returns: A :class:`~openstack.clustering.v1.profile_type.ProfileType` object. - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no profile_type matching the name could be found. """ obj = self._get_resource(_profile_type.ProfileType, profile_type) diff --git a/openstack/compute/v2/_proxy.py b/openstack/compute/v2/_proxy.py index c82d99d24..37af81395 100644 --- a/openstack/compute/v2/_proxy.py +++ b/openstack/compute/v2/_proxy.py @@ -78,14 +78,14 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an extension. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :returns: One :class:`~openstack.compute.v2.extension.Extension` or None - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -119,7 +119,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a flavor. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param bool get_extra_specs: When set to ``True`` and extra_specs not @@ -129,7 +129,7 @@ class Proxy(proxy.Proxy): the flavors being returned. :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. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -162,7 +162,7 @@ class Proxy(proxy.Proxy): :param flavor: The value can be either the ID of a flavor or a :class:`~openstack.compute.v2.flavor.Flavor` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent flavor. @@ -194,7 +194,7 @@ class Proxy(proxy.Proxy): extra_specs. :returns: One :class:`~openstack.compute.v2.flavor.Flavor` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ flavor = self._get(_flavor.Flavor, flavor) @@ -337,7 +337,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.compute.v2.aggregate.Aggregate` instance. :returns: One :class:`~openstack.compute.v2.aggregate.Aggregate` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_aggregate.Aggregate, aggregate) @@ -347,13 +347,13 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an aggregate. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :returns: One :class:`~openstack.compute.v2.aggregate.Aggregate` or None - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -396,7 +396,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.compute.v2.aggregate.Aggregate` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent aggregate. @@ -476,7 +476,7 @@ class Proxy(proxy.Proxy): :param image: The value can be either the ID of an image or a :class:`~openstack.compute.v2.image.Image` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent image. @@ -497,13 +497,13 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a image. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :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. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -526,7 +526,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.compute.v2.image.Image` instance. :returns: One :class:`~openstack.compute.v2.image.Image` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ warnings.warn( @@ -636,7 +636,7 @@ class Proxy(proxy.Proxy): :param keypair: The value can be either the ID of a keypair or a :class:`~openstack.compute.v2.keypair.Keypair` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the keypair does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent keypair. :param str user_id: Optional user_id owning the keypair @@ -659,7 +659,7 @@ class Proxy(proxy.Proxy): :param str user_id: Optional user_id owning the 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. """ attrs = {'user_id': user_id} if user_id else {} @@ -670,13 +670,13 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a keypair. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param str user_id: Optional user_id owning the keypair :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. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -732,7 +732,7 @@ class Proxy(proxy.Proxy): :param server: The value can be either the ID of a server or a :class:`~openstack.compute.v2.server.Server` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent server @@ -759,7 +759,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a server. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param bool details: When set to ``False`` @@ -770,7 +770,7 @@ class Proxy(proxy.Proxy): higher chance of duplicates. Admin-only by default. :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. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -794,7 +794,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.compute.v2.server.Server` instance. :returns: One :class:`~openstack.compute.v2.server.Server` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_server.Server, server) @@ -1383,7 +1383,7 @@ class Proxy(proxy.Proxy): server or a :class:`~openstack.compute.v2.server.Server` instance that the interface belongs to. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent server interface. @@ -1418,7 +1418,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.compute.v2.server_interface.ServerInterface` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ server_id = self._get_uri_attribute( @@ -1564,7 +1564,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.compute.v2.server_group.ServerGroup` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent server group. @@ -1588,7 +1588,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a server group. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param bool all_projects: When set to ``True``, search for server @@ -1597,7 +1597,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.compute.v2.server_group.ServerGroup` or None - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1621,7 +1621,7 @@ class Proxy(proxy.Proxy): :returns: 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. """ return self._get(_server_group.ServerGroup, server_group) @@ -1677,7 +1677,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a hypervisor :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param bool details: When set to ``False`` @@ -1686,7 +1686,7 @@ class Proxy(proxy.Proxy): :returns: One: class:`~openstack.compute.v2.hypervisor.Hypervisor` or None - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1708,7 +1708,7 @@ class Proxy(proxy.Proxy): :returns: A :class:`~openstack.compute.v2.hypervisor.Hypervisor` object. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_hypervisor.Hypervisor, hypervisor) @@ -1722,7 +1722,7 @@ class Proxy(proxy.Proxy): :returns: A :class:`~openstack.compute.v2.hypervisor.Hypervisor` object. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ hypervisor = self._get_resource(_hypervisor.Hypervisor, hypervisor) @@ -1822,14 +1822,14 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or id of a service :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param dict query: Additional attributes like 'host' :returns: One: class:`~openstack.compute.v2.service.Service` or None - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found. @@ -1848,7 +1848,7 @@ class Proxy(proxy.Proxy): The value can be either the ID of a service or a :class:`~openstack.compute.v2.service.Service` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the service does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent service. @@ -2027,7 +2027,7 @@ class Proxy(proxy.Proxy): :param volume: The value can be the ID of a volume or a :class:`~openstack.block_storage.v3.volume.Volume` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the volume attachment does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent volume attachment. @@ -2061,7 +2061,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.compute.v2.volume_attachment.VolumeAttachment` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ server_id = resource.Resource._get_id(server) @@ -2154,7 +2154,7 @@ class Proxy(proxy.Proxy): server or a :class:`~openstack.compute.v2.server.Server` instance that the migration belongs to. :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 exception will be set when attempting to delete a nonexistent server migration. @@ -2218,14 +2218,14 @@ class Proxy(proxy.Proxy): :class:`~openstack.compute.v2.server.Server` instance that the migration belongs to. :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 exception will be set when attempting to delete a nonexistent server migration. :returns: One :class:`~openstack.compute.v2.server_migration.ServerMigration` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ server_id = self._get_uri_attribute( @@ -2282,7 +2282,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.compute.v2.server_diagnostics.ServerDiagnostics` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ server_id = self._get_resource(_server.Server, server).id @@ -2457,7 +2457,7 @@ class Proxy(proxy.Proxy): :param dict query: Additional query parameters to use. :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. """ project = self._get_resource(_project.Project, project) @@ -2477,7 +2477,7 @@ class Proxy(proxy.Proxy): which the quota should be retrieved :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. """ project = self._get_resource(_project.Project, project) @@ -2561,13 +2561,13 @@ class Proxy(proxy.Proxy): :class:`~openstack.compute.v2.server.Server` instance that the action is associated with. :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 exception will be set when attempting to retrieve a non-existent server action. :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. """ server_id = self._get_uri_attribute(server_action, server, 'server_id') diff --git a/openstack/compute/v2/service.py b/openstack/compute/v2/service.py index e4dce2ee6..ba371122f 100644 --- a/openstack/compute/v2/service.py +++ b/openstack/compute/v2/service.py @@ -83,7 +83,7 @@ class Service(resource.Resource): if ignore_missing: return None - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f"No {cls.__name__} found for {name_or_id}" ) diff --git a/openstack/container_infrastructure_management/v1/_proxy.py b/openstack/container_infrastructure_management/v1/_proxy.py index 1e95b428d..e11db1398 100644 --- a/openstack/container_infrastructure_management/v1/_proxy.py +++ b/openstack/container_infrastructure_management/v1/_proxy.py @@ -51,7 +51,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.container_infrastructure_management.v1.cluster.Cluster` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the cluster does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent cluster. :returns: ``None`` @@ -63,7 +63,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a cluster. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -86,7 +86,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.container_infrastructure_management.v1.cluster.Cluster` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_cluster.Cluster, cluster) @@ -139,7 +139,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the cluster_template does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent cluster_template. @@ -156,7 +156,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a cluster_template. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -180,7 +180,7 @@ class Proxy(proxy.Proxy): :returns: One :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. """ return self._get(_cluster_template.ClusterTemplate, cluster_template) @@ -237,7 +237,7 @@ class Proxy(proxy.Proxy): :returns: One :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. """ return self._get(_cluster_cert.ClusterCertificate, cluster_certificate) diff --git a/openstack/container_infrastructure_management/v1/cluster.py b/openstack/container_infrastructure_management/v1/cluster.py index 776cdeee2..19d4efdab 100644 --- a/openstack/container_infrastructure_management/v1/cluster.py +++ b/openstack/container_infrastructure_management/v1/cluster.py @@ -134,7 +134,7 @@ class Cluster(resource.Resource): :param nodes_to_remove: The server ID list will be removed if downsizing the 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. """ 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. The default is 1 :returns: The UUID of the updated cluster. - :raises: :exc:`~openstack.exceptions.ResourceNotFound` if + :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource was not found. """ url = utils.urljoin(Cluster.base_path, self.id, 'actions', 'upgrade') diff --git a/openstack/database/v1/_proxy.py b/openstack/database/v1/_proxy.py index 4e3df801f..6a4d88145 100644 --- a/openstack/database/v1/_proxy.py +++ b/openstack/database/v1/_proxy.py @@ -52,7 +52,7 @@ class Proxy(proxy.Proxy): It can be either the ID of an instance or a :class:`~openstack.database.v1.instance.Instance` :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. When set to ``True``, no exception will be set when 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 or a :class:`~openstack.database.v1.instance.Instance` :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -117,7 +117,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.database.v1.database.Database` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -144,7 +144,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.database.v1.flavor.Flavor` instance. :returns: One :class:`~openstack.database.v1.flavor.Flavor` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.database.v1.instance.Instance` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -212,7 +212,7 @@ class Proxy(proxy.Proxy): 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. """ return self._get(_instance.Instance, instance) @@ -266,7 +266,7 @@ class Proxy(proxy.Proxy): It can be either the ID of an instance or a :class:`~openstack.database.v1.instance.Instance` :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. When set to ``True``, no exception will be set when 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 or a :class:`~openstack.database.v1.instance.Instance` :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -327,7 +327,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.database.v1.instance.Instance` :returns: One :class:`~openstack.database.v1.user.User` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ instance = self._get_resource(_instance.Instance, instance) diff --git a/openstack/dns/v2/_base.py b/openstack/dns/v2/_base.py index 6bba5b048..14d4fd138 100644 --- a/openstack/dns/v2/_base.py +++ b/openstack/dns/v2/_base.py @@ -27,7 +27,7 @@ class Resource(resource.Resource): :param name_or_id: This resource's identifier, if needed by the request. The default is ``None``. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -40,7 +40,7 @@ class Resource(resource.Resource): or None if nothing matches. :raises: :class:`openstack.exceptions.DuplicateResource` if more 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``. """ session = cls._get_session(session) @@ -68,7 +68,7 @@ class Resource(resource.Resource): if ignore_missing: return None - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f"No {cls.__name__} found for {name_or_id}" ) diff --git a/openstack/dns/v2/_proxy.py b/openstack/dns/v2/_proxy.py index 9c71b2f5f..5b1e35d85 100644 --- a/openstack/dns/v2/_proxy.py +++ b/openstack/dns/v2/_proxy.py @@ -77,7 +77,7 @@ class Proxy(proxy.Proxy): :param zone: The value can be the ID of a zone or a :class:`~openstack.dns.v2.zone.Zone` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -111,7 +111,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a zone :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 set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -221,7 +221,7 @@ class Proxy(proxy.Proxy): :param zone: The value can be the ID of a zone or a :class:`~openstack.dns.v2.zone.Zone` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -242,7 +242,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.dns.v2.zone.Zone` instance. :param name_or_id: The name or ID of a zone :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 set to ``True``, no exception will be set when attempting 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 or a :class:`~openstack.dns.v2.zone_import.ZoneImport` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -380,7 +380,7 @@ class Proxy(proxy.Proxy): :param zone_export: The value can be the ID of a zone import or a :class:`~openstack.dns.v2.zone_export.ZoneExport` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -510,7 +510,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.dns.v2.zone_transfer.ZoneTransferRequest` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the zone does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone. @@ -600,7 +600,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.dns.v2.zone.Zone` instance. :param zone_share_id: The zone share ID :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 set to ``True``, None will be returned when attempting to find a nonexistent zone share. @@ -641,7 +641,7 @@ class Proxy(proxy.Proxy): share or a :class:`~openstack.dns.v2.zone_share.ZoneShare` instance that the zone share belongs to. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent zone share. diff --git a/openstack/exceptions.py b/openstack/exceptions.py index aa2f92296..528cc4c0f 100644 --- a/openstack/exceptions.py +++ b/openstack/exceptions.py @@ -120,6 +120,10 @@ class BadRequestException(HttpException): """HTTP 400 Bad Request.""" +class NotFoundException(HttpException): + """HTTP 404 Not Found.""" + + class ForbiddenException(HttpException): """HTTP 403 Forbidden Request.""" @@ -154,13 +158,6 @@ class DuplicateResource(SDKException): """More than one resource exists with that name.""" -class ResourceNotFound(HttpException): - """No resource exists with that name or ID.""" - - -NotFoundException = ResourceNotFound - - class ResourceTimeout(SDKException): """Timeout waiting for resource.""" @@ -275,3 +272,4 @@ class ServiceDiscoveryException(SDKException): # Backwards compatibility OpenStackCloudException = SDKException +ResourceNotFound = NotFoundException diff --git a/openstack/identity/v2/_proxy.py b/openstack/identity/v2/_proxy.py index f0a96f580..141279f00 100644 --- a/openstack/identity/v2/_proxy.py +++ b/openstack/identity/v2/_proxy.py @@ -34,7 +34,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.identity.v2.extension.Extension` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no extension can be found. """ 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 :class:`~openstack.identity.v2.role.Role` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -88,7 +88,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v2.role.Role` instance. :returns: One :class:`~openstack.identity.v2.role.Role` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v2.tenant.Tenant` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -166,7 +166,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v2.tenant.Tenant` instance. :returns: One :class:`~openstack.identity.v2.tenant.Tenant` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v2.user.User` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -244,7 +244,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v2.user.User` instance. :returns: One :class:`~openstack.identity.v2.user.User` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_user.User, user) diff --git a/openstack/identity/v3/_proxy.py b/openstack/identity/v3/_proxy.py index 82f015294..48c061e19 100644 --- a/openstack/identity/v3/_proxy.py +++ b/openstack/identity/v3/_proxy.py @@ -108,7 +108,7 @@ class Proxy(proxy.Proxy): :param credential: The value can be either the ID of a credential or a :class:`~openstack.identity.v3.credential.Credential` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -142,7 +142,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.credential.Credential` instance. :returns: One :class:`~openstack.identity.v3.credential.Credential` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.domain.Domain` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -223,7 +223,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.domain.Domain` instance. :returns: One :class:`~openstack.identity.v3.domain.Domain` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 a :class:`~openstack.identity.v3.domain.Domain` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent config for a domain. @@ -302,7 +302,7 @@ class Proxy(proxy.Proxy): :returns: One :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. """ 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 :class:`~openstack.identity.v3.endpoint.Endpoint` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -384,7 +384,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.identity.v3.endpoint.Endpoint` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.group.Group` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -469,7 +469,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.identity.v3.group.Group` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.policy.Policy` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -603,7 +603,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.policy.Policy` instance. :returns: One :class:`~openstack.identity.v3.policy.Policy` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.project.Project` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -687,7 +687,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.project.Project` instance. :returns: One :class:`~openstack.identity.v3.project.Project` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.service.Service` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -783,7 +783,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.service.Service` instance. :returns: One :class:`~openstack.identity.v3.service.Service` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.user.User` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -867,7 +867,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.user.User` instance. :returns: One :class:`~openstack.identity.v3.user.User` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.trust.Trust` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -948,7 +948,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.trust.Trust` instance. :returns: One :class:`~openstack.identity.v3.trust.Trust` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.identity.v3.region.Region` instance. :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. When set to ``True``, no exception will be thrown when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent region. @@ -1016,7 +1016,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.region.Region` instance. :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. """ 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 :class:`~openstack.identity.v3.role.Role` instance. :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. When set to ``True``, no exception will be thrown when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent role. @@ -1100,7 +1100,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.role.Role` instance. :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. """ return self._get(_role.Role, role) @@ -1543,7 +1543,7 @@ class Proxy(proxy.Proxy): instance. :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. """ return self._get(_registered_limit.RegisteredLimit, registered_limit) @@ -1585,7 +1585,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.registered_limit.RegisteredLimit` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the registered_limit does not exist. When set to ``True``, no exception will be thrown when attempting to delete a nonexistent registered_limit. @@ -1618,7 +1618,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.identity.v3.limit.Limit` instance. :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. """ 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 :class:`~openstack.identity.v3.limit.Limit` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the limit does not exist. When set to ``True``, no exception will be thrown when attempting to delete a nonexistent limit. @@ -1697,7 +1697,7 @@ class Proxy(proxy.Proxy): :returns: One :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. """ user = self._get_resource(_user.User, user) @@ -1745,7 +1745,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.user.User` instance. :param name_or_id: The name or ID of an application credential. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1775,7 +1775,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.application_credential.ApplicationCredential` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the application credential does not exist. When set to ``True``, no exception will be thrown when attempting to delete a nonexistent application credential. @@ -1831,7 +1831,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.federation_protocol.FederationProtocol` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the federation protocol does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent federation protocol. @@ -1856,7 +1856,7 @@ class Proxy(proxy.Proxy): representing the identity provider the protocol is attached to. :param protocol: The name or ID of a federation protocol. :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 be returned when attempting to find a nonexistent resource. :returns: One federation protocol or None @@ -1888,7 +1888,7 @@ class Proxy(proxy.Proxy): :returns: One federation protocol :rtype: :class:`~openstack.identity.v3.federation_protocol.FederationProtocol` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ cls = _federation_protocol.FederationProtocol @@ -1966,7 +1966,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.mapping.Mapping` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1998,7 +1998,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.identity.v3.mapping.Mapping` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_mapping.Mapping, mapping) @@ -2049,7 +2049,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.identity.v3.identity_provider.IdentityProvider` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2091,7 +2091,7 @@ class Proxy(proxy.Proxy): :returns: The details of an identity provider. :rtype: :class:`~openstack.identity.v3.identity_provider.IdentityProvider` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -2152,7 +2152,7 @@ class Proxy(proxy.Proxy): :class:`~.access_rule.AccessRule` instance. :returns: One :class:`~.access_rule.AccessRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 access rule or a :class:`~.access_rule.AccessRule` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the access rule does not exist. When set to ``True``, no exception 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` instance. :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. When set to ``True``, no exception will be set when 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 bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2245,7 +2245,7 @@ class Proxy(proxy.Proxy): :returns: The details of an service provider. :rtype: :class:`~openstack.identity.v3.service_provider.ServiceProvider` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_service_provider.ServiceProvider, service_provider) diff --git a/openstack/image/v1/_proxy.py b/openstack/image/v1/_proxy.py index bdcf35cf7..73b4828f6 100644 --- a/openstack/image/v1/_proxy.py +++ b/openstack/image/v1/_proxy.py @@ -322,7 +322,7 @@ class Proxy(proxy.Proxy): :param image: The value can be either the ID of an image or a :class:`~openstack.image.v1.image.Image` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -353,7 +353,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v1.image.Image` instance. :returns: One :class:`~openstack.image.v1.image.Image` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_image.Image, image) diff --git a/openstack/image/v1/image.py b/openstack/image/v1/image.py index 7e1283b1d..173e2544a 100644 --- a/openstack/image/v1/image.py +++ b/openstack/image/v1/image.py @@ -96,7 +96,7 @@ class Image(resource.Resource, _download.DownloadMixin): :param name_or_id: This resource's identifier, if needed by the request. The default is ``None``. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -109,7 +109,7 @@ class Image(resource.Resource, _download.DownloadMixin): or None if nothing matches. :raises: :class:`openstack.exceptions.DuplicateResource` if more 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``. """ session = cls._get_session(session) @@ -134,6 +134,6 @@ class Image(resource.Resource, _download.DownloadMixin): if ignore_missing: return None - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f"No {cls.__name__} found for {name_or_id}" ) diff --git a/openstack/image/v2/_proxy.py b/openstack/image/v2/_proxy.py index 6876ff9cf..c275a4e75 100644 --- a/openstack/image/v2/_proxy.py +++ b/openstack/image/v2/_proxy.py @@ -90,7 +90,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.image.Image` instance. :param bool ignore_missing: When set to ``False``, - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the metadef namespace does not exist. :returns: ``None`` """ @@ -832,7 +832,7 @@ class Proxy(proxy.Proxy): image is associated with. If specified, the image will only be deleted from the specified store. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -869,7 +869,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.image.Image` instance. :returns: One :class:`~openstack.image.v2.image.Image` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_image.Image, image) @@ -1018,7 +1018,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.image.Image` instance that the member is part of. This is required if ``member`` is an ID. :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 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 :class:`~openstack.image.v2.image.Image` instance. :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. When set to ``True``, None will be returned when 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 :class:`~openstack.image.v2.image.Image` instance. :returns: One :class:`~openstack.image.v2.member.Member` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ member_id = resource.Resource._get_id(member) @@ -1136,7 +1136,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` instance. :param bool ignore_missing: When set to ``False``, - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the metadef namespace does not exist. :returns: ``None`` """ @@ -1159,7 +1159,7 @@ class Proxy(proxy.Proxy): :returns: One :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. """ return self._get( @@ -1172,7 +1172,7 @@ class Proxy(proxy.Proxy): :returns: A generator object of metadef namespaces :rtype: :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._list(_metadef_namespace.MetadefNamespace, **query) @@ -1234,7 +1234,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` instance. :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. """ object_name = resource.Resource._get_id(metadef_object) @@ -1254,7 +1254,7 @@ class Proxy(proxy.Proxy): instance. :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. """ namespace_name = resource.Resource._get_id(namespace) @@ -1276,7 +1276,7 @@ class Proxy(proxy.Proxy): a :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. """ namespace_name = resource.Resource._get_id(namespace) @@ -1301,7 +1301,7 @@ class Proxy(proxy.Proxy): a :class:`~openstack.image.v2.metadef_object.MetadefObject` :returns: ``None`` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ namespace_name = resource.Resource._get_id(namespace) @@ -1320,7 +1320,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` instance. :returns: ``None`` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ namespace = self._get_resource( @@ -1335,7 +1335,7 @@ class Proxy(proxy.Proxy): :return: A generator object of metadef resource types :rtype: :class:`~openstack.image.v2.metadef_resource_type.MetadefResourceType` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._list(_metadef_resource_type.MetadefResourceType, **query) @@ -1382,7 +1382,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` instance :param bool ignore_missing: When set to ``False``, - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the metadef resource type association does not exist. :returns: ``None`` """ @@ -1404,7 +1404,7 @@ class Proxy(proxy.Proxy): :return: A generator object of metadef resource type associations :rtype: :class:`~openstack.image.v2.metadef_resource_type.MetadefResourceTypeAssociation` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ namespace_name = resource.Resource._get_id(metadef_namespace) @@ -1477,7 +1477,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.metadef_namespace.MetadefNamespace` instance :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``, no exception will be set when attempting to delete a nonexistent instance. @@ -1529,7 +1529,7 @@ class Proxy(proxy.Proxy): :returns: One :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. """ namespace_name = resource.Resource._get_id(metadef_namespace) @@ -1549,7 +1549,7 @@ class Proxy(proxy.Proxy): instance. :returns: ``None`` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ namespace = self._get_resource( @@ -1562,7 +1562,7 @@ class Proxy(proxy.Proxy): """Get images 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. """ return self._get( @@ -1575,7 +1575,7 @@ class Proxy(proxy.Proxy): """Get single image 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. """ return self._get( @@ -1588,7 +1588,7 @@ class Proxy(proxy.Proxy): """Get image members 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. """ return self._get( @@ -1601,7 +1601,7 @@ class Proxy(proxy.Proxy): """Get image member 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. """ return self._get( @@ -1614,7 +1614,7 @@ class Proxy(proxy.Proxy): """Get image tasks 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. """ return self._get( @@ -1627,7 +1627,7 @@ class Proxy(proxy.Proxy): """Get image task 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. """ return self._get( @@ -1640,7 +1640,7 @@ class Proxy(proxy.Proxy): """Get metadata definition namespace schema :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. """ return self._get( @@ -1653,7 +1653,7 @@ class Proxy(proxy.Proxy): """Get metadata definition namespaces schema :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. """ return self._get( @@ -1666,7 +1666,7 @@ class Proxy(proxy.Proxy): """Get metadata definition resource type association schema :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. """ return self._get( @@ -1679,7 +1679,7 @@ class Proxy(proxy.Proxy): """Get metadata definition resource type associations schema :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. """ return self._get( @@ -1692,7 +1692,7 @@ class Proxy(proxy.Proxy): """Get metadata definition object schema :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. """ return self._get( @@ -1705,7 +1705,7 @@ class Proxy(proxy.Proxy): """Get metadata definition objects schema :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. """ return self._get( @@ -1718,7 +1718,7 @@ class Proxy(proxy.Proxy): """Get metadata definition property schema :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. """ return self._get( @@ -1731,7 +1731,7 @@ class Proxy(proxy.Proxy): """Get metadata definition properties schema :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. """ return self._get( @@ -1744,7 +1744,7 @@ class Proxy(proxy.Proxy): """Get metadata definition tag schema :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. """ return self._get( @@ -1757,7 +1757,7 @@ class Proxy(proxy.Proxy): """Get metadata definition tags schema :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. """ return self._get( @@ -1785,7 +1785,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.image.v2.task.Task` instance. :returns: One :class:`~openstack.image.v2.task.Task` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_task.Task, task) @@ -1895,7 +1895,7 @@ class Proxy(proxy.Proxy): """Get a info about image constraints :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. """ return self._get(_si.Import, requires_id=False) diff --git a/openstack/image/v2/image.py b/openstack/image/v2/image.py index ec1da5e5f..3d1332c55 100644 --- a/openstack/image/v2/image.py +++ b/openstack/image/v2/image.py @@ -418,6 +418,6 @@ class Image(resource.Resource, tag.TagMixin, _download.DownloadMixin): if ignore_missing: return None - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f"No {cls.__name__} found for {name_or_id}" ) diff --git a/openstack/image/v2/service_info.py b/openstack/image/v2/service_info.py index 1b27b5143..24f82c777 100644 --- a/openstack/image/v2/service_info.py +++ b/openstack/image/v2/service_info.py @@ -47,7 +47,7 @@ class Store(resource.Resource): :class:`~openstack.image.v2.image.Image` instance. :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 is attempted to be deleted. """ @@ -57,7 +57,7 @@ class Store(resource.Resource): try: response = session.delete(url) exceptions.raise_from_response(response) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: if ignore_missing: return None raise diff --git a/openstack/instance_ha/v1/_proxy.py b/openstack/instance_ha/v1/_proxy.py index 11081e5ea..2a073709e 100644 --- a/openstack/instance_ha/v1/_proxy.py +++ b/openstack/instance_ha/v1/_proxy.py @@ -51,7 +51,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~masakariclient.sdk.ha.v1.notification.Notification` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~masakariclient.sdk.ha.v1.segment.Segment` instance. :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. """ 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 :class:`~masakariclient.sdk.ha.v1.segment.Segment` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent segment. @@ -159,7 +159,7 @@ class Proxy(proxy.Proxy): `~masakariclient.sdk.ha.v1.host.Host` instance. :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. :raises: :class:`~openstack.exceptions.InvalidRequest` when segment_id is None. @@ -179,7 +179,7 @@ class Proxy(proxy.Proxy): :param dict attrs: The attributes to update on the host represented. :returns: The updated host - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.InvalidRequest` 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: `~masakariclient.sdk.ha.v1.host.Host` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent host. :returns: ``None`` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.InvalidRequest` when segment_id is None. @@ -246,7 +246,7 @@ class Proxy(proxy.Proxy): a :class: `~masakariclient.sdk.ha.v1.notification.Notification` instance. :returns: one 'VMove' resource class. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.InvalidRequest` when notification_id is None. diff --git a/openstack/key_manager/v1/_proxy.py b/openstack/key_manager/v1/_proxy.py index e3f5ee9cd..f1240be11 100644 --- a/openstack/key_manager/v1/_proxy.py +++ b/openstack/key_manager/v1/_proxy.py @@ -42,7 +42,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.key_manager.v1.container.Container` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -77,7 +77,7 @@ class Proxy(proxy.Proxy): instance. :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. """ return self._get(_container.Container, container) @@ -125,7 +125,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.key_manager.v1.order.Order` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -157,7 +157,7 @@ class Proxy(proxy.Proxy): instance. :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. """ return self._get(_order.Order, order) @@ -205,7 +205,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.key_manager.v1.secret.Secret` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -238,7 +238,7 @@ class Proxy(proxy.Proxy): instance. :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. """ return self._get(_secret.Secret, secret) diff --git a/openstack/load_balancer/v2/_proxy.py b/openstack/load_balancer/v2/_proxy.py index 4e95023e1..28cebdbb4 100644 --- a/openstack/load_balancer/v2/_proxy.py +++ b/openstack/load_balancer/v2/_proxy.py @@ -102,7 +102,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.load_balancer.LoadBalancer` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the load balancer does not exist. When set to ``True``, no exception will be set when attempting to 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 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 set to ``True``, no exception will be set when attempting 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 :class:`~openstack.load_balancer.v2.listener.Listener` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -252,7 +252,7 @@ class Proxy(proxy.Proxy): instance. :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. """ return self._get(_listener.Listener, listener) @@ -266,7 +266,7 @@ class Proxy(proxy.Proxy): :returns: One :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. """ return self._get( @@ -335,7 +335,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.pool.Pool` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the pool does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent pool. @@ -349,7 +349,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a pool :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 set to ``True``, no exception will be set when attempting to delete a nonexistent pool. @@ -400,7 +400,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.pool.Pool` instance that the member belongs to. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent member. @@ -423,7 +423,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.pool.Pool` instance that the member belongs to. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -450,7 +450,7 @@ class Proxy(proxy.Proxy): that the member belongs to. :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. """ 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 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 set to ``True``, no exception will be set when attempting to find a nonexistent health monitor. @@ -507,7 +507,7 @@ class Proxy(proxy.Proxy): :raises: :class:`openstack.exceptions.DuplicateResource` if more 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``. """ return self._find( @@ -565,7 +565,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.healthmonitor.HealthMonitor` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the healthmonitor does not exist. When set to ``True``, no exception will be set when attempting to 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 :class:`~openstack.load_balancer.v2.l7_policy.L7Policy` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -646,7 +646,7 @@ class Proxy(proxy.Proxy): instance. :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. """ return self._get(_l7policy.L7Policy, l7_policy) @@ -703,7 +703,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.l7_policy.L7Policy` instance that the l7rule belongs to. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent l7rule. @@ -726,7 +726,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.l7_policy.L7Policy` instance that the l7rule belongs to. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -753,7 +753,7 @@ class Proxy(proxy.Proxy): instance that the l7rule belongs to. :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. """ l7policyobj = self._get_resource(_l7policy.L7Policy, l7_policy) @@ -815,7 +815,7 @@ class Proxy(proxy.Proxy): ID for the 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. """ 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 project ID for the quota. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent quota. @@ -914,7 +914,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.flavor_profile.FlavorProfile` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the flavor profile does not exist. When set to ``True``, no exception will be set when attempting to 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 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 set to ``True``, no exception will be set when attempting to delete a nonexistent flavor profile. @@ -998,7 +998,7 @@ class Proxy(proxy.Proxy): :param flavor: The flavorcan be either the ID or a :class:`~openstack.load_balancer.v2.flavor.Flavor` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the flavor does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent flavor. @@ -1012,7 +1012,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a flavor :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 set to ``True``, no exception will be set when attempting to delete a nonexistent flavor. @@ -1059,7 +1059,7 @@ class Proxy(proxy.Proxy): :param amphora_id: The ID of a amphora :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 set to ``True``, no exception will be set when attempting to find a nonexistent amphora. @@ -1138,7 +1138,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the availability zone profile does not exist. When set to ``True``, no exception will be set when attempting to 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 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 set to ``True``, no exception will be set when attempting to delete a nonexistent availability zone profile. @@ -1232,7 +1232,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.load_balancer.v2.availability_zone.AvailabilityZone` instance :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the availability zone does not exist. When set to ``True``, no exception will be set when attempting to 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 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 set to ``True``, no exception will be set when attempting to delete a nonexistent availability zone. diff --git a/openstack/message/v2/_proxy.py b/openstack/message/v2/_proxy.py index 0bb619455..4560ace5b 100644 --- a/openstack/message/v2/_proxy.py +++ b/openstack/message/v2/_proxy.py @@ -45,7 +45,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.message.v2.queue.Queue` instance. :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. """ 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 :class:`~openstack.message.v2.queue.Queue` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent queue. @@ -127,7 +127,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.message.v2.message.Message` instance. :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 = self._get_resource( @@ -148,7 +148,7 @@ class Proxy(proxy.Proxy): the claim seizing the message. If None, the message has not been claimed. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent message. @@ -206,7 +206,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.message.v2.subscription.Subscription` instance. :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 = self._get_resource( @@ -223,7 +223,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.message.v2.subscription.Subscription` instance. :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. When set to ``True``, no exception will be thrown when attempting to delete a nonexistent subscription. @@ -260,7 +260,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.message.v2.claim.Claim` instance. :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. """ 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 :class:`~openstack.message.v2.claim.Claim` instance. :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. When set to ``True``, no exception will be thrown when attempting to delete a nonexistent claim. diff --git a/openstack/network/v2/_proxy.py b/openstack/network/v2/_proxy.py index 058d3dcd8..f69c8e0b5 100644 --- a/openstack/network/v2/_proxy.py +++ b/openstack/network/v2/_proxy.py @@ -216,7 +216,7 @@ class Proxy(proxy.Proxy): try: rv = res.delete(self, if_revision=if_revision) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: if ignore_missing: return None raise @@ -243,7 +243,7 @@ class Proxy(proxy.Proxy): a :class:`~openstack.network.v2.address_group.AddressGroup` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will + :class:`~openstack.exceptions.NotFoundException` will be raised when the address group does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent address group. @@ -261,7 +261,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an address group. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -284,7 +284,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.address_group.AddressGroup` instance. :returns: One :class:`~openstack.network.v2.address_group.AddressGroup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_address_group.AddressGroup, address_group) @@ -365,7 +365,7 @@ class Proxy(proxy.Proxy): a :class:`~openstack.network.v2.address_scope.AddressScope` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the address scope does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent address scope. @@ -383,7 +383,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an address scope. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -406,7 +406,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.address_scope.AddressScope` instance. :returns: One :class:`~openstack.network.v2.address_scope.AddressScope` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_address_scope.AddressScope, address_scope) @@ -469,7 +469,7 @@ class Proxy(proxy.Proxy): :param agent: The value can be the ID of a agent or a :class:`~openstack.network.v2.agent.Agent` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the agent does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent agent. @@ -486,7 +486,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.agent.Agent` :rtype: :class:`~openstack.network.v2.agent.Agent` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_agent.Agent, agent) @@ -582,7 +582,7 @@ class Proxy(proxy.Proxy): :param project: The value is the ID or name of a project :param ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the topology does not exist. When set to ``True``, no exception will be raised when attempting to delete nonexistant topology @@ -761,7 +761,7 @@ class Proxy(proxy.Proxy): :param bgpvpn: The value can be either the ID of a bgpvpn or a :class:`~openstack.network.v2.bgpvpn.BgpVpn` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the BGPVPN does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent BGPVPN. @@ -775,7 +775,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a BGPVPN. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -795,7 +795,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.bgpvpn.BgpVpn` instance. :returns: One :class:`~openstack.network.v2.bgpvpn.BgpVpn` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_bgpvpn.BgpVpn, bgpvpn) @@ -857,7 +857,7 @@ class Proxy(proxy.Proxy): a :class:`~openstack.network.v2.bgpvpn_network_association. BgpVpnNetworkAssociation` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the BgpVpnNetworkAssociation does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent BgpVpnNetworkAssociation. @@ -884,7 +884,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2. bgpvpn_network_associaition.BgpVpnNetworkAssociation` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ bgpvpn_res = self._get_resource(_bgpvpn.BgpVpn, bgpvpn) @@ -946,7 +946,7 @@ class Proxy(proxy.Proxy): a :class:`~openstack.network.v2.bgpvpn_port_association. BgpVpnPortAssociation` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the BgpVpnPortAssociation does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent BgpVpnPortAssociation. @@ -969,7 +969,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a BgpVpnNetworkAssociation. :param bgpvpn_id: The value can be the ID of a BGPVPN. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -998,7 +998,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2. bgpvpn_port_associaition.BgpVpnPortAssociation` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ bgpvpn_res = self._get_resource(_bgpvpn.BgpVpn, bgpvpn) @@ -1085,7 +1085,7 @@ class Proxy(proxy.Proxy): a :class:`~openstack.network.v2.bgpvpn_router_association. BgpVpnRouterAssociation` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the BgpVpnRouterAssociation does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent BgpVpnRouterAsociation. @@ -1112,7 +1112,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2. bgpvpn_router_associaition.BgpVpnRouterAssociation` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ bgpvpn_res = self._get_resource(_bgpvpn.BgpVpn, bgpvpn) @@ -1166,7 +1166,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a extension. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1213,7 +1213,7 @@ class Proxy(proxy.Proxy): The value can be either the ID of a flavor or a :class:`~openstack.network.v2.flavor.Flavor` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent flavor. @@ -1227,7 +1227,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a flavor. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1247,7 +1247,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.flavor.Flavor` instance. :returns: One :class:`~openstack.network.v2.flavor.Flavor` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_flavor.Flavor, flavor) @@ -1343,7 +1343,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.local_ip.LocalIP` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the local ip does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ip. @@ -1364,7 +1364,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an local IP. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1388,7 +1388,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.local_ip.LocalIP` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_local_ip.LocalIP, local_ip) @@ -1465,7 +1465,7 @@ class Proxy(proxy.Proxy): `~openstack.network.v2.local_ip_association.LocalIPAssociation` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the local ip association does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ip. @@ -1493,7 +1493,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.local_ip.LocalIP` instance. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1525,7 +1525,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.local_ip_association.LocalIPAssociation` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ local_ip = self._get_resource(_local_ip.LocalIP, local_ip) @@ -1579,7 +1579,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.network.v2.floating_ip.FloatingIP` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the floating ip does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ip. @@ -1608,7 +1608,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an IP. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1632,7 +1632,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.floating_ip.FloatingIP` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_floating_ip.FloatingIP, floating_ip) @@ -1707,7 +1707,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.port_forwarding.PortForwarding` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ floating_ip = self._get_resource(_floating_ip.FloatingIP, floating_ip) @@ -1727,7 +1727,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.floating_ip.FloatingIP` instance. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1758,7 +1758,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.floating_ip.FloatingIP` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the floating ip does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ip. @@ -1837,7 +1837,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.health_monitor.HealthMonitor` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the health monitor does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent health monitor. @@ -1855,7 +1855,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a health monitor. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1881,7 +1881,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.health_monitor.HealthMonitor` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_health_monitor.HealthMonitor, health_monitor) @@ -1948,7 +1948,7 @@ class Proxy(proxy.Proxy): :param listener: The value can be either the ID of a listner or a :class:`~openstack.network.v2.listener.Listener` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent listener. @@ -1964,7 +1964,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a listener. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -1987,7 +1987,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.listener.Listener` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_listener.Listener, listener) @@ -2048,7 +2048,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.load_balancer.LoadBalancer` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the load balancer does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent load balancer. @@ -2066,7 +2066,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a load balancer. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2090,7 +2090,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.load_balancer.LoadBalancer` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_load_balancer.LoadBalancer, load_balancer) @@ -2142,7 +2142,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.metering_label.MeteringLabel` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the metering label does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent metering label. @@ -2160,7 +2160,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a metering label. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2186,7 +2186,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.metering_label.MeteringLabel` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_metering_label.MeteringLabel, metering_label) @@ -2249,7 +2249,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.metering_label_rule.MeteringLabelRule` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised + :class:`~openstack.exceptions.NotFoundException` will be raised when the metering label rule does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent metering label rule. @@ -2269,7 +2269,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a metering label rule. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2296,7 +2296,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.metering_label_rule.MeteringLabelRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -2363,7 +2363,7 @@ class Proxy(proxy.Proxy): The value can be either the ID of a network or a :class:`~openstack.network.v2.network.Network` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the network does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent network. @@ -2384,7 +2384,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a network. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2407,7 +2407,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.network.Network` instance. :returns: One :class:`~openstack.network.v2.network.Network` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_network.Network, network) @@ -2464,7 +2464,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a network. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2490,7 +2490,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.network_ip_availability.NetworkIPAvailability` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -2544,7 +2544,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.network_segment_range.NetworkSegmentRange` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the network segment range does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent network segment range. @@ -2564,7 +2564,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a network segment range. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2591,7 +2591,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2._network_segment_range.NetworkSegmentRange` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -2667,7 +2667,7 @@ class Proxy(proxy.Proxy): :param pool: The value can be either the ID of a pool or a :class:`~openstack.network.v2.pool.Pool` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the pool does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent pool. @@ -2681,7 +2681,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a pool. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2700,7 +2700,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.pool.Pool` instance. :returns: One :class:`~openstack.network.v2.pool.Pool` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_pool.Pool, pool) @@ -2772,7 +2772,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.pool.Pool` instance that the member belongs to. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the pool member does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent pool member. @@ -2795,7 +2795,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.pool.Pool` instance that the member belongs to. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2824,7 +2824,7 @@ class Proxy(proxy.Proxy): the member belongs to. :returns: One :class:`~openstack.network.v2.pool_member.PoolMember` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ poolobj = self._get_resource(_pool.Pool, pool) @@ -2909,7 +2909,7 @@ class Proxy(proxy.Proxy): :param port: The value can be either the ID of a port or a :class:`~openstack.network.v2.port.Port` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the port does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent port. @@ -2930,7 +2930,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a port. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -2949,7 +2949,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.port.Port` instance. :returns: One :class:`~openstack.network.v2.port.Port` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_port.Port, port) @@ -3046,7 +3046,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent bandwidth limit rule. @@ -3071,7 +3071,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -3102,7 +3102,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :returns: One :class:`~openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ policy = self._get_resource(_qos_policy.QoSPolicy, qos_policy) @@ -3196,7 +3196,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent minimum bandwidth rule. @@ -3221,7 +3221,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -3252,7 +3252,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :returns: One :class:`~openstack.network.v2.qos_dscp_marking_rule.QoSDSCPMarkingRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ policy = self._get_resource(_qos_policy.QoSPolicy, qos_policy) @@ -3341,7 +3341,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent minimum bandwidth rule. @@ -3366,7 +3366,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -3399,7 +3399,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule` :raises: - :class:`~openstack.exceptions.ResourceNotFound` + :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ policy = self._get_resource(_qos_policy.QoSPolicy, qos_policy) @@ -3487,7 +3487,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent minimum packet rate rule. @@ -3512,7 +3512,7 @@ class Proxy(proxy.Proxy): rule belongs or a :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param dict query: Any additional parameters to be passed into @@ -3542,7 +3542,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :returns: One :class:`~openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ policy = self._get_resource(_qos_policy.QoSPolicy, qos_policy) @@ -3617,7 +3617,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.qos_policy.QoSPolicy` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the QoS policy does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent QoS policy. @@ -3633,7 +3633,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a QoS policy. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -3657,7 +3657,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.qos_policy.QoSPolicy` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_qos_policy.QoSPolicy, qos_policy) @@ -3696,7 +3696,7 @@ class Proxy(proxy.Proxy): :param rule_type_name: The name of a QoS rule type. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -3718,7 +3718,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.qos_rule_type.QoSRuleType` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_qos_rule_type.QoSRuleType, qos_rule_type) @@ -3744,7 +3744,7 @@ class Proxy(proxy.Proxy): The ID of a quota is the same as the project ID for the quota. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent quota. @@ -3764,7 +3764,7 @@ class Proxy(proxy.Proxy): be returned. :returns: One :class:`~openstack.network.v2.quota.Quota` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ if details: @@ -3785,7 +3785,7 @@ class Proxy(proxy.Proxy): as the project ID for the default quota. :returns: One :class:`~openstack.network.v2.quota.QuotaDefault` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ quota_obj = self._get_resource(_quota.Quota, quota) @@ -3838,7 +3838,7 @@ class Proxy(proxy.Proxy): :param rbac_policy: The value can be either the ID of a RBAC policy or a :class:`~openstack.network.v2.rbac_policy.RBACPolicy` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the RBAC policy does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent RBAC policy. @@ -3854,7 +3854,7 @@ class Proxy(proxy.Proxy): :param rbac_policy: The ID of a RBAC policy. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -3877,7 +3877,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.rbac_policy.RBACPolicy` instance. :returns: One :class:`~openstack.network.v2.rbac_policy.RBACPolicy` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_rbac_policy.RBACPolicy, rbac_policy) @@ -3931,7 +3931,7 @@ class Proxy(proxy.Proxy): :param router: The value can be either the ID of a router or a :class:`~openstack.network.v2.router.Router` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the router does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent router. @@ -3952,7 +3952,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a router. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -3971,7 +3971,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.router.Router` instance. :returns: One :class:`~openstack.network.v2.router.Router` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_router.Router, router) @@ -4212,7 +4212,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.ndp_proxy.NDPProxy` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_ndp_proxy.NDPProxy, ndp_proxy) @@ -4222,7 +4222,7 @@ class Proxy(proxy.Proxy): :param ndp_proxy_id: The ID of a ndp proxy. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param dict query: Any additional parameters to be passed into @@ -4244,7 +4244,7 @@ class Proxy(proxy.Proxy): or a :class:`~openstack.network.v2.ndp_proxy.NDPProxy` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the router does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ndp proxy. @@ -4302,7 +4302,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.firewall_group.FirewallGroup` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the firewall group does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent firewall group. @@ -4320,7 +4320,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a firewall group. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -4345,7 +4345,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.firewall_group.FirewallGroup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_firewall_group.FirewallGroup, firewall_group) @@ -4410,7 +4410,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.firewall_policy.FirewallPolicy` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the firewall policy does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent firewall policy. @@ -4428,7 +4428,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a firewall policy. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -4455,7 +4455,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.firewall_policy.FirewallPolicy` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_firewall_policy.FirewallPolicy, firewall_policy) @@ -4559,7 +4559,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.firewall_rule.FirewallRule` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the firewall rule does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent firewall rule. @@ -4577,7 +4577,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a firewall rule. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -4603,7 +4603,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.firewall_rule.FirewallRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_firewall_rule.FirewallRule, firewall_rule) @@ -4676,7 +4676,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.security_group.SecurityGroup` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the security group does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent security group. @@ -4697,7 +4697,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a security group. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -4723,7 +4723,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.security_group.SecurityGroup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_security_group.SecurityGroup, security_group) @@ -4806,7 +4806,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.security_group_rule.SecurityGroupRule` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the security group rule does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent security group rule. @@ -4829,7 +4829,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The ID of a security group rule. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -4856,7 +4856,7 @@ class Proxy(proxy.Proxy): :returns: :class:`~openstack.network.v2.security_group_rule.SecurityGroupRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -4915,7 +4915,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.default_security_group_rule. DefaultSecurityGroupRule` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the defaul security group rule does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent default security group rule. @@ -4935,7 +4935,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The ID of a default security group rule. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -4963,7 +4963,7 @@ class Proxy(proxy.Proxy): :returns: :class:`~openstack.network.v2.default_security_group_rule. DefaultSecurityGroupRule` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -5012,7 +5012,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.segment.Segment` instance. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent segment. @@ -5026,7 +5026,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a segment. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5049,7 +5049,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.segment.Segment` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_segment.Segment, segment) @@ -5118,7 +5118,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.service_profile.ServiceProfile` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the service profile does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent service profile. @@ -5136,7 +5136,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a service profile. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5162,7 +5162,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.service_profile.ServiceProfile` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_service_profile.ServiceProfile, service_profile) @@ -5217,7 +5217,7 @@ class Proxy(proxy.Proxy): :param subnet: The value can be either the ID of a subnet or a :class:`~openstack.network.v2.subnet.Subnet` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the subnet does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent subnet. @@ -5238,7 +5238,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a subnet. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5257,7 +5257,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.subnet.Subnet` instance. :returns: One :class:`~openstack.network.v2.subnet.Subnet` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_subnet.Subnet, subnet) @@ -5321,7 +5321,7 @@ class Proxy(proxy.Proxy): :param subnet_pool: The value can be either the ID of a subnet pool or a :class:`~openstack.network.v2.subnet_pool.SubnetPool` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the subnet pool does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent subnet pool. @@ -5337,7 +5337,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a subnet pool. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5360,7 +5360,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.subnet_pool.SubnetPool` instance. :returns: One :class:`~openstack.network.v2.subnet_pool.SubnetPool` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_subnet_pool.SubnetPool, subnet_pool) @@ -5449,7 +5449,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a trunk. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5470,7 +5470,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.trunk.Trunk` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_trunk.Trunk, trunk) @@ -5565,7 +5565,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the vpn service does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent vpn service. @@ -5585,7 +5585,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a vpn service. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5612,7 +5612,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -5671,7 +5671,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an IPsec site connection. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5698,7 +5698,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -5751,7 +5751,7 @@ class Proxy(proxy.Proxy): instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the IPsec site connection does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent IPsec site connection. @@ -5782,7 +5782,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an IKE policy. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5808,7 +5808,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.vpn_ike_policy.VpnIkePolicy` :rtype: :class:`~openstack.network.v2.ike_policy.VpnIkePolicy` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_ike_policy.VpnIkePolicy, ike_policy) @@ -5846,7 +5846,7 @@ class Proxy(proxy.Proxy): instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` + :class:`~openstack.exceptions.NotFoundException` will be raised when the ike policy does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ike policy. @@ -5875,7 +5875,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of an IPsec policy. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -5902,7 +5902,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy` :rtype: :class:`~openstack.network.v2.ipsec_policy.VpnIpsecPolicy` - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_ipsec_policy.VpnIpsecPolicy, ipsec_policy) @@ -5943,7 +5943,7 @@ class Proxy(proxy.Proxy): instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` + :class:`~openstack.exceptions.NotFoundException` will be raised when the IPsec policy does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent IPsec policy. @@ -5976,7 +5976,7 @@ class Proxy(proxy.Proxy): The value can be either the ID of a vpn service or a :class:`~openstack.network.v2.vpn_service.VpnService` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the vpn service does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent vpn service. @@ -5992,7 +5992,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a vpn service. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -6017,7 +6017,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.vpn_service.VpnService` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_vpn_service.VpnService, vpn_service) @@ -6079,7 +6079,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.port_forwarding.PortForwarding` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the floating ip does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ip. @@ -6104,7 +6104,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.floating_ip.FloatingIP` instance. :param port_forwarding_id: The ID of a port forwarding. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -6135,7 +6135,7 @@ class Proxy(proxy.Proxy): instance. :returns: One :class:`~openstack.network.v2.port_forwarding.PortForwarding` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ floatingip = self._get_resource(_floating_ip.FloatingIP, floating_ip) @@ -6237,7 +6237,7 @@ class Proxy(proxy.Proxy): :returns: One :class:`~openstack.network.v2.l3_conntrack_helper.ConntrackHelper` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ router = self._get_resource(_router.Router, router) @@ -6284,7 +6284,7 @@ class Proxy(proxy.Proxy): :param router: The value can be the ID of a Router or a :class:`~openstack.network.v2.router.Router` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the floating ip does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent ip. @@ -6414,7 +6414,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the flow classifier does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent flow classifier. @@ -6434,7 +6434,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The name or ID of an SFC flow classifier. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -6460,7 +6460,7 @@ class Proxy(proxy.Proxy): :returns: :class:`~openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -6522,7 +6522,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.sfc_port_chain.SfcPortChain` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the port chain does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent port chain. @@ -6540,7 +6540,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The name or ID of an SFC port chain. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -6567,7 +6567,7 @@ class Proxy(proxy.Proxy): :returns: :class:`~openstack.network.v2.sfc_port_chain.SfcPortchain` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_sfc_port_chain.SfcPortChain, port_chain) @@ -6622,7 +6622,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.sfc_port_pair.SfcPortPair` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the port pair does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent port pair. @@ -6640,7 +6640,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The name or ID of an SFC port pair. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -6666,7 +6666,7 @@ class Proxy(proxy.Proxy): :returns: :class:`~openstack.network.v2.sfc_port_pair.SfcPortPair` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_sfc_port_pair.SfcPortPair, port_pair) @@ -6721,7 +6721,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.sfc_port_pair_group. SfcPortPairGroup` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the port pair group does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent port pair group. @@ -6741,7 +6741,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The name or ID of an SFC port pair group. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -6768,7 +6768,7 @@ class Proxy(proxy.Proxy): :returns: :class:`~openstack.network.v2.sfc_port_pair_group.SfcPortPairGroup` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get( @@ -6828,7 +6828,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.network.v2.sfc_service_graph.SfcServiceGraph` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the service graph does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent service graph. @@ -6846,7 +6846,7 @@ class Proxy(proxy.Proxy): :param str name_or_id: The name or ID of an SFC service graph. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -6873,7 +6873,7 @@ class Proxy(proxy.Proxy): :returns: :class:`~openstack.network.v2.sfc_service_graph.SfcServiceGraph` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_sfc_sservice_graph.SfcServiceGraph, service_graph) diff --git a/openstack/object_store/v1/_proxy.py b/openstack/object_store/v1/_proxy.py index 708c9d5e5..8b661ff28 100644 --- a/openstack/object_store/v1/_proxy.py +++ b/openstack/object_store/v1/_proxy.py @@ -157,7 +157,7 @@ class Proxy(proxy.Proxy): :param container: The value can be either the name of a container or a :class:`~openstack.object_store.v1.container.Container` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the container does not exist. When set to ``True``, no exception 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. :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. """ return self._head(_container.Container, container) @@ -279,7 +279,7 @@ class Proxy(proxy.Proxy): :returns: Instance of the :class:`~openstack.object_store.v1.obj.Object` objects. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.object_store.v1.container.Container` instance. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ 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 :class:`~openstack.object_store.v1.container.Container` instance. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :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 :class:`~openstack.object_store.v1.container.Container` instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the object does not exist. When set to ``True``, no exception will 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. :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. """ container_name = self._get_container_name(obj, container) diff --git a/openstack/object_store/v1/info.py b/openstack/object_store/v1/info.py index ad1e923c1..e71e25480 100644 --- a/openstack/object_store/v1/info.py +++ b/openstack/object_store/v1/info.py @@ -75,7 +75,7 @@ class Info(resource.Resource): :return: This :class:`Resource` instance. :raises: :exc:`~openstack.exceptions.MethodNotSupported` if :data:`Resource.allow_fetch` is not set to ``True``. - :raises: :exc:`~openstack.exceptions.ResourceNotFound` if + :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource was not found. """ if not self.allow_fetch: diff --git a/openstack/orchestration/v1/_proxy.py b/openstack/orchestration/v1/_proxy.py index 685f59ba2..696ae1ffa 100644 --- a/openstack/orchestration/v1/_proxy.py +++ b/openstack/orchestration/v1/_proxy.py @@ -130,7 +130,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a stack. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -162,7 +162,7 @@ class Proxy(proxy.Proxy): :param resolve_outputs: Whether stack should contain outputs resolved. :returns: One :class:`~openstack.orchestration.v1.stack.Stack` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ return self._get(_stack.Stack, stack, resolve_outputs=resolve_outputs) @@ -177,7 +177,7 @@ class Proxy(proxy.Proxy): :returns: The updated stack :rtype: :class:`~openstack.orchestration.v1.stack.Stack` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ res = self._get_resource(_stack.Stack, stack, **attrs) @@ -190,7 +190,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.orchestration.v1.stack.Stack` instance. :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. When set to ``True``, no exception will be set when 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 an instance of :class:`~openstack.orchestration.v1.stack.Stack` :returns: A dictionary containing the stack data. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ if isinstance(stack, _stack.Stack): @@ -269,7 +269,7 @@ class Proxy(proxy.Proxy): :returns: One object of :class:`~openstack.orchestration.v1.stack_template.StackTemplate` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. """ if isinstance(stack, _stack.Stack): @@ -292,7 +292,7 @@ class Proxy(proxy.Proxy): :returns: One object of :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. """ if isinstance(stack, _stack.Stack): @@ -315,7 +315,7 @@ class Proxy(proxy.Proxy): :returns: A dictionary containing the names and contents of all files used by the stack. - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when the stack cannot be found. """ if isinstance(stack, _stack.Stack): @@ -339,7 +339,7 @@ class Proxy(proxy.Proxy): an exception is thrown. :rtype: A generator of :class:`~openstack.orchestration.v1.resource.Resource` - :raises: :class:`~openstack.exceptions.ResourceNotFound` + :raises: :class:`~openstack.exceptions.NotFoundException` when the stack cannot be found. """ # 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 :class:`~openstack.orchestration.v1.software_config.SoftwareConfig` :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent software config. @@ -450,7 +450,7 @@ class Proxy(proxy.Proxy): software deployment or an instance of :class:`~openstack.orchestration.v1.software_deployment.SoftwareDeployment` :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent software deployment. diff --git a/openstack/orchestration/v1/stack.py b/openstack/orchestration/v1/stack.py index ef7230a17..2001ca383 100644 --- a/openstack/orchestration/v1/stack.py +++ b/openstack/orchestration/v1/stack.py @@ -242,7 +242,7 @@ class Stack(resource.Resource): self._translate_response(response, **kwargs) if self and self.status in ['DELETE_COMPLETE', 'ADOPT_COMPLETE']: - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( "No stack found for %s" % self.id ) return self @@ -256,7 +256,7 @@ class Stack(resource.Resource): :param name_or_id: This resource's identifier, if needed by the request. The default is ``None``. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -269,7 +269,7 @@ class Stack(resource.Resource): or None if nothing matches. :raises: :class:`openstack.exceptions.DuplicateResource` if more 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``. """ session = cls._get_session(session) @@ -287,7 +287,7 @@ class Stack(resource.Resource): if ignore_missing: return None - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f"No {cls.__name__} found for {name_or_id}" ) diff --git a/openstack/placement/v1/_proxy.py b/openstack/placement/v1/_proxy.py index 60768b5a5..80f64a510 100644 --- a/openstack/placement/v1/_proxy.py +++ b/openstack/placement/v1/_proxy.py @@ -48,7 +48,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.placement.v1.resource_class.ResourceClass`, instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource class does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent resource class. @@ -90,7 +90,7 @@ class Proxy(proxy.Proxy): :returns: An instance of :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. """ return self._get( @@ -130,7 +130,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.placement.v1.resource_provider.ResourceProvider`, instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource provider does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent resource provider. @@ -172,7 +172,7 @@ class Proxy(proxy.Proxy): :returns: An instance of :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. """ return self._get( @@ -185,13 +185,13 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a resource provider. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :returns: An instance of :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. """ return self._find( @@ -223,7 +223,7 @@ class Proxy(proxy.Proxy): :returns: An instance of :class:`~openstack.placement.v1.resource_provider.ResourceProvider` 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. """ res = self._get_resource( @@ -245,7 +245,7 @@ class Proxy(proxy.Proxy): :returns: An instance of :class:`~openstack.placement.v1.resource_provider.ResourceProvider` 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. """ res = self._get_resource( @@ -305,7 +305,7 @@ class Proxy(proxy.Proxy): instance. This value must be specified when ``resource_provider_inventory`` is an ID. :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 ``True``, no exception will be set when attempting to delete a nonexistent resource provider inventory. @@ -379,7 +379,7 @@ class Proxy(proxy.Proxy): :returns: An instance of :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_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 :class:`~openstack.placement.v1.trait.Trait`, instance. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource provider inventory does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent resource provider inventory. @@ -446,7 +446,7 @@ class Proxy(proxy.Proxy): :returns: An instance of :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. """ return self._get(_trait.Trait, trait) diff --git a/openstack/proxy.py b/openstack/proxy.py index e11184af9..5768fc9f8 100644 --- a/openstack/proxy.py +++ b/openstack/proxy.py @@ -519,7 +519,7 @@ class Proxy(adapter.Adapter): :param name_or_id: The name or ID of a resource to find. :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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -550,7 +550,7 @@ class Proxy(adapter.Adapter): resource or a :class:`~openstack.resource.Resource` subclass. :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. When set to ``True``, no exception will be set when attempting to delete a nonexistent resource. @@ -560,7 +560,7 @@ class Proxy(adapter.Adapter): :raises: ``ValueError`` if ``value`` is a :class:`~openstack.resource.Resource` that doesn't match the ``resource_type``. - :class:`~openstack.exceptions.ResourceNotFound` when + :class:`~openstack.exceptions.NotFoundException` when ignore_missing if ``False`` and a nonexistent resource is attempted to be deleted. """ @@ -568,7 +568,7 @@ class Proxy(adapter.Adapter): try: rv = res.delete(self) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: if ignore_missing: return None raise diff --git a/openstack/resource.py b/openstack/resource.py index 27db32702..979c1cc3f 100644 --- a/openstack/resource.py +++ b/openstack/resource.py @@ -1680,7 +1680,7 @@ class Resource(dict): :return: This :class:`Resource` instance. :raises: :exc:`~openstack.exceptions.MethodNotSupported` if :data:`Resource.allow_fetch` is not set to ``True``. - :raises: :exc:`~openstack.exceptions.ResourceNotFound` if + :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource was not found. """ if not self.allow_fetch: @@ -1721,7 +1721,7 @@ class Resource(dict): :return: This :class:`Resource` instance. :raises: :exc:`~openstack.exceptions.MethodNotSupported` if :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. """ if not self.allow_head: @@ -1952,7 +1952,7 @@ class Resource(dict): :return: This :class:`Resource` instance. :raises: :exc:`~openstack.exceptions.MethodNotSupported` if :data:`Resource.allow_commit` is not set to ``True``. - :raises: :exc:`~openstack.exceptions.ResourceNotFound` if + :raises: :exc:`~openstack.exceptions.NotFoundException` if the resource was not found. """ @@ -2316,9 +2316,9 @@ class Resource(dict): :param name_or_id: This resource's identifier, if needed by the request. The default is ``None``. :param bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when - the resource does not exist. When set to ``True``, None will be - returned when attempting to find a nonexistent resource. + :class:`~openstack.exceptions.NotFoundException` will be raised + when the resource does not exist. When set to ``True``, None will + be returned when attempting to find a nonexistent resource. :param str list_base_path: base_path to be used when need listing resources. :param str microversion: API version to override the negotiated one. @@ -2331,8 +2331,8 @@ class Resource(dict): or None if nothing matches. :raises: :class:`openstack.exceptions.DuplicateResource` if more than one resource is found for this request. - :raises: :class:`openstack.exceptions.ResourceNotFound` if nothing - is found and ignore_missing is ``False``. + :raises: :class:`openstack.exceptions.NotFoundException` if nothing is + found and ignore_missing is ``False``. """ session = cls._get_session(session) @@ -2377,7 +2377,7 @@ class Resource(dict): if ignore_missing: return None - raise exceptions.ResourceNotFound( + raise exceptions.NotFoundException( f"No {cls.__name__} found for {name_or_id}" ) diff --git a/openstack/shared_file_system/v2/_proxy.py b/openstack/shared_file_system/v2/_proxy.py index aa97fd5ee..836b2d3da 100644 --- a/openstack/shared_file_system/v2/_proxy.py +++ b/openstack/shared_file_system/v2/_proxy.py @@ -124,7 +124,7 @@ class Proxy(proxy.Proxy): :param name_or_id: The name or ID of a share. :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. When set to ``True``, None will be returned when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. diff --git a/openstack/shared_file_system/v2/share_access_rule.py b/openstack/shared_file_system/v2/share_access_rule.py index 66be84223..6edf54825 100644 --- a/openstack/shared_file_system/v2/share_access_rule.py +++ b/openstack/shared_file_system/v2/share_access_rule.py @@ -93,7 +93,7 @@ class ShareAccessRule(resource.Resource): try: response = self._action(session, body, url) self._translate_response(response) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: if not ignore_missing: raise return response diff --git a/openstack/tests/functional/baremetal/test_baremetal_allocation.py b/openstack/tests/functional/baremetal/test_baremetal_allocation.py index a74db925c..5433f8b73 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_allocation.py +++ b/openstack/tests/functional/baremetal/test_baremetal_allocation.py @@ -64,7 +64,7 @@ class TestBareMetalAllocation(Base): self.conn.baremetal.delete_allocation(allocation, ignore_missing=False) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_allocation, allocation.id, ) @@ -113,12 +113,12 @@ class TestBareMetalAllocation(Base): def test_allocation_negative_non_existing(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_allocation, uuid, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_allocation, uuid, ignore_missing=False, @@ -158,7 +158,7 @@ class TestBareMetalAllocationUpdate(Base): self.conn.baremetal.delete_allocation(allocation, ignore_missing=False) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_allocation, allocation.id, ) @@ -203,7 +203,7 @@ class TestBareMetalAllocationUpdate(Base): self.conn.baremetal.delete_allocation(allocation, ignore_missing=False) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_allocation, allocation.id, ) diff --git a/openstack/tests/functional/baremetal/test_baremetal_chassis.py b/openstack/tests/functional/baremetal/test_baremetal_chassis.py index 142e1fe93..2fdb2afbd 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_chassis.py +++ b/openstack/tests/functional/baremetal/test_baremetal_chassis.py @@ -24,7 +24,7 @@ class TestBareMetalChassis(base.BaseBaremetalTest): self.conn.baremetal.delete_chassis(chassis, ignore_missing=False) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_chassis, chassis.id, ) @@ -53,16 +53,16 @@ class TestBareMetalChassis(base.BaseBaremetalTest): def test_chassis_negative_non_existing(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, self.conn.baremetal.get_chassis, uuid + exceptions.NotFoundException, self.conn.baremetal.get_chassis, uuid ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.find_chassis, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_chassis, uuid, ignore_missing=False, diff --git a/openstack/tests/functional/baremetal/test_baremetal_deploy_templates.py b/openstack/tests/functional/baremetal/test_baremetal_deploy_templates.py index bf40c4b4e..b09d2680c 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_deploy_templates.py +++ b/openstack/tests/functional/baremetal/test_baremetal_deploy_templates.py @@ -40,7 +40,7 @@ class TestBareMetalDeployTemplate(base.BaseBaremetalTest): deploy_template, ignore_missing=False ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_deploy_template, deploy_template.id, ) @@ -165,12 +165,12 @@ class TestBareMetalDeployTemplate(base.BaseBaremetalTest): def test_deploy_template_negative_non_existing(self): uuid = "bbb45f41-d4bc-4307-8d1d-32f95ce1e920" self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_deploy_template, uuid, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_deploy_template, uuid, ignore_missing=False, diff --git a/openstack/tests/functional/baremetal/test_baremetal_driver.py b/openstack/tests/functional/baremetal/test_baremetal_driver.py index c182192a3..fb775c642 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_driver.py +++ b/openstack/tests/functional/baremetal/test_baremetal_driver.py @@ -27,7 +27,7 @@ class TestBareMetalDriver(base.BaseBaremetalTest): def test_driver_negative_non_existing(self): self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_driver, 'not-a-driver', ) diff --git a/openstack/tests/functional/baremetal/test_baremetal_node.py b/openstack/tests/functional/baremetal/test_baremetal_node.py index c01b6143a..50125224b 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_node.py +++ b/openstack/tests/functional/baremetal/test_baremetal_node.py @@ -50,7 +50,7 @@ class TestBareMetalNode(base.BaseBaremetalTest): self.conn.baremetal.delete_node(node, ignore_missing=False) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_node, self.node_id, ) @@ -63,7 +63,7 @@ class TestBareMetalNode(base.BaseBaremetalTest): self.conn.baremetal.delete_node(node, ignore_missing=False) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_node, self.node_id, ) @@ -223,22 +223,22 @@ class TestBareMetalNode(base.BaseBaremetalTest): def test_node_negative_non_existing(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, self.conn.baremetal.get_node, uuid + exceptions.NotFoundException, self.conn.baremetal.get_node, uuid ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.find_node, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_node, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.update_node, uuid, name='new-name', @@ -422,18 +422,18 @@ class TestBareMetalVif(base.BaseBaremetalTest): def test_node_vif_negative(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.attach_vif_to_node, uuid, self.vif_id, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.list_node_vifs, uuid, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.detach_vif_from_node, uuid, self.vif_id, diff --git a/openstack/tests/functional/baremetal/test_baremetal_port.py b/openstack/tests/functional/baremetal/test_baremetal_port.py index e704146c7..56e9ff9ae 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_port.py +++ b/openstack/tests/functional/baremetal/test_baremetal_port.py @@ -40,7 +40,7 @@ class TestBareMetalPort(base.BaseBaremetalTest): self.conn.baremetal.delete_port(port, ignore_missing=False) 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): @@ -107,22 +107,22 @@ class TestBareMetalPort(base.BaseBaremetalTest): def test_port_negative_non_existing(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, self.conn.baremetal.get_port, uuid + exceptions.NotFoundException, self.conn.baremetal.get_port, uuid ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.find_port, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_port, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.update_port, uuid, pxe_enabled=True, diff --git a/openstack/tests/functional/baremetal/test_baremetal_port_group.py b/openstack/tests/functional/baremetal/test_baremetal_port_group.py index 752f27202..4aaf76df3 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_port_group.py +++ b/openstack/tests/functional/baremetal/test_baremetal_port_group.py @@ -37,7 +37,7 @@ class TestBareMetalPortGroup(base.BaseBaremetalTest): self.conn.baremetal.delete_port_group(port_group, ignore_missing=False) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_port_group, port_group.id, ) @@ -100,18 +100,18 @@ class TestBareMetalPortGroup(base.BaseBaremetalTest): def test_port_group_negative_non_existing(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_port_group, uuid, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.find_port_group, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_port_group, uuid, ignore_missing=False, diff --git a/openstack/tests/functional/baremetal/test_baremetal_volume_connector.py b/openstack/tests/functional/baremetal/test_baremetal_volume_connector.py index bf3e70bfb..cdcc11ce4 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_volume_connector.py +++ b/openstack/tests/functional/baremetal/test_baremetal_volume_connector.py @@ -45,7 +45,7 @@ class TestBareMetalVolumeconnector(base.BaseBaremetalTest): volume_connector, ignore_missing=False ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_volume_connector, volume_connector.id, ) @@ -152,18 +152,18 @@ class TestBareMetalVolumeconnector(base.BaseBaremetalTest): def test_volume_connector_negative_non_existing(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_volume_connector, uuid, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.find_volume_connector, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_volume_connector, uuid, ignore_missing=False, diff --git a/openstack/tests/functional/baremetal/test_baremetal_volume_target.py b/openstack/tests/functional/baremetal/test_baremetal_volume_target.py index d6e9d8f0f..b64d7d69b 100644 --- a/openstack/tests/functional/baremetal/test_baremetal_volume_target.py +++ b/openstack/tests/functional/baremetal/test_baremetal_volume_target.py @@ -47,7 +47,7 @@ class TestBareMetalVolumetarget(base.BaseBaremetalTest): volume_target, ignore_missing=False ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_volume_target, volume_target.id, ) @@ -166,18 +166,18 @@ class TestBareMetalVolumetarget(base.BaseBaremetalTest): def test_volume_target_negative_non_existing(self): uuid = "5c9dcd04-2073-49bc-9618-99ae634d8971" self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.get_volume_target, uuid, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.find_volume_target, uuid, ignore_missing=False, ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.baremetal.delete_volume_target, uuid, ignore_missing=False, diff --git a/openstack/tests/functional/compute/v2/test_flavor.py b/openstack/tests/functional/compute/v2/test_flavor.py index ca680ffec..7fc5f861a 100644 --- a/openstack/tests/functional/compute/v2/test_flavor.py +++ b/openstack/tests/functional/compute/v2/test_flavor.py @@ -48,7 +48,7 @@ class TestFlavor(base.BaseFunctionalTest): def test_find_flavors_no_match_ignore_false(self): self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.conn.compute.find_flavor, "not a flavor", ignore_missing=False, diff --git a/openstack/tests/functional/dns/v2/test_zone_share.py b/openstack/tests/functional/dns/v2/test_zone_share.py index 53a9c766f..9bed932da 100644 --- a/openstack/tests/functional/dns/v2/test_zone_share.py +++ b/openstack/tests/functional/dns/v2/test_zone_share.py @@ -123,7 +123,7 @@ class TestZoneShare(base.BaseFunctionalTest): def test_find_zone_share_ignore_missing_false(self): self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.operator_cloud.dns.find_zone_share, self.zone, 'bogus_id', diff --git a/openstack/tests/functional/orchestration/v1/test_stack.py b/openstack/tests/functional/orchestration/v1/test_stack.py index 33492925c..91b5c489e 100644 --- a/openstack/tests/functional/orchestration/v1/test_stack.py +++ b/openstack/tests/functional/orchestration/v1/test_stack.py @@ -72,7 +72,7 @@ class TestStack(base.BaseFunctionalTest): self.conn.orchestration.wait_for_status( self.stack, 'DELETE_COMPLETE', wait=self._wait_for_timeout ) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: pass test_network.delete_network(self.conn, self.network, self.subnet) super().tearDown() diff --git a/openstack/tests/functional/shared_file_system/test_share.py b/openstack/tests/functional/shared_file_system/test_share.py index 86b91b98a..cab1c6c07 100644 --- a/openstack/tests/functional/shared_file_system/test_share.py +++ b/openstack/tests/functional/shared_file_system/test_share.py @@ -192,7 +192,7 @@ class ManageUnmanageShareTest(base.BaseSharedFileSystemTest): try: self.operator_cloud.share.get_share(self.SHARE_ID) - except exceptions.ResourceNotFound: + except exceptions.NotFoundException: pass managed_share = self.operator_cloud.share.manage_share( diff --git a/openstack/tests/unit/cloud/test_compute.py b/openstack/tests/unit/cloud/test_compute.py index f032b1709..b4c3d0340 100644 --- a/openstack/tests/unit/cloud/test_compute.py +++ b/openstack/tests/unit/cloud/test_compute.py @@ -66,7 +66,7 @@ class TestNovaExtensions(base.TestCase): ] ) self.assertRaises( - exceptions.ResourceNotFound, self.cloud._nova_extensions + exceptions.NotFoundException, self.cloud._nova_extensions ) self.assert_calls() diff --git a/openstack/tests/unit/cloud/test_domains.py b/openstack/tests/unit/cloud/test_domains.py index 0150d23e2..026424d39 100644 --- a/openstack/tests/unit/cloud/test_domains.py +++ b/openstack/tests/unit/cloud/test_domains.py @@ -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.assert_calls() diff --git a/openstack/tests/unit/cloud/test_fwaas.py b/openstack/tests/unit/cloud/test_fwaas.py index 599509ce3..c80b0689f 100644 --- a/openstack/tests/unit/cloud/test_fwaas.py +++ b/openstack/tests/unit/cloud/test_fwaas.py @@ -444,7 +444,7 @@ class TestFirewallPolicy(FirewallTestCase): with mock.patch.object(self.cloud.network, 'create_firewall_policy'): self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.cloud.create_firewall_policy, **posted_policy ) @@ -947,7 +947,7 @@ class TestFirewallPolicy(FirewallTestCase): with mock.patch.object(self.cloud.network, 'find_firewall_rule'): self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.cloud.insert_rule_into_policy, policy_name, 'bogus_rule', @@ -979,7 +979,7 @@ class TestFirewallPolicy(FirewallTestCase): ] ) self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.cloud.insert_rule_into_policy, self.firewall_policy_id, rule_name, @@ -1088,7 +1088,7 @@ class TestFirewallPolicy(FirewallTestCase): with mock.patch.object(self.cloud.network, 'find_firewall_rule'): self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.cloud.remove_rule_from_policy, self.firewall_policy_name, TestFirewallRule.firewall_rule_name, diff --git a/openstack/tests/unit/cloud/test_network.py b/openstack/tests/unit/cloud/test_network.py index e7ae1da97..98d0c8646 100644 --- a/openstack/tests/unit/cloud/test_network.py +++ b/openstack/tests/unit/cloud/test_network.py @@ -66,7 +66,7 @@ class TestNeutronExtensions(base.TestCase): ) ] ) - with testtools.ExpectedException(exceptions.ResourceNotFound): + with testtools.ExpectedException(exceptions.NotFoundException): self.cloud._neutron_extensions() self.assert_calls() diff --git a/openstack/tests/unit/cloud/test_openstackcloud.py b/openstack/tests/unit/cloud/test_openstackcloud.py index 8f69c069f..c7e3a3dc6 100644 --- a/openstack/tests/unit/cloud/test_openstackcloud.py +++ b/openstack/tests/unit/cloud/test_openstackcloud.py @@ -64,7 +64,7 @@ class TestSearch(base.TestCase): ) 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")] ret = self.cloud.search_resources("mock_session.fake", "fake_name") @@ -79,7 +79,7 @@ class TestSearch(base.TestCase): ) 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.cloud.search_resources( diff --git a/openstack/tests/unit/compute/v2/test_service.py b/openstack/tests/unit/compute/v2/test_service.py index 44665dd8f..02c62895f 100644 --- a/openstack/tests/unit/compute/v2/test_service.py +++ b/openstack/tests/unit/compute/v2/test_service.py @@ -127,7 +127,7 @@ class TestService(base.TestCase): list_mock.return_value = data self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, service.Service.find, self.sess, 'fake', diff --git a/openstack/tests/unit/network/v2/test_trunk.py b/openstack/tests/unit/network/v2/test_trunk.py index 3842668a3..9c83b5097 100644 --- a/openstack/tests/unit/network/v2/test_trunk.py +++ b/openstack/tests/unit/network/v2/test_trunk.py @@ -78,7 +78,7 @@ class TestTrunk(base.TestCase): 'segmentation_type': 'vlan', } ] - with testtools.ExpectedException(exceptions.ResourceNotFound, msg): + with testtools.ExpectedException(exceptions.NotFoundException, msg): sot.add_subports(sess, subports) def test_delete_subports_4xx(self): @@ -100,5 +100,5 @@ class TestTrunk(base.TestCase): 'segmentation_type': 'vlan', } ] - with testtools.ExpectedException(exceptions.ResourceNotFound, msg): + with testtools.ExpectedException(exceptions.NotFoundException, msg): sot.delete_subports(sess, subports) diff --git a/openstack/tests/unit/orchestration/v1/test_proxy.py b/openstack/tests/unit/orchestration/v1/test_proxy.py index 794c5221d..72691b18e 100644 --- a/openstack/tests/unit/orchestration/v1/test_proxy.py +++ b/openstack/tests/unit/orchestration/v1/test_proxy.py @@ -348,12 +348,12 @@ class TestOrchestrationResource(TestOrchestrationProxy): @mock.patch.object(resource.Resource, 'list') def test_resources_stack_not_found(self, mock_list, mock_find): stack_name = 'test_stack' - mock_find.side_effect = exceptions.ResourceNotFound( + mock_find.side_effect = exceptions.NotFoundException( 'No stack found for test_stack' ) 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)) diff --git a/openstack/tests/unit/orchestration/v1/test_stack.py b/openstack/tests/unit/orchestration/v1/test_stack.py index 079c5c078..be7dd05b3 100644 --- a/openstack/tests/unit/orchestration/v1/test_stack.py +++ b/openstack/tests/unit/orchestration/v1/test_stack.py @@ -230,7 +230,7 @@ class TestStack(base.TestCase): test_resource.FakeResponse( {'stack': {'stack_status': 'CREATE_COMPLETE'}}, 200 ), - exceptions.ResourceNotFound(message='oops'), + exceptions.NotFoundException(message='oops'), test_resource.FakeResponse( {'stack': {'stack_status': 'DELETE_COMPLETE'}}, 200 ), @@ -248,9 +248,9 @@ class TestStack(base.TestCase): microversion=None, skip_cache=False, ) - ex = self.assertRaises(exceptions.ResourceNotFound, sot.fetch, sess) + ex = self.assertRaises(exceptions.NotFoundException, sot.fetch, sess) 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)) def test_abandon(self): diff --git a/openstack/tests/unit/test_proxy.py b/openstack/tests/unit/test_proxy.py index d4904da87..78470afb6 100644 --- a/openstack/tests/unit/test_proxy.py +++ b/openstack/tests/unit/test_proxy.py @@ -236,7 +236,7 @@ class TestProxyDelete(base.TestCase): self.assertEqual(rv, self.fake_id) 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 ) @@ -244,12 +244,12 @@ class TestProxyDelete(base.TestCase): self.assertIsNone(rv) def test_delete_NotFound(self): - self.res.delete.side_effect = exceptions.ResourceNotFound( + self.res.delete.side_effect = exceptions.NotFoundException( message="test", http_status=404 ) self.assertRaisesRegex( - exceptions.ResourceNotFound, + exceptions.NotFoundException, # TODO(shade) The mocks here are hiding the thing we want to test. "test", self.sot._delete, @@ -467,12 +467,12 @@ class TestProxyGet(base.TestCase): self.assertEqual(rv, self.fake_result) 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 ) self.assertRaisesRegex( - exceptions.ResourceNotFound, + exceptions.NotFoundException, "test", self.sot._get, RetrieveableResource, diff --git a/openstack/tests/unit/test_resource.py b/openstack/tests/unit/test_resource.py index 42170b9ea..22cbda381 100644 --- a/openstack/tests/unit/test_resource.py +++ b/openstack/tests/unit/test_resource.py @@ -3302,7 +3302,7 @@ class TestResourceFind(base.TestCase): def existing(cls, **kwargs): response = mock.Mock() response.status_code = 404 - raise exceptions.ResourceNotFound('Not Found', response=response) + raise exceptions.NotFoundException('Not Found', response=response) @classmethod def list(cls, session, **params): @@ -3343,7 +3343,7 @@ class TestResourceFind(base.TestCase): def test_no_match_raise(self): self.assertRaises( - exceptions.ResourceNotFound, + exceptions.NotFoundException, self.no_results.find, self.cloud.compute, "name", @@ -3736,7 +3736,7 @@ class TestWaitForDelete(TestWait): res.fetch.side_effect = [ res, res, - exceptions.ResourceNotFound('Not Found', response), + exceptions.NotFoundException('Not Found', response), ] result = resource.wait_for_delete(self.cloud.compute, res, 1, 3) diff --git a/openstack/workflow/v2/_proxy.py b/openstack/workflow/v2/_proxy.py index 98c67b739..72994bb92 100644 --- a/openstack/workflow/v2/_proxy.py +++ b/openstack/workflow/v2/_proxy.py @@ -56,7 +56,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.workflow.v2.workflow.Workflow` instance. :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. """ return self._get(_workflow.Workflow, *attrs) @@ -86,7 +86,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.workflow.v2.workflow.Workflow` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -134,7 +134,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.workflow.v2.execution.Execution` instance. :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. """ return self._get(_execution.Execution, *attrs) @@ -164,7 +164,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.workflow.v2.execute.Execution` instance. :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. When set to ``True``, no exception will be set when 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 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. When set to ``True``, None will be returned when attempting to find a nonexistent resource. @@ -210,7 +210,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.workflow.v2.cron_trigger.CronTrigger` instance. :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. """ return self._get(_cron_trigger.CronTrigger, cron_trigger) @@ -244,7 +244,7 @@ class Proxy(proxy.Proxy): :class:`~openstack.workflow.v2.cron_trigger.CronTrigger` instance. :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. When set to ``True``, no exception will be set when 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 bool ignore_missing: When set to ``False`` - :class:`~openstack.exceptions.ResourceNotFound` will be raised when + :class:`~openstack.exceptions.NotFoundException` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param 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` or None - :raises: :class:`~openstack.exceptions.ResourceNotFound` when no + :raises: :class:`~openstack.exceptions.NotFoundException` when no resource can be found. :raises: :class:`~openstack.exceptions.DuplicateResource` when multiple resources are found.