@@ -37,9 +37,11 @@ def get_systemd_status(command):
3737
3838def get_commands (command , directories = None ):
3939 """Returns the commands of a running linux system
40+
4041 Args:
4142 command (CommandProtocol): An instance of a Driver implementing the CommandProtocol
4243 directories (list): An optional list of directories to include
44+
4345 Returns:
4446 list: list of commands available under linux
4547 """
@@ -60,9 +62,11 @@ def get_commands(command, directories=None):
6062
6163def get_systemd_service_active (command , service ):
6264 """Returns True if service is active, False in all other cases
65+
6366 Args:
6467 command (CommandProtocol): An instance of a Driver implementing the CommandProtocol
6568 service (str): name of the service
69+
6670 Returns:
6771 bool: True if service is active, False otherwise
6872 """
@@ -75,9 +79,11 @@ def get_systemd_service_active(command, service):
7579def get_interface_ip (command , interface = "eth0" ):
7680 import re
7781 """Returns the global valid IPv4 address of the supplied interface
82+
7883 Args:
7984 command (CommandProtocol): An instance of a Driver implementing the CommandProtocol
8085 interface (string): name of the interface
86+
8187 Returns:
8288 str: IPv4 address of the interface, None otherwise
8389 """
@@ -108,8 +114,10 @@ def get_interface_ip(command, interface="eth0"):
108114
109115def get_hostname (command ):
110116 """Returns the hostname
117+
111118 Args:
112119 command (CommandProtocol): An instance of a Driver implementing the CommandProtocol
120+
113121 Returns:
114122 str: hostname of the target, None otherwise
115123 """
@@ -121,10 +129,12 @@ def get_hostname(command):
121129
122130def systemd_unit_properties (command , unit_properties , unit = '' ):
123131 """Yields the values of the properties of a unit
132+
124133 Args:
125134 command (CommandProtocol): An instance of a Driver implementing the CommandProtocol
126135 unit_properties (iterable): Names of the properties of interest
127136 unit (str, optional): The systemd unit of interest, defaults to empty (systemd manager itself)
137+
128138 Yields:
129139 str: Property value of the unit
130140 """
0 commit comments