# keystoneauth1.fixture.v2 module

class keystoneauth1.fixture.v2.Token(token_id=None, expires=None, issued=None, tenant_id=None, tenant_name=None, user_id=None, user_name=None, trust_id=None, trustee_user_id=None, audit_id=None, audit_chain_id=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__': 44, '__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>, '__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__ = 44
  __init__(token_id=None, expires=None, issued=None, tenant_id=None, tenant_name=None, user_id=None, user_name=None, trust_id=None, trustee_user_id=None, audit_id=None, audit_chain_id=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
  property _token
  property _user
  add_role(name=None, id=None)
  add_service(type, name=None)
  property audit_chain_id
  property audit_id
  property expires
  property expires_str
  property issued
  property issued_str
  remove_service(type)
  property root
  set_bind(name, data)
  set_scope(id=None, name=None)
  set_trust(id=None, trustee_user_id=None)
  property tenant_id
  property tenant_name
  property token_id
  property trust_id
  property trustee_user_id
  property user_id
  property user_name
  validate()

class keystoneauth1.fixture.v2._Service

  Bases: `dict`[`str`, `Any`]

  __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.v2', '__firstlineno__': 21, '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, '__annotations_cache__': {}})
  __doc__ = None
  __firstlineno__ = 21
  __module__ = 'keystoneauth1.fixture.v2'
  __orig_bases__ = (dict[str, typing.Any],)
  __static_attributes__ = ()
  __weakref__

    list of weak references to the object

  add_endpoint(public, admin=None, internal=None, tenant_id=None, region=None, id=None)

this page last updated: 2026-03-25 21:01:07

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