Module Expr Str ImportFrom alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias alias alias ImportFrom alias alias alias ImportFrom alias alias TryExcept body ImportFrom alias ImportFrom alias ImportFrom alias Import alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str FunctionDef arguments args defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body TryExcept body Assign NameStore BinOpAdd Str Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str Str Assign NameStore Call NameLoad NameLoad keyword NameLoad Return TupleLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Return TupleLoad Num Call NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn Str NameLoad CompareEq Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num CompareEq Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num body Assign SubscriptStore NameLoad Index Str BinOpAdd SubscriptLoad NameLoad Index Str Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn Str SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Num orelse Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd CompareEq Call NameLoad AttributeLoad NameLoad attr Num UnaryOpNot AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler body Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr NameLoad body If NameLoad body Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse If CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Str body Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Str body Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr Str body Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse Return NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If BoolOpAnd UnaryOpNot NameLoad CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If BoolOpAnd UnaryOpNot NameLoad CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse If BoolOpAnd UnaryOpNot NameLoad CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Raise Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Str decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str NameLoad kwarg body Expr Str Assign NameStore BoolOpOr NameLoad ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore BinOpAdd Call NameLoad Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Print Str Print NameLoad If NameLoad body Assign NameStore Call NameLoad Str orelse Assign NameStore Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn Str NameLoad body Return Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str If CompareEq Call AttributeLoad NameLoad attr Str Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str BinOpAdd Call NameLoad Call AttributeLoad NameLoad attr Num Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr TupleLoad NameLoad NameLoad Assign NameStore Dict Str Str Str NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad If CompareEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareNotEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIn Str NameLoad body Assign NameStore BinOpAdd Call NameLoad Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad NameLoad attr NameLoad body Return AttributeLoad NameLoad attr orelse If Call AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr orelse If Call AttributeLoad NameLoad attr NameLoad body Return AttributeLoad NameLoad attr orelse Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args defaults body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad If BoolOpAnd CompareEq NameLoad AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpAnd CompareEq Call NameLoad NameLoad Num Call AttributeLoad NameLoad attr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Str decorator_list NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr ListLoad AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad ListLoad Str Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad BinOpMod Str Call NameLoad AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareLt AttributeLoad NameLoad attr Call NameLoad body Expr Call AttributeLoad NameLoad attr Return SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr TryExcept body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str Num Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad kwarg body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index Str BinOpAdd Str AttributeLoad AttributeLoad NameLoad attr attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore Num Assign NameStore Num While CompareLt NameLoad BinOpSub NameLoad Num body TryExcept body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore BinOpAdd NameLoad Num orelse Raise NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Str body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Dict Str SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Str Str SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
Module for Google Connection and Authentication classes.

Information about setting up your Google OAUTH2 credentials:

For libcloud, there are two basic methods for authenticating to Google using
OAUTH2: Service Accounts and Client IDs for Installed Applications.

Both are initially set up from the Cloud Console Console -
https://cloud.google.com/console

Setting up Service Account authentication (note that you need the PyCrypto
package installed to use this):

- Go to the Console
- Go to your project and then to "APIs & auth" on the left
- Click on "Credentials"
- Click on "Create New Client ID..."
- Select "Service account" and click on "Create Client ID"
- Download the Private Key (should happen automatically).  The key you download
  is in JSON format.
- Move the .json file to a safe location.
- Optionally, you may choose to Generate a PKCS12 key from the Console.
  It needs to be converted to the PEM format.  Please note, the PKCS12 format
  is deprecated and may be removed in a future release.
  - Convert the key using OpenSSL (the default password is 'notasecret').
  - Move the .pem file to a safe location.
- To Authenticate, you will need to pass the Service Account's "Email
  address" in as the user_id and the path to the .pem file as the key.

Setting up Installed Application authentication:

- Go to the Console
- Go to your project and then to "APIs & auth" on the left
- Click on "Credentials"
- Select "Installed application" and "Other" then click on
  "Create Client ID"
- To Authenticate, pass in the "Client ID" as the user_id and the "Client
  secret" as the key
- The first time that you do this, the libcloud will give you a URL to
  visit.  Copy and paste the URL into a browser.
