keystoneauth1.fixture.v2 module

class keystoneauth1.fixture.v2.Token(token_id: str | None = None, expires: datetime | str | None = None, issued: datetime | str | None = None, tenant_id: str | None = None, tenant_name: str | None = None, user_id: str | None = None, user_name: str | None = None, trust_id: str | None = None, trustee_user_id: str | None = None, audit_id: str | None = None, audit_chain_id: str | None = None)

Bases: dict[str, Any]

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.

__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__doc__': 'A V2 Keystone token that can be used for testing.\n\n    This object is designed to allow clients to generate a correct V2 token for\n    use in there test code. It should prevent clients from having to know the\n    correct token format and allow them to test the portions of token handling\n    that matter to them and not copy and paste sample.\n    ', '__init__': <function Token.__init__>, 'root': <property object>, '_token': <property object>, 'token_id': <property object>, 'expires_str': <property object>, 'expires': <property object>, 'issued_str': <property object>, 'issued': <property object>, '_user': <property object>, 'user_id': <property object>, 'user_name': <property object>, 'tenant_id': <property object>, 'tenant_name': <property object>, '_metadata': <property object>, 'trust_id': <property object>, 'trustee_user_id': <property object>, 'audit_id': <property object>, 'audit_chain_id': <property object>, 'validate': <function Token.validate>, 'add_role': <function Token.add_role>, 'add_service': <function Token.add_service>, 'remove_service': <function Token.remove_service>, 'set_scope': <function Token.set_scope>, 'set_trust': <function Token.set_trust>, 'set_bind': <function Token.set_bind>, '__orig_bases__': (dict[str, typing.Any],), '__dict__': <attribute '__dict__' of 'Token' objects>, '__weakref__': <attribute '__weakref__' of 'Token' objects>, '__annotations__': {}})
__doc__ = 'A V2 Keystone token that can be used for testing.\n\n    This object is designed to allow clients to generate a correct V2 token for\n    use in there test code. It should prevent clients from having to know the\n    correct token format and allow them to test the portions of token handling\n    that matter to them and not copy and paste sample.\n    '
__init__(token_id: str | None = None, expires: datetime | str | None = None, issued: datetime | str | None = None, tenant_id: str | None = None, tenant_name: str | None = None, user_id: str | None = None, user_name: str | None = None, trust_id: str | None = None, trustee_user_id: str | None = None, audit_id: str | None = None, audit_chain_id: str | None = None) None
__module__ = 'keystoneauth1.fixture.v2'
__orig_bases__ = (dict[str, typing.Any],)
__weakref__

list of weak references to the object

property _metadata: V2Metadata
property _token: V2Token
property _user: V2User
add_role(name: str | None = None, id: str | None = None) dict[str, str]
add_service(type: str, name: str | None = None) _Service
property audit_chain_id: str | None
property audit_id: str | None
property expires: datetime
property expires_str: str
property issued: datetime
property issued_str: str
remove_service(type: str) None
property root: V2Access
set_bind(name: str, data: Any) None
set_scope(id: str | None = None, name: str | None = None) None
set_trust(id: str | None = None, trustee_user_id: str | None = None) None
property tenant_id: str | None
property tenant_name: str | None
property token_id: str
property trust_id: str | None
property trustee_user_id: str | None
property user_id: str
property user_name: str
validate() None
class keystoneauth1.fixture.v2.V2Access

Bases: TypedDict

__annotations__ = {'metadata': typing.NotRequired[keystoneauth1.fixture.v2.V2Metadata], 'serviceCatalog': typing.NotRequired[list[dict[str, typing.Any]]], 'token': <class 'keystoneauth1.fixture.v2.V2Token'>, 'trust': typing.NotRequired[keystoneauth1.fixture.v2.V2Trust], 'user': <class 'keystoneauth1.fixture.v2.V2User'>}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'token': <class 'keystoneauth1.fixture.v2.V2Token'>, 'user': <class 'keystoneauth1.fixture.v2.V2User'>, 'metadata': typing.NotRequired[keystoneauth1.fixture.v2.V2Metadata], 'serviceCatalog': typing.NotRequired[list[dict[str, typing.Any]]], 'trust': typing.NotRequired[keystoneauth1.fixture.v2.V2Trust]}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Access' objects>, '__weakref__': <attribute '__weakref__' of 'V2Access' objects>, '__doc__': None, '__required_keys__': frozenset({'token', 'user'}), '__optional_keys__': frozenset({'trust', 'serviceCatalog', 'metadata'}), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({'metadata', 'serviceCatalog', 'trust'})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({'token', 'user'})
__total__ = True
__weakref__

