pytest_mh.utils.hostname
Manage the system hostname using the ‘hostname’ utility.
Classes
|
Provides a Python wrapper for the 'hostname' command. |
- class pytest_mh.utils.hostname.HostnameUtils(*args, **kwargs)
Bases:
MultihostReentrantUtility[MultihostHost]Provides a Python wrapper for the ‘hostname’ command.
This is a reentrant utility. When used as a context manager, it will automatically save the original hostname on entry and restore it on exit.
Initialize the HostnameUtils.
- Parameters:
host (MultihostHost object.) – Remote host instance.