keystoneauth1.fixture.v2 模块¶
- 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)
-
一个 V2 Keystone token,可用于测试。
此对象旨在允许客户端生成正确的 V2 token,用于他们的测试代码中。它应该防止客户端需要了解正确的 token 格式,并允许他们测试 token 处理中重要的部分,而不是复制和粘贴示例。
- __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=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],)
- __weakref__
对该对象的弱引用列表
- 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
-
- __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__
对该对象的弱引用列表
- add_endpoint(public, admin=None, internal=None, tenant_id=None, region=None, id=None)