list of weak references to the object

metadata: NotRequired[V2Metadata]
serviceCatalog: NotRequired[list[dict[str, Any]]]
token: V2Token
trust: NotRequired[V2Trust]
user: V2User
class keystoneauth1.fixture.v2.V2Endpoint

Bases: TypedDict

__annotations__ = {'adminURL': <class 'str'>, 'id': <class 'str'>, 'internalURL': <class 'str'>, 'publicURL': <class 'str'>, 'region': str | None, 'tenantId': <class 'str'>}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'tenantId': <class 'str'>, 'publicURL': <class 'str'>, 'adminURL': <class 'str'>, 'internalURL': <class 'str'>, 'region': str | None, 'id': <class 'str'>}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Endpoint' objects>, '__weakref__': <attribute '__weakref__' of 'V2Endpoint' objects>, '__doc__': None, '__required_keys__': frozenset({'internalURL', 'adminURL', 'id', 'publicURL', 'region', 'tenantId'}), '__optional_keys__': frozenset(), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({'adminURL', 'id', 'internalURL', 'publicURL', 'region', 'tenantId'})
__total__ = True
__weakref__

list of weak references to the object

adminURL: str
id: str
internalURL: str
publicURL: str
region: str | None
tenantId: str
class keystoneauth1.fixture.v2.V2Metadata

Bases: TypedDict

__annotations__ = {'roles': typing.NotRequired[list[str]]}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'roles': typing.NotRequired[list[str]]}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Metadata' objects>, '__weakref__': <attribute '__weakref__' of 'V2Metadata' objects>, '__doc__': None, '__required_keys__': frozenset(), '__optional_keys__': frozenset({'roles'}), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({'roles'})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({})
__total__ = True
__weakref__

list of weak references to the object

roles: NotRequired[list[str]]
class keystoneauth1.fixture.v2.V2Role

Bases: TypedDict

__annotations__ = {'name': <class 'str'>}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'name': <class 'str'>}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Role' objects>, '__weakref__': <attribute '__weakref__' of 'V2Role' objects>, '__doc__': None, '__required_keys__': frozenset({'name'}), '__optional_keys__': frozenset(), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({'name'})
__total__ = True
__weakref__

list of weak references to the object

name: str
class keystoneauth1.fixture.v2.V2Service

Bases: TypedDict

__annotations__ = {'endpoints': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Endpoint]], 'name': <class 'str'>, 'type': <class 'str'>}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'name': <class 'str'>, 'type': <class 'str'>, 'endpoints': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Endpoint]]}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Service' objects>, '__weakref__': <attribute '__weakref__' of 'V2Service' objects>, '__doc__': None, '__required_keys__': frozenset({'type', 'name'}), '__optional_keys__': frozenset({'endpoints'}), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({'endpoints'})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({'name', 'type'})
__total__ = True
__weakref__

list of weak references to the object

endpoints: NotRequired[list[V2Endpoint]]
name: str
type: str
class keystoneauth1.fixture.v2.V2Tenant

Bases: TypedDict

__annotations__ = {'id': <class 'str'>, 'name': <class 'str'>}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'id': <class 'str'>, 'name': <class 'str'>}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Tenant' objects>, '__weakref__': <attribute '__weakref__' of 'V2Tenant' objects>, '__doc__': None, '__required_keys__': frozenset(), '__optional_keys__': frozenset({'id', 'name'}), '__total__': False})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({'id', 'name'})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({})
__total__ = False
__weakref__

list of weak references to the object

