/usr/lib/python2.6/site-packages/keystoneclient/openstack/common/apiclient
NameSizeModeActions
auth.py74770644editdlrm
auth.pyc88030644editdlrm
base.py147960644editdlrm
base.pyc169040644editdlrm
client.py138940644editdlrm
client.pyc140140644editdlrm
exceptions.py36110644editdlrm
exceptions.pyc17720644editdlrm
fake_client.py64810644editdlrm
fake_client.pyc63440644editdlrm
utils.py34240644editdlrm
utils.pyc21670644editdlrm
__init__.py7940644editdlrm
__init__.pyc3920644editdlrm
Edit: /usr/lib/python2.6/site-packages/keystoneclient/openstack/common/apiclient/auth.pyc (8803B)
Ñò s    cCs@yt|}Wn"tj oti|ƒ‚nX|d|ƒS(Nt auth_system(RtKeyErrorRtAuthSystemNotFound(Rt plugin_class((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyt load_pluginMs cCs¹|i}|o(t|ƒ}|i|ƒ|iƒ|SxhttitƒƒD]Q}t|}|ƒ}|i|ƒy|iƒWnti j o qNnX|SWti dgƒ‚dS(säLoad required plugin and populate it with options. Try to guess auth system if it is not specified. Systems are tried in alphabetical order. :type args: argparse.Namespace :raises: AuthPluginOptionsMissing RN( tos_auth_systemRt parse_optstsufficient_optionstsortedRtiterkeysRRtAuthPluginOptionsMissing(targsRRtplugin_auth_systemR((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pytload_plugin_from_argsUs"       RcBs¹eZdZdZgZddddddgZdd„Zed„ƒZ e d „ƒZ e d „ƒZ ed „ƒZ d „Zd „Zeid„ƒZd„Zeid„ƒZRS(s–Base class for authentication plugins. An authentication plugin needs to override at least the authenticate method to be a valid plugin. Rtusernametpasswordt tenant_namettokentauth_urlc s9|p|i|_t‡fd†|iDƒƒ|_dS(Nc3s(x!|]}|ˆi|ƒfVqWdS(N(tget(t.0R(tkwargs(s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pys †s (Rtdictt opt_namestopts(tselfRR-((R-s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyt__init__„scCs|iddƒ}d|iƒ}tii|dƒ}d|}|id|dd|d |d |ƒ|id |dd|d tiƒd S( seAdd an option to parser in two variants. :param opt: option name (with underscores) t_t-sOS_%stsDefaults to env[%s].s--os-%stmetavars<%s>tdefaultthelps--os_%sN(treplacetuppertostenvironR+t add_argumenttargparsetSUPPRESS(Rtoptt dashed_opttenv_vart arg_defaulttarg_help((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyt_parser_add_opt‰s     cCs<x5|iD]*}|tijo|i||ƒq q WdS(s>Populate the parser with the options for this plugin. N(R/Rtcommon_opt_namesRE(tclsRR@((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyRs cCs(x!|iD]}|i||ƒq WdS(s9Add options that are common for several plugins. N(RFRE(RGRR@((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyR§s cCs|t|d|dƒfS(s‹Return option name and value. :param opt_name: name of the option, e.g., "username" :param args: parsed arguments sos_%sN(tgetattrtNone(topt_nameR#((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pytget_opt®scs0ˆiit‡‡fd†ˆiDƒƒƒdS(sÑParse the actual auth-system options if any. This method is expected to populate the attribute `self.opts` with a dict containing the options and values needed to make authentication. c3s%x|]}ˆi|ˆƒVqWdS(N(RK(R,RJ(R1R#(s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pys ½s N(R0tupdateR.R/(R1R#((R1R#s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyR·scCs|iƒ|i|ƒdS(s-Authenticate using plugin defined method. The method usually analyses `self.opts` and performs a request to authentication server. :param http_client: client object that needs authentication :type http_client: HTTPClient :raises: AuthorizationFailure N(Rt_do_authenticate(R1t http_client((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyt authenticateÀs cCsdS(s-Protected method for authentication. N((R1RN((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyRMÍscCsYg}|iD]$}|ii|ƒp ||qq~}|oti|ƒ‚ndS(s^Check if all required options are present. :raises: AuthPluginOptionsMissing N(R/R0R+RR"(R1t_[1]R@tmissing((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyRÒs  'cCsdS(sÙReturn token and endpoint. :param service_type: Service type of the endpoint :type service_type: string :param endpoint_type: Type of endpoint. Possible values: public or publicURL, internal or internalURL, admin or adminURL :type endpoint_type: string :returns: tuple of token and endpoint strings :raises: EndpointException N((R1t endpoint_typet service_type((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyttoken_and_endpointÝsN(t__name__t __module__t__doc__RIRR/RFR2t staticmethodREt classmethodRRRKRROtabctabstractmethodRMRRT(((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyRqs&     (RZR>R;Rt stevedoreRt)keystoneclient.openstack.common.apiclientRRR RRR%t add_metaclasstABCMetatobjectR(((s]/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/openstack/common/apiclient/auth.pyt!s