- When you go to the URL it will ask you to log in (if you aren't already)
  and ask you if you want to allow the project access to your account.
- Click on Accept and you will be given a code.
- Paste that code at the prompt given to you by the Google libcloud
  connection.
- At that point, a token & refresh token will be stored in your home
  directory and will be used for authentication.

Please remember to secure your keys and access tokens.
 __future__ with_statement N/A N/A N/A simplejson json N/A N/A N/A ImportError N/A N/A json N/A base64 N/A errno N/A time N/A datetime N/A os N/A socket N/A sys libcloud.utils.connection get_response_object libcloud.utils.py3 b httplib urlencode urlparse PY3 libcloud.common.base ConnectionUserAndKey JsonResponse PollingConnection libcloud.common.types ProviderError LibcloudError N/A N/A Crypto.Hash SHA256 Crypto.PublicKey RSA Crypto.Signature PKCS1_v1_5 N/A Crypto.Random N/A N/A N/A N/A Crypto Random atfork N/A N/A N/A ImportError N/A N/A SHA256 None N/A RSA None N/A PKCS1_v1_5 None N/A UTC_TIMESTAMP_FORMAT %Y-%m-%dT%H:%M:%SZ _utcnow N/A N/A N/A N/A N/A 
    Mocked in libcloud.test.common.google.GoogleTestCase.
     N/A N/A N/A N/A datetime datetime utcnow N/A _utc_timestamp N/A N/A datetime_obj N/A N/A N/A N/A N/A datetime_obj strftime UTC_TIMESTAMP_FORMAT N/A _from_utc_timestamp N/A N/A timestamp N/A N/A N/A N/A N/A N/A datetime datetime strptime timestamp UTC_TIMESTAMP_FORMAT N/A _get_gce_metadata N/A N/A path N/A N/A N/A N/A N/A url N/A http://metadata/computeMetadata/v1/ N/A N/A path lstrip / N/A headers N/A Metadata-Flavor Google N/A response N/A get_response_object url headers headers N/A N/A N/A response status N/A response body N/A N/A N/A Exception N/A e N/A N/A N/A -1 N/A str e None N/A GoogleAuthError N/A LibcloudError N/A N/A Generic Error class for various authentication errors. __init__ N/A N/A self value N/A N/A N/A N/A self value value N/A __repr__ N/A N/A self N/A N/A N/A N/A repr N/A self value N/A N/A GoogleBaseError N/A ProviderError N/A __init__ N/A N/A self value http_code code driver N/A None N/A N/A N/A self code code N/A N/A N/A N/A super GoogleBaseError self __init__ value http_code driver N/A N/A InvalidRequestError N/A GoogleBaseError N/A N/A N/A JsonParseError N/A GoogleBaseError N/A N/A N/A ResourceNotFoundError N/A GoogleBaseError N/A __init__ N/A N/A self value http_code code driver N/A None N/A N/A N/A self code code N/A N/A N/A isinstance value dict N/A message value N/A N/A N/A N/A value N/A message count / 1 N/A N/A N/A N/A value N/A message count projects/ 1 N/A N/A N/A value N/A message N/A N/A value N/A message . A missing project error may be an authentication issue. Please  ensure your auth credentials match your project.  N/A N/A N/A N/A super ResourceNotFoundError self __init__ value http_code driver N/A N/A QuotaExceededError N/A GoogleBaseError N/A N/A N/A ResourceExistsError N/A GoogleBaseError N/A N/A N/A ResourceInUseError N/A GoogleBaseError N/A N/A N/A GoogleResponse N/A JsonResponse N/A N/A 
    Google Base Response class.
     success N/A N/A self N/A N/A N/A 
        Determine if the request was successful.

        For the Google response class, tag all responses as successful and
        raise appropriate Exceptions from parse_body.

        :return: C{True}
         N/A True N/A _get_error N/A N/A self body N/A N/A N/A 
        Get the error code and message from a JSON response.

        Return just the first error if there are multiple errors.

        :param  body: The body of the JSON response dictionary
        :type   body: ``dict``

        :return:  Tuple containing error code and message
        :rtype:   ``tuple`` of ``str`` or ``int``
         N/A N/A errors N/A body N/A error N/A N/A err N/A N/A N/A body N/A error N/A errors N/A 0 N/A N/A err N/A body N/A error N/A N/A code err N/A N/A code N/A N/A err get code N/A message N/A N/A err get message N/A N/A code N/A N/A err get reason None N/A message N/A N/A body get error_description err N/A N/A code message N/A parse_body N/A N/A self N/A N/A N/A 
        Parse the JSON response body, or raise exceptions as appropriate.

        :return:  JSON dictionary
        :rtype:   ``dict``
         N/A N/A N/A N/A len N/A self body 0 N/A N/A self parse_zero_length_body N/A N/A N/A self body N/A json_error False N/A N/A N/A body N/A N/A json loads N/A self body N/A N/A N/A N/A body N/A self body N/A json_error True N/A valid_http_codes N/A N/A httplib OK N/A httplib CREATED N/A httplib ACCEPTED N/A httplib CONFLICT N/A N/A N/A self status valid_http_codes N/A N/A json_error N/A N/A N/A JsonParseError body N/A self status None N/A N/A N/A error body N/A N/A N/A code message N/A N/A self _get_error body N/A N/A code QUOTA_EXCEEDED N/A N/A N/A QuotaExceededError message N/A self status code N/A N/A N/A code RESOURCE_ALREADY_EXISTS N/A N/A N/A ResourceExistsError message N/A self status code N/A N/A N/A code alreadyExists N/A N/A N/A ResourceExistsError message N/A self status code N/A N/A N/A N/A code startswith RESOURCE_IN_USE N/A N/A N/A ResourceInUseError message N/A self status code N/A N/A N/A GoogleBaseError message N/A self status code N/A N/A body N/A N/A N/A N/A self status N/A httplib NOT_FOUND N/A N/A N/A N/A json_error N/A error body N/A N/A N/A code message N/A N/A self _get_error body N/A N/A message body N/A code None N/A N/A ResourceNotFoundError message N/A self status code N/A N/A N/A N/A self status N/A httplib BAD_REQUEST N/A N/A N/A N/A json_error N/A error body N/A N/A N/A code message N/A N/A self _get_error body N/A N/A message body N/A code None N/A N/A InvalidRequestError message N/A self status code N/A N/A N/A N/A json_error N/A error body N/A N/A N/A code message N/A N/A self _get_error body N/A N/A message body N/A code None N/A N/A GoogleBaseError message N/A self status code N/A N/A GoogleBaseDriver N/A object N/A N/A name Google API N/A GoogleBaseAuthConnection N/A ConnectionUserAndKey N/A N/A 
    Base class for Google Authentication.  Should be subclassed for specific
    types of authentication.
     N/A driver GoogleBaseDriver N/A responseCls GoogleResponse N/A name Google Auth N/A host accounts.google.com N/A auth_path /o/oauth2/auth __init__ N/A N/A self user_id key scopes redirect_uri login_hint N/A None None urn:ietf:wg:oauth:2.0:oob None kwargs N/A N/A 
        :param  user_id: The email address (for service accounts) or Client ID
                         (for installed apps) to be used for authentication.
        :type   user_id: ``str``

        :param  key: The RSA Key (for service accounts) or file path containing
                     key or Client Secret (for installed apps) to be used for
                     authentication.
        :type   key: ``str``

        :param  scopes: A list of urls defining the scope of authentication
                       to grant.
        :type   scopes: ``list``

        :keyword  redirect_uri: The Redirect URI for the authentication
                                request.  See Google OAUTH2 documentation for
                                more info.
        :type     redirect_uri: ``str``

        :keyword  login_hint: Login hint for authentication request.  Useful
                              for Installed Application authentication.
        :type     login_hint: ``str``
         N/A scopes N/A scopes N/A N/A N/A self scopes N/A N/A join scopes N/A N/A self redirect_uri redirect_uri N/A N/A self login_hint login_hint N/A N/A N/A N/A super GoogleBaseAuthConnection self __init__ user_id key kwargs N/A add_default_headers N/A N/A self headers N/A N/A N/A N/A headers N/A Content-Type application/x-www-form-urlencoded N/A N/A headers N/A Host N/A self host N/A headers N/A _token_request N/A N/A self request_body N/A N/A N/A 
        Return an updated token from a token request body.

        :param  request_body: A dictionary of values to send in the body of the
                              token request.
        :type   request_body: ``dict``

        :return:  A dictionary with updated token information
        :rtype:   ``dict``
         N/A data N/A urlencode request_body N/A N/A N/A response N/A N/A self request /o/oauth2/token method POST data data N/A N/A N/A AttributeError N/A N/A N/A GoogleAuthError Invalid authorization response, please check your credentials and time drift. N/A token_info N/A response object N/A N/A expires_in token_info N/A N/A expire_time N/A N/A _utcnow N/A N/A datetime timedelta seconds N/A token_info N/A expires_in N/A N/A token_info N/A expire_time N/A _utc_timestamp expire_time N/A token_info N/A refresh_token N/A N/A self token_info N/A N/A N/A 
        Refresh the current token.

        Fetch an updated refresh token from internal metadata service.

        :param  token_info: Dictionary containing token information.
                            (Not used, but here for compatibility)
        :type   token_info: ``dict``

        :return:  A dictionary containing updated token information.
        :rtype:   ``dict``
         N/A N/A N/A self get_new_token N/A N/A GoogleInstalledAppAuthConnection N/A GoogleBaseAuthConnection N/A N/A Authentication connection for "Installed Application" authentication. get_code N/A N/A self N/A N/A N/A 
        Give the user a URL that they can visit to authenticate and obtain a
        code.  This method will ask for that code that the user can paste in.

        Mocked in libcloud.test.common.google.GoogleTestCase.

        :return:  Code supplied by the user after authenticating
        :rtype:   ``str``
         N/A auth_params N/A response_type client_id redirect_uri scope state code N/A self user_id N/A self redirect_uri N/A self scopes Libcloud Request N/A N/A self login_hint N/A N/A N/A auth_params N/A login_hint N/A self login_hint N/A data N/A urlencode auth_params N/A url N/A https://%s%s?%s N/A N/A self host N/A self auth_path data N/A 
Please Go to the following URL and sign in: N/A url N/A PY3 N/A N/A code N/A input Enter Code:  N/A N/A code N/A raw_input Enter Code:  N/A code N/A get_new_token N/A N/A self N/A N/A N/A 
        Get a new token. Generally used when no previous token exists or there
        is no refresh token

        :return:  Dictionary containing token information
        :rtype:   ``dict``
         N/A code N/A N/A self get_code N/A token_request N/A code client_id client_secret redirect_uri grant_type code N/A self user_id N/A self key N/A self redirect_uri authorization_code N/A N/A N/A self _token_request token_request N/A refresh_token N/A N/A self token_info N/A N/A N/A 
        Use the refresh token supplied in the token info to get a new token.

        :param  token_info: Dictionary containing current token information
        :type   token_info: ``dict``

        :return:  A dictionary containing updated token information.
        :rtype:   ``dict``
         N/A N/A refresh_token token_info N/A N/A N/A N/A self get_new_token N/A refresh_request N/A refresh_token client_id client_secret grant_type N/A token_info N/A refresh_token N/A self user_id N/A self key refresh_token N/A new_token N/A N/A self _token_request refresh_request N/A N/A refresh_token new_token N/A N/A N/A new_token N/A refresh_token N/A token_info N/A refresh_token N/A new_token N/A N/A GoogleServiceAcctAuthConnection N/A GoogleBaseAuthConnection N/A N/A Authentication class for "Service Account" authentication. __init__ N/A N/A self user_id key N/A args kwargs N/A N/A 
        Check to see if PyCrypto is available, and convert key file path into a
        key string if the key is in a file.

        :param  user_id: Email address to be used for Service Account
                authentication.
        :type   user_id: ``str``

        :param  key: The RSA Key or path to file containing the key.
        :type   key: ``str``
         N/A N/A SHA256 None N/A N/A N/A GoogleAuthError PyCrypto library required for Service Account Authentication. N/A N/A N/A N/A key find PRIVATE KEY--- -1 N/A N/A keypath N/A N/A N/A os path expanduser key N/A is_file_path N/A N/A N/A N/A os path exists keypath N/A N/A N/A os path isfile keypath N/A N/A is_file_path N/A N/A N/A ValueError N/A Missing (or not readable) key file: '%s' key N/A N/A open keypath r f N/A N/A contents N/A N/A f read N/A N/A N/A key N/A N/A json loads contents N/A key N/A key N/A private_key N/A N/A N/A ValueError N/A N/A key contents N/A N/A N/A N/A super GoogleServiceAcctAuthConnection self __init__ user_id key args kwargs N/A get_new_token N/A N/A self N/A N/A N/A 
        Get a new token using the email address and RSA Key.

        :return:  Dictionary containing token information
        :rtype:   ``dict``
         N/A header N/A alg typ RS256 JWT N/A header_enc N/A N/A base64 urlsafe_b64encode N/A b N/A N/A json dumps header N/A claim_set N/A iss scope aud exp iat N/A self user_id N/A self scopes https://accounts.google.com/o/oauth2/token N/A N/A int N/A N/A time time 3600 N/A int N/A N/A time time N/A claim_set_enc N/A N/A base64 urlsafe_b64encode N/A b N/A N/A json dumps claim_set N/A message N/A N/A . join N/A header_enc claim_set_enc N/A key N/A N/A RSA importKey N/A self key N/A hash_func N/A N/A SHA256 new message N/A signer N/A N/A PKCS1_v1_5 new key N/A signature N/A N/A base64 urlsafe_b64encode N/A N/A signer sign hash_func N/A jwt N/A N/A . join N/A message signature N/A request N/A grant_type assertion urn:ietf:params:oauth:grant-type:jwt-bearer jwt N/A N/A N/A self _token_request request N/A N/A GoogleGCEServiceAcctAuthConnection N/A GoogleBaseAuthConnection N/A N/A Authentication class for self-authentication when used with a GCE
    instance that supports serviceAccounts.
     get_new_token N/A N/A self N/A N/A N/A 
        Get a new token from the internal metadata service.

        :return:  Dictionary containing token information
        :rtype:   ``dict``
         N/A path /instance/service-accounts/default/token N/A N/A http_code http_reason token_info N/A _get_gce_metadata path N/A N/A http_code N/A httplib NOT_FOUND N/A N/A N/A ValueError Service Accounts are not enabled for this GCE instance. N/A N/A http_code N/A httplib OK N/A N/A N/A ValueError N/A Internal GCE Authorization failed: '%s' N/A str http_reason N/A token_info N/A N/A json loads token_info N/A N/A expires_in token_info N/A N/A expire_time N/A N/A _utcnow N/A N/A datetime timedelta seconds N/A token_info N/A expires_in N/A N/A token_info N/A expire_time N/A _utc_timestamp expire_time N/A token_info N/A N/A GoogleAuthType N/A object N/A N/A 
    SA (Service Account),
    IA (Installed Application),
    GCE (Auth from a GCE instance with service account enabled)
    GCS_S3 (Cloud Storage S3 interoperability authentication)
     N/A SA SA N/A IA IA N/A GCE GCE N/A GCS_S3 GCS_S3 N/A ALL_TYPES N/A SA IA GCE GCS_S3 N/A OAUTH2_TYPES N/A SA IA GCE guess_type N/A N/A cls user_id N/A N/A N/A N/A N/A cls _is_sa user_id N/A N/A N/A cls SA N/A N/A N/A N/A cls _is_gce N/A N/A N/A cls GCE N/A N/A N/A N/A cls _is_gcs_s3 user_id N/A N/A N/A cls GCS_S3 N/A N/A N/A cls IA N/A classmethod is_oauth2 N/A N/A cls auth_type N/A N/A N/A N/A auth_type N/A cls OAUTH2_TYPES N/A classmethod _is_gce N/A N/A N/A N/A N/A 
        Checks if we can access the GCE metadata server.
        Mocked in libcloud.test.common.google.GoogleTestCase.
         N/A N/A http_code http_reason body N/A _get_gce_metadata N/A N/A N/A http_code N/A httplib OK body N/A N/A True N/A False N/A staticmethod _is_gcs_s3 N/A N/A user_id N/A N/A N/A 
        Checks S3 key format: 20 alphanumeric chars starting with GOOG.
         N/A N/A N/A N/A len user_id 20 N/A N/A user_id startswith GOOG N/A staticmethod _is_sa N/A N/A user_id N/A N/A N/A N/A N/A user_id endswith .gserviceaccount.com N/A staticmethod N/A GoogleOAuth2Credential N/A object N/A N/A default_credential_file ~/.google_libcloud_auth __init__ N/A N/A self user_id key auth_type credential_file scopes N/A None None None kwargs N/A N/A N/A self auth_type N/A auth_type N/A N/A GoogleAuthType guess_type user_id N/A N/A N/A self auth_type N/A GoogleAuthType ALL_TYPES N/A N/A N/A GoogleAuthError N/A Invalid auth type: %s N/A self auth_type N/A N/A N/A N/A GoogleAuthType is_oauth2 N/A self auth_type N/A N/A N/A GoogleAuthError N/A Auth type %s cannot be used with OAuth2 N/A self auth_type N/A N/A self user_id user_id N/A N/A self key key N/A default_credential_file N/A N/A . join N/A N/A self default_credential_file user_id N/A N/A self credential_file N/A credential_file default_credential_file N/A N/A self scopes N/A scopes N/A https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/ndev.clouddns.readwrite N/A N/A self token N/A N/A self _get_token_from_file N/A N/A N/A self auth_type N/A GoogleAuthType GCE N/A N/A N/A self oauth2_conn N/A GoogleGCEServiceAcctAuthConnection N/A self user_id N/A self scopes kwargs N/A N/A N/A N/A self auth_type N/A GoogleAuthType SA N/A N/A N/A self oauth2_conn N/A GoogleServiceAcctAuthConnection N/A self user_id N/A self key N/A self scopes kwargs N/A N/A N/A N/A self auth_type N/A GoogleAuthType IA N/A N/A N/A self oauth2_conn N/A GoogleInstalledAppAuthConnection N/A self user_id N/A self key N/A self scopes kwargs N/A N/A N/A GoogleAuthError N/A Invalid auth_type: %s N/A str N/A self auth_type N/A N/A N/A self token None N/A N/A N/A self token N/A N/A N/A self oauth2_conn get_new_token N/A N/A N/A self _write_token_to_file N/A access_token N/A N/A self N/A N/A N/A N/A N/A self token_expire_utc_datetime N/A _utcnow N/A N/A N/A N/A self _refresh_token N/A N/A N/A self token N/A access_token N/A property token_expire_utc_datetime N/A N/A self N/A N/A N/A N/A _from_utc_timestamp N/A N/A self token N/A expire_time N/A property _refresh_token N/A N/A self N/A N/A N/A N/A self token N/A N/A N/A self oauth2_conn refresh_token N/A self token N/A N/A N/A self _write_token_to_file N/A _get_token_from_file N/A N/A self N/A N/A N/A 
        Read credential file and return token information.
        Mocked in libcloud.test.common.google.GoogleTestCase.

        :return:  Token information dictionary, or None
        :rtype:   ``dict`` or ``None``
         N/A token None N/A filename N/A N/A N/A os path realpath N/A N/A N/A os path expanduser N/A self credential_file N/A N/A N/A N/A open filename r f N/A N/A data N/A N/A f read N/A token N/A N/A json loads data N/A N/A N/A IOError N/A N/A N/A token N/A _write_token_to_file N/A N/A self N/A N/A N/A 
        Write token to credential file.
        Mocked in libcloud.test.common.google.GoogleTestCase.
         N/A filename N/A N/A N/A os path realpath N/A N/A N/A os path expanduser N/A self credential_file N/A data N/A N/A json dumps N/A self token N/A N/A N/A os fdopen N/A N/A os open filename N/A N/A os O_CREAT N/A os O_WRONLY N/A int 600 8 w f N/A N/A N/A N/A f write data N/A N/A GoogleBaseConnection N/A ConnectionUserAndKey PollingConnection N/A N/A Base connection class for interacting with Google APIs. N/A driver GoogleBaseDriver N/A responseCls GoogleResponse N/A host www.googleapis.com N/A poll_interval 2.0 N/A timeout 180 __init__ N/A N/A self user_id key auth_type credential_file scopes N/A None None None None kwargs N/A N/A 
        Determine authentication type, set up appropriate authentication
        connection and get initial authentication information.

        :param  user_id: The email address (for service accounts) or Client ID
                         (for installed apps) to be used for authentication.
        :type   user_id: ``str``

        :param  key: The RSA Key (for service accounts) or file path containing
                     key or Client Secret (for installed apps) to be used for
                     authentication.
        :type   key: ``str``

        :keyword  auth_type: See GoogleAuthType class for list and description
                             of accepted values.
                             If not supplied, auth_type will be guessed based
                             on value of user_id or if the code is running
                             on a GCE instance.
        :type     auth_type: ``str``

        :keyword  credential_file: Path to file for caching authentication
                                   information.
        :type     credential_file: ``str``

        :keyword  scopes: List of OAuth2 scope URLs. The empty default sets
                          read/write access to Compute, Storage, and DNS.
        :type     scopes: ``list``
         N/A N/A N/A N/A super GoogleBaseConnection self __init__ user_id key kwargs N/A N/A self oauth2_credential N/A GoogleOAuth2Credential user_id key auth_type credential_file scopes kwargs N/A python_ver N/A %s.%s.%s N/A N/A N/A sys version_info N/A 0 N/A N/A sys version_info N/A 1 N/A N/A sys version_info N/A 2 N/A ver_platform N/A Python %s/%s N/A python_ver N/A sys platform N/A N/A N/A self user_agent_append ver_platform N/A add_default_headers N/A N/A self headers N/A N/A N/A 
        @inherits: :class:`Connection.add_default_headers`
         N/A N/A headers N/A Content-Type application/json N/A N/A headers N/A Host N/A self host N/A headers N/A pre_connect_hook N/A N/A self params headers N/A N/A N/A 
        Check to make sure that token hasn't expired.  If it has, get an
        updated token.  Also, add the token to the headers.

        @inherits: :class:`Connection.pre_connect_hook`
         N/A N/A headers N/A Authorization N/A Bearer  N/A N/A self oauth2_credential access_token N/A N/A params headers N/A encode_data N/A N/A self data N/A N/A N/A Encode data to JSON N/A N/A N/A json dumps data N/A request N/A N/A self N/A args kwargs N/A N/A 
        @inherits: :class:`Connection.request`
         N/A retries 4 N/A tries 0 N/A N/A tries N/A retries 1 N/A N/A N/A N/A N/A N/A N/A super GoogleBaseConnection self request args kwargs N/A N/A N/A N/A socket error N/A N/A e N/A N/A N/A sys exc_info N/A 1 N/A N/A N/A e errno N/A errno ECONNRESET N/A N/A tries N/A tries 1 N/A N/A e N/A N/A N/A N/A super GoogleBaseConnection self request args kwargs N/A has_completed N/A N/A self response N/A N/A N/A 
        Determine if operation has completed based on response.

        :param  response: JSON response
        :type   response: I{responseCls}

        :return:  True if complete, False otherwise
        :rtype:   ``bool``
         N/A N/A N/A N/A response object N/A status DONE N/A N/A True N/A N/A False N/A get_poll_request_kwargs N/A N/A self response context request_kwargs N/A N/A N/A 
        @inherits: :class:`PollingConnection.get_poll_request_kwargs`
         N/A N/A action N/A N/A response object N/A selfLink N/A morph_action_hook N/A N/A self action N/A N/A N/A 
        Update action to correct request path.

        In many places, the Google API returns a full URL to a resource.
        This will strip the scheme and host off of the path and just return
        the request.  Otherwise, it will prepend the base request_path to
        the action.

        :param  action: The action to be called in the http request
        :type   action: ``str``

        :return:  The modified request based on the action
        :rtype:   ``str``
         N/A N/A N/A action startswith https:// N/A N/A u N/A N/A urlparse urlsplit action N/A request N/A N/A urlparse urlunsplit N/A N/A u N/A 2 N/A u N/A 3 N/A u N/A 4 N/A N/A request N/A N/A self request_path action N/A request N/A N/A