id: str
name: str
class keystoneauth1.fixture.v2.V2Token

Bases: TypedDict

__annotations__ = {'audit_ids': typing.NotRequired[list[str]], 'bind': typing.NotRequired[dict[str, typing.Any]], 'expires': <class 'str'>, 'id': <class 'str'>, 'issued_at': <class 'str'>, 'tenant': typing.NotRequired[keystoneauth1.fixture.v2.V2Tenant]}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'id': <class 'str'>, 'expires': <class 'str'>, 'issued_at': <class 'str'>, 'tenant': typing.NotRequired[keystoneauth1.fixture.v2.V2Tenant], 'audit_ids': typing.NotRequired[list[str]], 'bind': typing.NotRequired[dict[str, typing.Any]]}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Token' objects>, '__weakref__': <attribute '__weakref__' of 'V2Token' objects>, '__doc__': None, '__required_keys__': frozenset({'issued_at', 'id', 'expires'}), '__optional_keys__': frozenset({'audit_ids', 'tenant', 'bind'}), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({'audit_ids', 'bind', 'tenant'})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({'expires', 'id', 'issued_at'})
__total__ = True
__weakref__

list of weak references to the object

audit_ids: NotRequired[list[str]]
bind: NotRequired[dict[str, Any]]
expires: str
id: str
issued_at: str
tenant: NotRequired[V2Tenant]
class keystoneauth1.fixture.v2.V2TokenRoot

Bases: TypedDict

__annotations__ = {'access': <class 'keystoneauth1.fixture.v2.V2Access'>}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'access': <class 'keystoneauth1.fixture.v2.V2Access'>}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2TokenRoot' objects>, '__weakref__': <attribute '__weakref__' of 'V2TokenRoot' objects>, '__doc__': None, '__required_keys__': frozenset({'access'}), '__optional_keys__': frozenset(), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({'access'})
__total__ = True
__weakref__

list of weak references to the object

access: V2Access
class keystoneauth1.fixture.v2.V2Trust

Bases: TypedDict

__annotations__ = {'id': <class 'str'>, 'trustee_user_id': <class 'str'>}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'id': <class 'str'>, 'trustee_user_id': <class 'str'>}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Trust' objects>, '__weakref__': <attribute '__weakref__' of 'V2Trust' objects>, '__doc__': None, '__required_keys__': frozenset(), '__optional_keys__': frozenset({'id', 'trustee_user_id'}), '__total__': False})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({'id', 'trustee_user_id'})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({})
__total__ = False
__weakref__

list of weak references to the object

id: str
trustee_user_id: str
class keystoneauth1.fixture.v2.V2User

Bases: TypedDict

__annotations__ = {'id': <class 'str'>, 'name': <class 'str'>, 'roles': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Role]]}
__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__annotations__': {'id': <class 'str'>, 'name': <class 'str'>, 'roles': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Role]]}, '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2User' objects>, '__weakref__': <attribute '__weakref__' of 'V2User' objects>, '__doc__': None, '__required_keys__': frozenset({'id', 'name'}), '__optional_keys__': frozenset({'roles'}), '__total__': True})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__optional_keys__ = frozenset({'roles'})
__orig_bases__ = (<function TypedDict>,)
__required_keys__ = frozenset({'id', 'name'})
__total__ = True
__weakref__

list of weak references to the object

id: str
name: str
roles: NotRequired[list[V2Role]]
class keystoneauth1.fixture.v2._Service

Bases: dict[str, Any]

__dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', 'add_endpoint': <function _Service.add_endpoint>, '__orig_bases__': (dict[str, typing.Any],), '__dict__': <attribute '__dict__' of '_Service' objects>, '__weakref__': <attribute '__weakref__' of '_Service' objects>, '__doc__': None, '__annotations__': {}})
__doc__ = None
__module__ = 'keystoneauth1.fixture.v2'
__orig_bases__ = (dict[str, typing.Any],)
__weakref__

list of weak references to the object

add_endpoint(public: str, admin: str | None = None, internal: str | None = None, tenant_id: str | None = None, region: str | None = None, id: str | None = None) V2Endpoint