keystoneclient.fixture package

Submodules

keystoneclient.fixture.exception module

exception keystoneclient.fixture.exception.FixtureValidationError

Bases: exceptions.Exception

The token you created is not legitimate.

The data contained in the token that was generated is not valid and would not have been returned from a keystone server. You should not do testing with this token.

keystoneclient.fixture.v2 module

class keystoneclient.fixture.v2.Token(token_id=None, expires=None, tenant_id=None, tenant_name=None, user_id=None, user_name=None)

Bases: dict

A V2 Keystone token that can be used for testing.

This object is designed to allow clients to generate a correct V2 token for use in there test code. It should prevent clients from having to know the correct token format and allow them to test the portions of token handling that matter to them and not copy and paste sample.

add_role(name=None, id=None)
add_service(type, name=None)
expires
expires_str
root
set_scope(id=None, name=None)
tenant_id
tenant_name
token_id
user_id
user_name
validate()

keystoneclient.fixture.v3 module

class keystoneclient.fixture.v3.Token(expires=None, user_id=None, user_name=None, user_domain_id=None, user_domain_name=None, methods=None, project_id=None, project_name=None, project_domain_id=None, project_domain_name=None, domain_id=None, domain_name=None, trust_id=None, trust_impersonation=None, trustee_user_id=None, trustor_user_id=None)

Bases: dict

A V3 Keystone token that can be used for testing.

This object is designed to allow clients to generate a correct V3 token for use in there test code. It should prevent clients from having to know the correct token format and allow them to test the portions of token handling that matter to them and not copy and paste sample.

add_role(name=None, id=None)
add_service(type, name=None)
domain_id
domain_name
expires
expires_str
methods
project_domain_id
project_domain_name
project_id
project_name
root
set_domain_scope(id=None, name=None)
set_project_scope(id=None, name=None, domain_id=None, domain_name=None)
set_trust_scope(id=None, impersonation=False, trustee_user_id=None, trustor_user_id=None)
trust_id
trust_impersonation
trustee_user_id
trustor_user_id
user_domain_id
user_domain_name
user_id
user_name
validate()

Module contents

The generators in this directory produce keystone compliant tokens for use in testing.

They should be considered part of the public API because they may be relied upon to generate test tokens for other clients. However they should never be imported into the main client (keystoneclient or other). Because of this there may be dependencies from this module on libraries that are only available in testing.

keystoneclient.fixture.V2Token

alias of Token

keystoneclient.fixture.V3Token

alias of Token

exception keystoneclient.fixture.FixtureValidationError

Bases: exceptions.Exception

The token you created is not legitimate.

The data contained in the token that was generated is not valid and would not have been returned from a keystone server. You should not do testing with this token.