# 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.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 107, '__doc__': 'A V2 Keystone token that can be used for testing.\n\nThis object is designed to allow clients to generate a correct V2 token for\nuse in there test code. It should prevent clients from having to know the\ncorrect token format and allow them to test the portions of token handling\nthat 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>, '__static_attributes__': ('audit_chain_id', 'audit_id', 'expires', 'expires_str', 'issued', 'issued_str', 'tenant_id', 'tenant_name', 'token_id', 'trust_id', 'trustee_user_id', 'user_id', 'user_name'), '__orig_bases__': (dict[str, typing.Any],), '__dict__': <attribute '__dict__' of 'Token' objects>, '__weakref__': <attribute '__weakref__' of 'Token' objects>, '__annotate_func__': None, '__annotations_cache__': {}})
  __doc__ = 'A V2 Keystone token that can be used for testing.\n\nThis object is designed to allow clients to generate a correct V2 token for\nuse in there test code. It should prevent clients from having to know the\ncorrect token format and allow them to test the portions of token handling\nthat matter to them and not copy and paste sample.\n'
  __firstlineno__ = 107
  __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],)
  __static_attributes__ = ('audit_chain_id', 'audit_id', 'expires', 'expires_str', 'issued', 'issued_str', 'tenant_id', 'tenant_name', 'token_id', 'trust_id', 'trustee_user_id', 'user_id', 'user_name')
  __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_cache__ = {'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', '__firstlineno__': 71, '__static_attributes__': (), '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Access' objects>, '__weakref__': <attribute '__weakref__' of 'V2Access' objects>, '__doc__': None, '__required_keys__': frozenset({'user', 'token'}), '__optional_keys__': frozenset({'trust', 'metadata', 'serviceCatalog'}), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'metadata', 'token', 'serviceCatalog', 'trust', 'user'}), '__total__': True, '__annotations_cache__': {'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]}})
  __doc__ = None
  __firstlineno__ = 71
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'metadata', 'serviceCatalog', 'token', 'trust', 'user'})
  __optional_keys__ = frozenset({'metadata', 'serviceCatalog', 'trust'})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({'token', 'user'})
  __static_attributes__ = ()
  __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_cache__ = {'adminURL': <class 'str'>, 'id': <class 'str'>, 'internalURL': <class 'str'>, 'publicURL': <class 'str'>, 'region': str | None, 'tenantId': <class 'str'>}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 27, '__static_attributes__': (), '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Endpoint' objects>, '__weakref__': <attribute '__weakref__' of 'V2Endpoint' objects>, '__doc__': None, '__required_keys__': frozenset({'region', 'adminURL', 'publicURL', 'internalURL', 'id', 'tenantId'}), '__optional_keys__': frozenset(), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'region', 'adminURL', 'publicURL', 'internalURL', 'id', 'tenantId'}), '__total__': True, '__annotations_cache__': {'tenantId': <class 'str'>, 'publicURL': <class 'str'>, 'adminURL': <class 'str'>, 'internalURL': <class 'str'>, 'region': str | None, 'id': <class 'str'>}})
  __doc__ = None
  __firstlineno__ = 27
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'adminURL', 'id', 'internalURL', 'publicURL', 'region', 'tenantId'})
  __optional_keys__ = frozenset({})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({'adminURL', 'id', 'internalURL', 'publicURL', 'region', 'tenantId'})
  __static_attributes__ = ()
  __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_cache__ = {'roles': typing.NotRequired[list[str]]}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 67, '__static_attributes__': (), '__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'}), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'roles'}), '__total__': True, '__annotations_cache__': {'roles': typing.NotRequired[list[str]]}})
  __doc__ = None
  __firstlineno__ = 67
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'roles'})
  __optional_keys__ = frozenset({'roles'})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({})
  __static_attributes__ = ()
  __total__ = True
  __weakref__

    list of weak references to the object

  roles: NotRequired[list[str]]

class keystoneauth1.fixture.v2.V2Role

  Bases: `TypedDict`

  __annotations_cache__ = {'name': <class 'str'>}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 23, '__static_attributes__': (), '__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(), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'name'}), '__total__': True, '__annotations_cache__': {'name': <class 'str'>}})
  __doc__ = None
  __firstlineno__ = 23
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'name'})
  __optional_keys__ = frozenset({})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({'name'})
  __static_attributes__ = ()
  __total__ = True
  __weakref__

    list of weak references to the object

  name: str

