keystoneauth1.fixture.discovery module¶
- class keystoneauth1.fixture.discovery.DiscoveryBase(id, status=None, updated=None)¶
Bases:
dict
[str
,Any
]The basic version discovery structure.
All version discovery elements should have access to these values.
- Parameters:
id (string) – The version id for this version entry.
status (string) – The status of this entry.
updated (DateTime) – When the API was last updated.
- __annotations__ = {}¶
- __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.discovery', '__firstlineno__': 22, '__doc__': 'The basic version discovery structure.\n\nAll version discovery elements should have access to these values.\n\n:param string id: The version id for this version entry.\n:param string status: The status of this entry.\n:param DateTime updated: When the API was last updated.\n', '__init__': <function DiscoveryBase.__init__>, 'id': <property object>, 'status': <property object>, 'links': <property object>, 'updated_str': <property object>, 'updated': <property object>, 'add_link': <function DiscoveryBase.add_link>, 'media_types': <property object>, 'add_media_type': <function DiscoveryBase.add_media_type>, '__static_attributes__': ('id', 'status', 'updated', 'updated_str'), '__orig_bases__': (dict[str, typing.Any],), '__dict__': <attribute '__dict__' of 'DiscoveryBase' objects>, '__weakref__': <attribute '__weakref__' of 'DiscoveryBase' objects>, '__annotations__': {}})¶
- __doc__ = 'The basic version discovery structure.\n\nAll version discovery elements should have access to these values.\n\n:param string id: The version id for this version entry.\n:param string status: The status of this entry.\n:param DateTime updated: When the API was last updated.\n'¶
- __firstlineno__ = 22¶
- __init__(id, status=None, updated=None)¶
- __module__ = 'keystoneauth1.fixture.discovery'¶
- __orig_bases__ = (dict[str, typing.Any],)¶
- __static_attributes__ = ('id', 'status', 'updated', 'updated_str')¶
- __weakref__¶
list of weak references to the object
- add_link(href, rel='self', type=None)¶
- add_media_type(base, type)¶
- property id¶
- property links¶
- property media_types¶
- property status¶
- property updated¶
- property updated_str¶
- class keystoneauth1.fixture.discovery.DiscoveryList(href=None, v2=True, v3=True, v2_id=None, v3_id=None, v2_status=None, v2_updated=None, v2_html=True, v2_pdf=True, v3_status=None, v3_updated=None, v3_json=True, v3_xml=True)¶
Bases:
dict
[str
,Any
]A List of version elements.
Creates a correctly structured list of identity service endpoints for use in testing with discovery.
- Parameters:
href (string) – The url that this should be based at.
v2 (bool) – Add a v2 element.
v3 (bool) – Add a v3 element.
v2_status (string) – The status to use for the v2 element.
v2_updated (DateTime) – The update time to use for the v2 element.
v2_html (bool) – True to add a html link to the v2 element.
v2_pdf (bool) – True to add a pdf link to the v2 element.
v3_status (string) – The status to use for the v3 element.
v3_updated (DateTime) – The update time to use for the v3 element.
v3_json (bool) – True to add a html link to the v2 element.
v3_xml (bool) – True to add a pdf link to the v2 element.
- TEST_URL = 'http://keystone.host:5000/'¶
- __annotations__ = {}¶
- __dict__ = mappingproxy({'__module__': 'keystoneauth1.fixture.discovery', '__firstlineno__': 286, '__doc__': 'A List of version elements.\n\nCreates a correctly structured list of identity service endpoints for\nuse in testing with discovery.\n\n:param string href: The url that this should be based at.\n:param bool v2: Add a v2 element.\n:param bool v3: Add a v3 element.\n:param string v2_status: The status to use for the v2 element.\n:param DateTime v2_updated: The update time to use for the v2 element.\n:param bool v2_html: True to add a html link to the v2 element.\n:param bool v2_pdf: True to add a pdf link to the v2 element.\n:param string v3_status: The status to use for the v3 element.\n:param DateTime v3_updated: The update time to use for the v3 element.\n:param bool v3_json: True to add a html link to the v2 element.\n:param bool v3_xml: True to add a pdf link to the v2 element.\n', 'TEST_URL': 'http://keystone.host:5000/', '__init__': <function DiscoveryList.__init__>, 'versions': <property object>, 'add_version': <function DiscoveryList.add_version>, 'add_v2': <function DiscoveryList.add_v2>, 'add_v3': <function DiscoveryList.add_v3>, 'add_microversion': <function DiscoveryList.add_microversion>, 'add_nova_microversion': <function DiscoveryList.add_nova_microversion>, '__static_attributes__': (), '__orig_bases__': (dict[str, typing.Any],), '__dict__': <attribute '__dict__' of 'DiscoveryList' objects>, '__weakref__': <attribute '__weakref__' of 'DiscoveryList' objects>, '__annotations__': {}})¶
- __doc__ = 'A List of version elements.\n\nCreates a correctly structured list of identity service endpoints for\nuse in testing with discovery.\n\n:param string href: The url that this should be based at.\n:param bool v2: Add a v2 element.\n:param bool v3: Add a v3 element.\n:param string v2_status: The status to use for the v2 element.\n:param DateTime v2_updated: The update time to use for the v2 element.\n:param bool v2_html: True to add a html link to the v2 element.\n:param bool v2_pdf: True to add a pdf link to the v2 element.\n:param string v3_status: The status to use for the v3 element.\n:param DateTime v3_updated: The update time to use for the v3 element.\n:param bool v3_json: True to add a html link to the v2 element.\n:param bool v3_xml: True to add a pdf link to the v2 element.\n'¶
- __firstlineno__ = 286¶
- __init__(href=None, v2=True, v3=True, v2_id=None, v3_id=None, v2_status=None, v2_updated=None, v2_html=True, v2_pdf=True, v3_status=None, v3_updated=None, v3_json=True, v3_xml=True)¶
- __module__ = 'keystoneauth1.fixture.discovery'¶
- __orig_bases__ = (dict[str, typing.Any],)¶
- __static_attributes__ = ()¶
- __weakref__¶
list of weak references to the object
- add_microversion(href, id, **kwargs)¶
Add a microversion version to the list.
The parameters are the same as MicroversionDiscovery.
- add_nova_microversion(href, id, **kwargs)¶
Add a nova microversion version to the list.
The parameters are the same as NovaMicroversionDiscovery.
- add_v2(href, **kwargs)¶
Add a v2 version to the list.
The parameters are the same as V2Discovery.
- add_v3(href, **kwargs)¶
Add a v3 version to the list.
The parameters are the same as V3Discovery.
- add_version(version)¶
Add a new version structure to the list.
- Parameters:
version (dict) – A new version structure to add to the list.
- property versions¶
- class keystoneauth1.fixture.discovery.MicroversionDiscovery(href, id, min_version='', max_version='', **kwargs)¶
Bases:
DiscoveryBase
A Version element that has microversions.
Provides some default values and helper methods for creating a microversion endpoint version structure. Clients should use this instead of creating their own structures.
- Parameters:
href (string) – The url that this entry should point to.
id (string) – The version id that should be reported.
min_version (string) – The minimum supported microversion. (optional)
max_version (string) – The maximum supported microversion. (optional)
- __annotations__ = {}¶
- __doc__ = 'A Version element that has microversions.\n\nProvides some default values and helper methods for creating a microversion\nendpoint version structure. Clients should use this instead of creating\ntheir own structures.\n\n:param string href: The url that this entry should point to.\n:param string id: The version id that should be reported.\n:param string min_version: The minimum supported microversion. (optional)\n:param string max_version: The maximum supported microversion. (optional)\n'¶
- __firstlineno__ = 109¶
- __init__(href, id, min_version='', max_version='', **kwargs)¶
- __module__ = 'keystoneauth1.fixture.discovery'¶
- __static_attributes__ = ('max_version', 'min_version')¶
- property max_version¶
- property min_version¶
- class keystoneauth1.fixture.discovery.NovaMicroversionDiscovery(href, id, min_version=None, version=None, **kwargs)¶
Bases:
DiscoveryBase
A Version element with nova-style microversions.
Provides some default values and helper methods for creating a microversion endpoint version structure. Clients should use this instead of creating their own structures.
- Parameters:
href – The url that this entry should point to.
id (string) – The version id that should be reported.
min_version (string) – The minimum microversion supported. (optional)
version (string) – The maximum microversion supported. (optional)
- __annotations__ = {}¶
- __doc__ = 'A Version element with nova-style microversions.\n\nProvides some default values and helper methods for creating a microversion\nendpoint version structure. Clients should use this instead of creating\ntheir own structures.\n\n:param href: The url that this entry should point to.\n:param string id: The version id that should be reported.\n:param string min_version: The minimum microversion supported. (optional)\n:param string version: The maximum microversion supported. (optional)\n'¶
- __firstlineno__ = 147¶
- __init__(href, id, min_version=None, version=None, **kwargs)¶
- __module__ = 'keystoneauth1.fixture.discovery'¶
- __static_attributes__ = ('min_version', 'version')¶
- property min_version¶
- property version¶
- class keystoneauth1.fixture.discovery.V2Discovery(href, id=None, html=True, pdf=True, **kwargs)¶
Bases:
DiscoveryBase
A Version element for a V2 identity service endpoint.
Provides some default values and helper methods for creating a v2.0 endpoint version structure. Clients should use this instead of creating their own structures.
- Parameters:
href (string) – The url that this entry should point to.
id (string) – The version id that should be reported. (optional) Defaults to ‘v2.0’.
html (bool) – Add HTML describedby links to the structure.
pdf (bool) – Add PDF describedby links to the structure.
- _DESC_URL = 'https://developer.openstack.org/api-ref/identity/v2/'¶
- __annotations__ = {}¶
- __doc__ = "A Version element for a V2 identity service endpoint.\n\nProvides some default values and helper methods for creating a v2.0\nendpoint version structure. Clients should use this instead of creating\ntheir own structures.\n\n:param string href: The url that this entry should point to.\n:param string id: The version id that should be reported. (optional)\n Defaults to 'v2.0'.\n:param bool html: Add HTML describedby links to the structure.\n:param bool pdf: Add PDF describedby links to the structure.\n\n"¶
- __firstlineno__ = 187¶
- __init__(href, id=None, html=True, pdf=True, **kwargs)¶
- __module__ = 'keystoneauth1.fixture.discovery'¶
- __static_attributes__ = ()¶
- add_html_description()¶
Add the HTML described by links.
The standard structure includes a link to a HTML document with the API specification. Add it to this entry.
- add_pdf_description()¶
Add the PDF described by links.
The standard structure includes a link to a PDF document with the API specification. Add it to this entry.
- class keystoneauth1.fixture.discovery.V3Discovery(href, id=None, json=True, xml=True, **kwargs)¶
Bases:
DiscoveryBase
A Version element for a V3 identity service endpoint.
Provides some default values and helper methods for creating a v3 endpoint version structure. Clients should use this instead of creating their own structures.
- Parameters:
href – The url that this entry should point to.
id (string) – The version id that should be reported. (optional) Defaults to ‘v3.0’.
json (bool) – Add JSON media-type elements to the structure.
xml (bool) – Add XML media-type elements to the structure.
- __annotations__ = {}¶
- __doc__ = "A Version element for a V3 identity service endpoint.\n\nProvides some default values and helper methods for creating a v3\nendpoint version structure. Clients should use this instead of creating\ntheir own structures.\n\n:param href: The url that this entry should point to.\n:param string id: The version id that should be reported. (optional)\n Defaults to 'v3.0'.\n:param bool json: Add JSON media-type elements to the structure.\n:param bool xml: Add XML media-type elements to the structure.\n"¶
- __firstlineno__ = 239¶
- __init__(href, id=None, json=True, xml=True, **kwargs)¶
- __module__ = 'keystoneauth1.fixture.discovery'¶
- __static_attributes__ = ()¶
- add_json_media_type()¶
Add the JSON media-type links.
The standard structure includes a list of media-types that the endpoint supports. Add JSON to the list.
- add_xml_media_type()¶
Add the XML media-type links.
The standard structure includes a list of media-types that the endpoint supports. Add XML to the list.
- class keystoneauth1.fixture.discovery.VersionDiscovery(href, id, **kwargs)¶
Bases:
DiscoveryBase
A Version element for non-keystone services without microversions.
Provides some default values and helper methods for creating a microversion endpoint version structure. Clients should use this instead of creating their own structures.
- Parameters:
href (string) – The url that this entry should point to.
id (string) – The version id that should be reported.
- __annotations__ = {}¶
- __doc__ = 'A Version element for non-keystone services without microversions.\n\nProvides some default values and helper methods for creating a microversion\nendpoint version structure. Clients should use this instead of creating\ntheir own structures.\n\n:param string href: The url that this entry should point to.\n:param string id: The version id that should be reported.\n'¶
- __firstlineno__ = 92¶
- __init__(href, id, **kwargs)¶
- __module__ = 'keystoneauth1.fixture.discovery'¶
- __static_attributes__ = ()¶