opsicommon.system package¶
Subpackages¶
Submodules¶
opsicommon.system.info module¶
system.info
- opsicommon.system.info.is_deb_based()¶
- Return type:
bool
- opsicommon.system.info.is_linux()¶
- Return type:
bool
- opsicommon.system.info.is_macos()¶
- Return type:
bool
- opsicommon.system.info.is_pacman_based()¶
- Return type:
bool
- opsicommon.system.info.is_rpm_based()¶
- Return type:
bool
- opsicommon.system.info.is_unix()¶
- Return type:
bool
- opsicommon.system.info.is_windows()¶
- Return type:
bool
- opsicommon.system.info.linux_distro_id()¶
- Return type:
str
- opsicommon.system.info.linux_distro_id_like()¶
- Return type:
set
[str
]
- opsicommon.system.info.linux_distro_id_like_contains(search)¶
Returns true if any string in ID_LIKE contains one of the search strings passed in search.
- Parameters:
search (
Union
[str
,Iterable
[str
]]) –- Return type:
bool
- opsicommon.system.info.linux_distro_version()¶
- Return type:
str
- opsicommon.system.info.linux_distro_version_id()¶
- Return type:
str
opsicommon.system.network module¶
system.network
- opsicommon.system.network.get_domain()¶
- Return type:
str
- opsicommon.system.network.get_fqdn()¶
- Return type:
str
- opsicommon.system.network.get_hostnames()¶
- Return type:
Set
[str
]
- opsicommon.system.network.get_ip_addresses()¶
- Return type:
Generator
[Dict
[str
,Any
],None
,None
]
Module contents¶
system
- class opsicommon.system.Session(id, type, username, terminal, login_pid, started)¶
Bases:
tuple
- id¶
Alias for field number 0
- login_pid¶
Alias for field number 4
- started¶
Alias for field number 5
- terminal¶
Alias for field number 3
- type¶
Alias for field number 1
- username¶
Alias for field number 2
- opsicommon.system.ensure_not_already_running(process_name=None)¶
- Parameters:
process_name (
Optional
[str
]) –- Return type:
None