class keystoneauth1.fixture.v2.V2Service

  Bases: `TypedDict`

  __annotations_cache__ = {'endpoints': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Endpoint]], 'name': <class 'str'>, 'type': <class 'str'>}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 36, '__static_attributes__': (), '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Service' objects>, '__weakref__': <attribute '__weakref__' of 'V2Service' objects>, '__doc__': None, '__required_keys__': frozenset({'name', 'type'}), '__optional_keys__': frozenset({'endpoints'}), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'endpoints', 'name', 'type'}), '__total__': True, '__annotations_cache__': {'name': <class 'str'>, 'type': <class 'str'>, 'endpoints': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Endpoint]]}})
  __doc__ = None
  __firstlineno__ = 36
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'endpoints', 'name', 'type'})
  __optional_keys__ = frozenset({'endpoints'})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({'name', 'type'})
  __static_attributes__ = ()
  __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_cache__ = {'id': <class 'str'>, 'name': <class 'str'>}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 42, '__static_attributes__': (), '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Tenant' objects>, '__weakref__': <attribute '__weakref__' of 'V2Tenant' objects>, '__doc__': None, '__required_keys__': frozenset(), '__optional_keys__': frozenset({'name', 'id'}), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'name', 'id'}), '__total__': False, '__annotations_cache__': {'id': <class 'str'>, 'name': <class 'str'>}})
  __doc__ = None
  __firstlineno__ = 42
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'id', 'name'})
  __optional_keys__ = frozenset({'id', 'name'})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({})
  __static_attributes__ = ()
  __total__ = False
  __weakref__

    list of weak references to the object

  id: str
  name: str

class keystoneauth1.fixture.v2.V2Token

  Bases: `TypedDict`

  __annotations_cache__ = {'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', '__firstlineno__': 52, '__static_attributes__': (), '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2Token' objects>, '__weakref__': <attribute '__weakref__' of 'V2Token' objects>, '__doc__': None, '__required_keys__': frozenset({'issued_at', 'expires', 'id'}), '__optional_keys__': frozenset({'tenant', 'bind', 'audit_ids'}), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'tenant', 'bind', 'id', 'issued_at', 'audit_ids', 'expires'}), '__total__': True, '__annotations_cache__': {'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]]}})
  __doc__ = None
  __firstlineno__ = 52
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'audit_ids', 'bind', 'expires', 'id', 'issued_at', 'tenant'})
  __optional_keys__ = frozenset({'audit_ids', 'bind', 'tenant'})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({'expires', 'id', 'issued_at'})
  __static_attributes__ = ()
  __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_cache__ = {'access': <class 'keystoneauth1.fixture.v2.V2Access'>}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 79, '__static_attributes__': (), '__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(), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'access'}), '__total__': True, '__annotations_cache__': {'access': <class 'keystoneauth1.fixture.v2.V2Access'>}})
  __doc__ = None
  __firstlineno__ = 79
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'access'})
  __optional_keys__ = frozenset({})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({'access'})
  __static_attributes__ = ()
  __total__ = True
  __weakref__

    list of weak references to the object

  access: V2Access

class keystoneauth1.fixture.v2.V2Trust

  Bases: `TypedDict`

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

    list of weak references to the object

  id: str
  trustee_user_id: str

class keystoneauth1.fixture.v2.V2User

  Bases: `TypedDict`

  __annotations_cache__ = {'id': <class 'str'>, 'name': <class 'str'>, 'roles': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Role]]}
  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 61, '__static_attributes__': (), '__orig_bases__': (<function TypedDict>,), '__dict__': <attribute '__dict__' of 'V2User' objects>, '__weakref__': <attribute '__weakref__' of 'V2User' objects>, '__doc__': None, '__required_keys__': frozenset({'name', 'id'}), '__optional_keys__': frozenset({'roles'}), '__readonly_keys__': frozenset(), '__mutable_keys__': frozenset({'roles', 'name', 'id'}), '__total__': True, '__annotations_cache__': {'id': <class 'str'>, 'name': <class 'str'>, 'roles': typing.NotRequired[list[keystoneauth1.fixture.v2.V2Role]]}})
  __doc__ = None
  __firstlineno__ = 61
  __module__ = 'keystoneauth1.fixture.v2'
  __mutable_keys__ = frozenset({'id', 'name', 'roles'})
  __optional_keys__ = frozenset({'roles'})
  __orig_bases__ = (<function TypedDict>,)
  __readonly_keys__ = frozenset({})
  __required_keys__ = frozenset({'id', 'name'})
  __static_attributes__ = ()
  __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', '__firstlineno__': 83, 'add_endpoint': <function _Service.add_endpoint>, '__static_attributes__': (), '__orig_bases__': (dict[str, typing.Any],), '__dict__': <attribute '__dict__' of '_Service' objects>, '__weakref__': <attribute '__weakref__' of '_Service' objects>, '__doc__': None, '__annotate_func__': None, '__annotations_cache__': {}})
  __doc__ = None
  __firstlineno__ = 83
  __module__ = 'keystoneauth1.fixture.v2'
  __orig_bases__ = (dict[str, typing.Any],)
  __static_attributes__ = ()
  __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

this page last updated: 2026-07-14 15:48:40

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug