/usr/lib/python2.6/site-packages/keystoneclient/v2_0
NameSizeModeActions
certificates.py12460644editdlrm
certificates.pyc14780644editdlrm
client.py94680644editdlrm
client.pyc86040644editdlrm
ec2.py19850644editdlrm
ec2.pyc25740644editdlrm
endpoints.py16360644editdlrm
endpoints.pyc20060644editdlrm
extensions.py10180644editdlrm
extensions.pyc13380644editdlrm
roles.py31360644editdlrm
roles.pyc39520644editdlrm
services.py17020644editdlrm
services.pyc22350644editdlrm
shell.py203130644editdlrm
shell.pyc210530644editdlrm
tenants.py62790644editdlrm
tenants.pyc64880644editdlrm
tokens.py40950644editdlrm
tokens.pyc52760644editdlrm
users.py47630644editdlrm
users.pyc56210644editdlrm
__init__.py840644editdlrm
__init__.pyc2690644editdlrm
Edit: /usr/lib/python2.6/site-packages/keystoneclient/v2_0/client.pyc (8604B)
Ñò eZdZdZd„Zddddddddd„ZRS(sŠClient for the OpenStack Keystone v2.0 API. :param string username: Username for authentication. (optional) :param string password: Password for authentication. (optional) :param string token: Token for authentication. (optional) :param string tenant_id: Tenant id. (optional) :param string tenant_name: Tenant name. (optional) :param string auth_url: Keystone service endpoint for authorization. :param string region_name: Name of a region to select when choosing an endpoint from the service catalog. :param string endpoint: A user-supplied endpoint URL for the keystone service. Lazy-authentication is possible for API service calls if endpoint is set at instantiation.(optional) :param integer timeout: Allows customization of the timeout for client http requests. (optional) :param string original_ip: The original IP of the requesting user which will be sent to Keystone in a 'Forwarded' header. (optional) :param string cert: Path to the Privacy Enhanced Mail (PEM) file which contains the corresponding X.509 client certificate needed to established two-way SSL connection with the identity service. (optional) :param string key: Path to the Privacy Enhanced Mail (PEM) file which contains the unencrypted client private key needed to established two-way SSL connection with the identity service. (optional) :param string cacert: Path to the Privacy Enhanced Mail (PEM) file which contains the trusted authority X.509 certificates needed to established SSL connection with the identity service. (optional) :param boolean insecure: Does not perform X.509 certificate validation when establishing SSL connection with identity service. default: False (optional) :param dict auth_ref: To allow for consumers of the client to manage their own caching strategy, you may initialize a client with a previously captured auth_reference (token) :param boolean debug: Enables debug logging of all request and responses to keystone. default False (option) .. warning:: If debug is enabled, it may show passwords in plain text as a part of its output. .. warning:: Constructing an instance of this class without a session is deprecated as of the 1.7.0 release and will be removed in the 2.0.0 release. The client can be created and used like a user or in a strictly bootstrap mode. Normal operation expects a username, password, auth_url, and tenant_name or id to be provided. Other values will be lazily loaded as needed from the service catalog. Example:: >>> from keystoneclient.v2_0 import client >>> keystone = client.Client(username=USER, ... password=PASS, ... tenant_name=TENANT_NAME, ... auth_url=KEYSTONE_URL) >>> keystone.tenants.list() ... >>> user = keystone.users.get(USER_ID) >>> user.delete() Once authenticated, you can store and attempt to re-use the authenticated token. the auth_ref property on the client returns as a dictionary-like-object so that you can export and cache it, re-using it when initiating another client:: >>> from keystoneclient.v2_0 import client >>> keystone = client.Client(username=USER, ... password=PASS, ... tenant_name=TENANT_NAME, ... auth_url=KEYSTONE_URL) >>> auth_ref = keystone.auth_ref >>> # pickle or whatever you like here >>> new_client = client.Client(auth_ref=auth_ref) Alternatively, you can provide the administrative token configured in keystone and an endpoint to communicate with directly. See (``admin_token`` in ``keystone.conf``) In this case, authenticate() is not needed, and no service catalog will be loaded. Example:: >>> from keystoneclient.v2_0 import client >>> admin_client = client.Client( ... token='12345secret7890', ... endpoint='http://localhost:35357/v2.0') >>> admin_client.tenants.list() sv2.0cKs<|idƒptidtƒntt|ƒi|ti|i ƒ|_t i |i ƒ|_ t i |i ƒ|_ ti|i ƒ|_ti|i ƒ|_ti|i ƒ|_ti|i |iƒ|_ti|i |i|iƒ|_ti|i ƒ|_|idƒ o|idjo|iƒndS(s2Initialize a new client for the Keystone v2.0 API.tsessions¨Constructing an instance of the keystoneclient.v2_0.client.Client class without a session is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.N(tgettwarningstwarntDeprecationWarningtsuperR t__init__RtCertificatesManagert_adapterRtEndpointManagerRtExtensionManagerRt RoleManagerR tServiceManagerR t TokenManagerR t UserManagerR t TenantManagerRtCredentialsManagertmanagement_urltNonet authenticate(tselftkwargs((sI/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/v2_0/client.pyR‰s"  !c KsXyÅ|d jottdƒƒ‚nh| d6|p|d6|p|d6} |oti||| } nF|o#|oti|||| } ntdƒ} ti| ƒ‚| i|i ƒSWnŒtiti fj ot i dƒ‚n_ti j o"tdƒ} ti| ƒ‚n/tj o"}titdƒ|ƒ‚nXd S( snAuthenticate against the v2 Identity API. If a token is provided it will be used in preference over username and password. :returns: access.AccessInfo if authentication was successful. :raises keystoneclient.exceptions.AuthorizationFailure: if unable to authenticate or validate the existing authorization token s'Cannot authenticate without an auth_urlttrust_idt tenant_idt tenant_names-A username and password or token is required.sAuthorization Failed.s9There was no suitable authentication url for this requestsAuthorization Failed: %sN(R t ValueErrorRtv2_authtTokentPasswordRtAuthorizationFailuret get_auth_refRt Unauthorizedt_loggertdebugtEndpointNotFoundt Exception(R"tauth_urltusernametpasswordR&R%ttokent project_namet project_idR$R#t new_kwargstplugintmsgte((sI/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/v2_0/client.pyt#get_raw_token_from_identity_service¨s.      N(t__name__t __module__t__doc__tversionRR R<(((sI/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/v2_0/client.pyR %s` (tloggingRtkeystoneclient.auth.identityRR(tkeystoneclientRRtkeystoneclient.i18nRtkeystoneclient.v2_0RRRRRR R R R t getLoggerR=R.t HTTPClientR (((sI/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/v2_0/client.pyts