wiz.system¶
-
wiz.system.OS_MAPPING= {'el': ['centos', 'redhat']}¶ Operating System group mapping
-
wiz.system.query(platform=None, architecture=None, os_name=None, os_version=None)[source]¶ Return system mapping.
The mapping should be in the form of:
{ "platform": "linux", "arch": "x86_64", "os": { "name": "centos", "version": "7.3.161" } }
Parameters: - platform – Indicate a platform identifier which would override the platform identifier queried. Default is None.
- architecture – Indicate an architecture identifier which would override the architecture identifier queried. Default is None.
- os_name – Indicate an operating system identifier which would override the operating system identifier queried. Default is None.
- os_version – Indicate an operating system version which would override the operating system version queried. Default is None.
Returns: System mapping.
Raise: wiz.exception.IncorrectSystemif current system could not be identified or is not supported.
-
wiz.system.query_linux()[source]¶ Return Linux system mapping.
Returns: Mapping in the form of { "platform": "linux", "arch": "x86_64", "os": { "name": "centos", "version": "7.3.161" } }
-
wiz.system.query_mac()[source]¶ Return mac system mapping.
Returns: Mapping in the form of { "platform": "mac", "arch": "x86_64", "os": { "name": "mac", "version": "10.15.5" } }
-
wiz.system.query_windows()[source]¶ Return windows system mapping.
Returns: Mapping in the form of { "platform": "windows", "arch": "x86_64", "os": { "name": "windows", "version": "10.0.10240" } }
Warning
The Windows versions superior to 8 will not be recognised properly with a Python version under 2.7.11
https://hg.python.org/cpython/raw-file/53d30ab403f1/Misc/NEWS
Also a bug as been introduced in Python 2.7.11 that prevent the recognition of old Windows version
-
wiz.system.validate(definition, system_mapping)[source]¶ Validate definition against system mapping.
Parameters: - definition – Instance of
wiz.definition.Definition. - system_mapping – System mapping as returned by
query().
Returns: Boolean value.
- definition – Instance of