/usr/lib/python2.6/site-packages/openstack
Edit: /usr/lib/python2.6/site-packages/openstack/proxy.pyc (12935B)
Ñò
5
Wc @ sF d d k l Z d d k l Z e d „ Z d e f d „ ƒ YZ d S( iÿÿÿÿ( t
exceptions( t resourcec s ‡ f d † } | S( Nc s d ‡ ‡ f d † } | S( Nc sœ ˆ o8 | d j o+ t | t i ƒ o t d | i ƒ ‚ nH t | t i ƒ o4 t | | ƒ o# t d | i | i i f ƒ ‚ n ˆ | | | | | Ž S( Ns A %s must be passeds Expected %s but received %s( t Nonet
isinstanceR t Resourcet
ValueErrort __name__t __class__( t selft expectedt actualt argst kwargs( t methodt strict( s5 /tmp/pip-build-wCUybK/openstacksdk/openstack/proxy.pyt check s ( R ( R
R ( R ( R
s5 /tmp/pip-build-wCUybK/openstacksdk/openstack/proxy.pyt wrap s
( ( R R ( ( R s5 /tmp/pip-build-wCUybK/openstacksdk/openstack/proxy.pyt _check_resource s t BaseProxyc B sÔ e Z d „ Z d d „ Z d e d „ Z e d e ƒ d e d „ ƒ Z e d e ƒ d d „ ƒ Z
d d „ Z e d e ƒ d d d d „ ƒ Z d e d d „ Z
d d d „ Z g d
d d „ Z d
d d
„ Z RS( c C s
| | _ d S( N( t session( R R ( ( s5 /tmp/pip-build-wCUybK/openstacksdk/openstack/proxy.pyt __init__+ s c C s‡ | d j o
| ƒ } nF t | | ƒ p/ h t i i | ƒ | i 6} | i | } n | } | d j o | i d t | n | S( s\ Get a resource object to work on
:param resource_type: The type of resource to operate on. This should
be a subclass of
:class:`~openstack.resource.Resource` with a
``from_id`` method.
:param value: The ID of a resource or an object of ``resource_type``
class if using an existing instance, or None to create a
new instance.
:param path_args: A dict containing arguments for forming the request
URL, if needed.
t ignore_noneN( R R R R t get_idt id_attributet existingt update_attrst True( R t
resource_typet valuet path_argst resR ( ( s5 /tmp/pip-build-wCUybK/openstacksdk/openstack/proxy.pyt
_get_resource. s
c C s | i | i | d | d | ƒS( sÝ Find a resource
: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
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 ``resource_type`` or None
R t ignore_missing( t findR ( R R t
name_or_idR R ( ( s5 /tmp/pip-build-wCUybK/openstacksdk/openstack/proxy.pyt _findM s
R c C s´ | i | | | ƒ } y | i | i ƒ } Wn‚ t i j
os } | o d
St i d d | i | f d | i d | i d | i
d | i d | i d | i
d | i ƒ ‚ n X| S( só Delete a resource
:param resource_type: The type of resource to delete. This should
be a :class:`~openstack.resource.Resource`
subclass with a ``from_id`` method.
:param value: The value to delete. Can be either the ID of a
resource or a :class:`~openstack.resource.Resource`
subclass.
:param path_args: A dict containing arguments for forming the request
URL, if needed.
: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``, no exception will be set when
attempting to delete a nonexistent resource.
:returns: The result of the ``delete``
:raises: ``ValueError`` if ``value`` is a
:class:`~openstack.resource.Resource` that doesn't match
the ``resource_type``.
:class:`~openstack.exceptions.ResourceNotFound` when
ignore_missing if ``False`` and a nonexistent resource
is attempted to be deleted.
t messages No %s found for %st detailst responset
request_idt urlR
t http_statust causeN( R t deleteR R t NotFoundExceptionR t ResourceNotFoundR R% R&