Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/identity/v2/__pycache__/_proxy.cpython-39.pyc
Ðазад
a u�hx* � @ sR d dl mZ d dl mZ d dl mZ d dl mZ d dl m Z G dd� de j�ZdS ) � )� extension)�role)�tenant)�user)�proxyc @ s� e Zd Zdd� Zdd� Zdd� Zd+dd �Zd,d d�Zdd � Zdd� Z dd� Z dd� Zd-dd�Zd.dd�Z dd� Zdd� Zdd� Zdd� Zd/d d!�Zd0d"d#�Zd$d%� Zd&d'� Zd(d)� Zd*S )1�Proxyc C s | � tj�S )z�Retrieve a generator of extensions :returns: A generator of extension instances. :rtype: :class:`~openstack.identity.v2.extension.Extension` )�_list� _extension� Extension)�self� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/identity/v2/_proxy.py� extensions s zProxy.extensionsc C s | � tj|�S )a� Get a single extension :param extension: The value can be the ID of an extension or a :class:`~openstack.identity.v2.extension.Extension` instance. :returns: One :class:`~openstack.identity.v2.extension.Extension` :raises: :class:`~openstack.exceptions.ResourceNotFound` when no extension can be found. )�_getr r )r r r r r � get_extension s zProxy.get_extensionc K s | j tjfi |��S )aq Create a new role from attributes :param dict attrs: Keyword arguments which will be used to create a :class:`~openstack.identity.v2.role.Role`, comprised of the properties on the Role class. :returns: The results of role creation :rtype: :class:`~openstack.identity.v2.role.Role` )�_create�_role�Role�r �attrsr r r �create_role+ s zProxy.create_roleTc C s | j tj||d� dS )a Delete a role :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 raised when the role does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent role. :returns: ``None`` ��ignore_missingN)�_deleter r )r r r r r r �delete_role7 s zProxy.delete_rolec C s | j tj||d�S )a� Find a single role :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 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.identity.v2.role.Role` or None r )�_findr r �r Z name_or_idr r r r � find_roleF s �zProxy.find_rolec C s | � tj|�S )aR Get a single role :param role: The value can be the ID of a role or a :class:`~openstack.identity.v2.role.Role` instance. :returns: One :class:`~openstack.identity.v2.role.Role` :raises: :class:`~openstack.exceptions.ResourceNotFound` when no resource can be found. )r r r )r r r r r �get_roleT s zProxy.get_rolec K s | j tjfi |��S )a Retrieve a generator of roles :param kwargs query: Optional query parameters to be sent to limit the resources being returned. :returns: A generator of role instances. :rtype: :class:`~openstack.identity.v2.role.Role` )r r r �r �queryr r r �roles` s zProxy.rolesc K s | j tj|fi |��S )a] Update a role :param role: Either the ID of a role or a :class:`~openstack.identity.v2.role.Role` instance. :attrs kwargs: The attributes to update on the role represented by ``value``. :returns: The updated role :rtype: :class:`~openstack.identity.v2.role.Role` )�_updater r )r r r r r r �update_rolek s zProxy.update_rolec K s | j tjfi |��S )a Create a new tenant from attributes :param dict attrs: Keyword arguments which will be used to create a :class:`~openstack.identity.v2.tenant.Tenant`, comprised of the properties on the Tenant class. :returns: The results of tenant creation :rtype: :class:`~openstack.identity.v2.tenant.Tenant` )r �_tenant�Tenantr r r r � create_tenantx s zProxy.create_tenantc C s | j tj||d� dS )a Delete a tenant :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 raised when the tenant does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent tenant. :returns: ``None`` r N)r r$ r% )r r r r r r � delete_tenant� s zProxy.delete_tenantc C s | j tj||d�S )a� Find a single tenant :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 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.identity.v2.tenant.Tenant` or None r )r r$ r% r r r r �find_tenant� s �zProxy.find_tenantc C s | � tj|�S )ab Get a single tenant :param tenant: The value can be the ID of a tenant or a :class:`~openstack.identity.v2.tenant.Tenant` instance. :returns: One :class:`~openstack.identity.v2.tenant.Tenant` :raises: :class:`~openstack.exceptions.ResourceNotFound` when no resource can be found. )r r$ r% )r r r r r � get_tenant� s zProxy.get_tenantc K s | j tjfi |��S )a% Retrieve a generator of tenants :param kwargs query: Optional query parameters to be sent to limit the resources being returned. :returns: A generator of tenant instances. :rtype: :class:`~openstack.identity.v2.tenant.Tenant` )r r$ r% r r r r �tenants� s z Proxy.tenantsc K s | j tj|fi |��S )ap Update a tenant :param tenant: Either the ID of a tenant or a :class:`~openstack.identity.v2.tenant.Tenant` instance. :attrs kwargs: The attributes to update on the tenant represented by ``value``. :returns: The updated tenant :rtype: :class:`~openstack.identity.v2.tenant.Tenant` )r"