/usr/lib/python2.6/site-packages/openstackclient/identity
NameSizeModeActions
v2_0/-0755rm
v3/-0755rm
client.py24940644editdlrm
client.pyc25600644editdlrm
common.py60430644editdlrm
common.pyc56820644editdlrm
__init__.py00644editdlrm
__init__.pyc1680644editdlrm
Edit: /usr/lib/python2.6/site-packages/openstackclient/identity/common.pyc (5682B)
Ñò ;vVc @sædZddklZddklZddklZddklZddklZddk lZddk l Z d„Z d „Z d „Z dd „Zdd „Zdd „Zd„Zd„Zd„Zd„Zd„ZdS(sCommon identity codeiÿÿÿÿ(t exceptions(tdomains(tgroups(tprojects(tusers(tutilscCs}yti|i|ƒSWn_tij oPy|iid|ƒSWqytij o d|}ti|ƒ‚qyXnXdS(s#Find a service by id, name or type.ttypes2No service with a type, name or ID of '%s' exists.N(Rt find_resourcetservicesRt CommandErrortfindt identity_exctNotFound(tidentity_clienttname_type_or_idtmsg((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt find_servicescCs"|pdSt||ƒ}|iS(N(tNonet find_domaintid(R tdomain_name_or_idtdomain((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt_get_domain_id_if_requested.scCst|i|tiƒS(N(t_find_identity_resourceRtDomain(R t name_or_id((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyR5s cCsMt||ƒ}|pt|i|tiƒSt|i|tid|ƒSdS(Nt domain_id(RRRtGroup(R RRR((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt find_group:s    cCsMt||ƒ}|pt|i|tiƒSt|i|tid|ƒSdS(NR(RRRtProject(R RRR((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt find_projectDs    cCsMt||ƒ}|pt|i|tiƒSt|i|tid|ƒSdS(NR(RRRtUser(R RRR((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt find_userNs    cKs_y+ti|||}|dj o|SWntij onX|dh|d6|d6ƒS(s Find a specific identity resource. Using keystoneclient's manager, attempt to find a specific resource by its name or ID. If Forbidden to find the resource (a common case if the user does not have permission), then return the resource by creating a local instance of keystoneclient's Resource. The parameter identity_client_manager is a keystoneclient manager, for example: keystoneclient.v3.users or keystoneclient.v3.projects. The parameter resource_type is a keystoneclient resource, for example: keystoneclient.v3.users.User or keystoneclient.v3.projects.Project. :param identity_client_manager: the manager that contains the resource :type identity_client_manager: `keystoneclient.base.CrudManager` :param name_or_id: the resources's name or ID :type name_or_id: string :param resource_type: class that represents the resource type :type resource_type: `keystoneclient.base.Resource` :returns: the resource in question :rtype: `keystoneclient.base.Resource` RtnameN(RRRR t Forbidden(tidentity_client_managerRt resource_typetkwargstidentity_resource((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyRXs    cCs|idddddƒdS(Ns --user-domaintmetavars thelpsfDomain the user belongs to (name or ID). This can be used in case collisions between user names exist.(t add_argument(tparser((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt add_user_domain_option_to_parser~scCs|idddddƒdS(Ns--group-domainR'sR(shDomain the group belongs to (name or ID). This can be used in case collisions between group names exist.(R)(R*((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt!add_group_domain_option_to_parserˆscCs|idddddƒdS(Ns--project-domainR'sR(slDomain the project belongs to (name or ID). This can be used in case collisions between project names exist.(R)(R*((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyt#add_project_domain_option_to_parser’scCs#|iddddtddƒdS(Ns --inheritedtactiont store_truetdefaultR(s>Specifies if the role grant is inheritable to the sub projects(R)tFalse(R*((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pytadd_inherited_option_to_parserœs N(t__doc__tkeystoneclientRR tkeystoneclient.v3RRRRtopenstackclient.commonRRRRRRRR RR+R,R-R2(((sO/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/identity/common.pyts$    &