Common¶
Common module.
Common functions shared across modules.
- class codestream.common.VRADefaultSettings(version, insecure, url, dry_run, bearer_token, timeout)¶
Bases:
objectThe default settings for vRA.
- Parameters:
object (class) – Reusable object holding vRA default settings.
- __dict__ = mappingproxy({'__module__': 'codestream.common', '__doc__': '\n The default settings for vRA.\n\n Args:\n object (class): Reusable object holding vRA default settings.\n ', '__init__': <function VRADefaultSettings.__init__>, '__dict__': <attribute '__dict__' of 'VRADefaultSettings' objects>, '__weakref__': <attribute '__weakref__' of 'VRADefaultSettings' objects>, '__annotations__': {}})¶
- __init__(version, insecure, url, dry_run, bearer_token, timeout)¶
Define default settings for vRA.
A class defining a set of default vRA settings to pass around.
- Parameters:
dry_run (bool) – Whether to make changes or not.
url (string) – The vRA API URL.
insecure (bool) – Enable to ignore certificate verification.
bearer_token (string) – vRA access token.
- __module__ = 'codestream.common'¶
- __weakref__¶
list of weak references to the object (if defined)
- class codestream.common.VRASettings(dry_run, url, insecure, timeout)¶
Bases:
objectThe common settings for vRA.
- Parameters:
object (class) – Reusable object holding vRA common settings.
- __dict__ = mappingproxy({'__module__': 'codestream.common', '__doc__': '\n The common settings for vRA.\n\n Args:\n object (class): Reusable object holding vRA common settings.\n ', '__init__': <function VRASettings.__init__>, '__dict__': <attribute '__dict__' of 'VRASettings' objects>, '__weakref__': <attribute '__weakref__' of 'VRASettings' objects>, '__annotations__': {}})¶
- __init__(dry_run, url, insecure, timeout)¶
Define common settings for vRA.
A class defining a set of vRA settings to pass around.
- Parameters:
dry_run (bool) – Whether to make changes or not.
url (string) – The vRA API URL.
insecure (bool) – Enable to ignore certificate verification.
bearer_token (string) – vRA access token.
- __module__ = 'codestream.common'¶
- __weakref__¶
list of weak references to the object (if defined)
- codestream.common.get_version()¶
Get the version number.
Determine the version number or set a default value as a fallback.
- codestream.common.validate_url(url=<class 'str'>)¶
Validate URL.
A quick hack to ensure a url a URL is valid.
- codestream.common.whoami(option='function')¶
Who Am I.
- Inputs:
option: String can be “function” or “caller”
- Returns:
The name of the function.
- Return type:
string