diff options
| author | Kaifeng Wang <kaifeng.w@gmail.com> | 2019-04-09 10:24:17 +0800 |
|---|---|---|
| committer | Kaifeng Wang <kaifeng.w@gmail.com> | 2019-04-09 10:24:17 +0800 |
| commit | 4cb2ac4ae4db01efef8fd705b7ce8329475c7f92 (patch) | |
| tree | a59d7fe6515f8a48819f210cd263f29a556d5f22 /ironic_python_agent | |
| parent | 45d6a228f4a19c08410e369055e639fe3f1b7824 (diff) | |
| download | ironic-python-agent-4cb2ac4ae4db01efef8fd705b7ce8329475c7f92.tar.gz | |
Fix docs job failure due to malformated docstring
Change-Id: Ic3532e51481fd07e2f816aeacb07ded2d56791ee
Diffstat (limited to 'ironic_python_agent')
| -rw-r--r-- | ironic_python_agent/hardware.py | 8 | ||||
| -rw-r--r-- | ironic_python_agent/numa_inspector.py | 69 | ||||
| -rw-r--r-- | ironic_python_agent/utils.py | 5 |
3 files changed, 45 insertions, 37 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py index ca312fdb..e615ca3b 100644 --- a/ironic_python_agent/hardware.py +++ b/ironic_python_agent/hardware.py @@ -1215,8 +1215,8 @@ def dispatch_to_all_managers(method, *args, **kwargs): {HardwareManagerClassName: response}. :param method: hardware manager method to dispatch - :param *args: arguments to dispatched method - :param **kwargs: keyword arguments to dispatched method + :param args: arguments to dispatched method + :param kwargs: keyword arguments to dispatched method :raises errors.HardwareManagerMethodNotFound: if all managers raise IncompatibleHardwareMethodError. :returns: a dictionary with keys for each hardware manager that returns @@ -1259,8 +1259,8 @@ def dispatch_to_managers(method, *args, **kwargs): any result without raising an IncompatibleHardwareMethodError. :param method: hardware manager method to dispatch - :param *args: arguments to dispatched method - :param **kwargs: keyword arguments to dispatched method + :param args: arguments to dispatched method + :param kwargs: keyword arguments to dispatched method :returns: result of successful dispatch of method :raises HardwareManagerMethodNotFound: if all managers failed the method diff --git a/ironic_python_agent/numa_inspector.py b/ironic_python_agent/numa_inspector.py index f952ba30..61e9028d 100644 --- a/ironic_python_agent/numa_inspector.py +++ b/ironic_python_agent/numa_inspector.py @@ -49,7 +49,9 @@ def get_numa_node_id(numa_node_dir): def get_nodes_memory_info(numa_node_dirs): """Collect the NUMA nodes memory information. - "ram": [{"numa_node": <numa_node_id>, "size_kb": <memory_in_kb>}, ...] + The information is returned in the form of:: + + "ram": [{"numa_node": <numa_node_id>, "size_kb": <memory_in_kb>}, ...] :param numa_node_dirs: A list of NUMA node directories :raises: IncompatibleNumaFormatError: when unexpected format data @@ -96,13 +98,6 @@ def get_nodes_memory_info(numa_node_dirs): def get_nodes_cores_info(numa_node_dirs): """Collect the NUMA nodes cpu's and thread's information. - "cpus": [ - { - "cpu": <cpu_id>, "numa_node": <numa_node_id>, - "thread_siblings": [<list of sibling threads>] - }, - ..., - ] NUMA nodes path: /sys/devices/system/node/node<node_id> Thread dirs path: /sys/devices/system/node/node<node_id>/cpu<thread_id> @@ -110,6 +105,16 @@ def get_nodes_cores_info(numa_node_dirs): CPU id file path: /sys/devices/system/node/node<node_id>/cpu<thread_id>/ topology/core_id + The information is returned in the form of:: + + "cpus": [ + { + "cpu": <cpu_id>, "numa_node": <numa_node_id>, + "thread_siblings": [<list of sibling threads>] + }, + ..., + ] + :param numa_node_dirs: A list of NUMA node directories :raises: IncompatibleNumaFormatError: when unexpected format data in NUMA node @@ -167,10 +172,13 @@ def get_nodes_cores_info(numa_node_dirs): def get_nodes_nics_info(nic_device_path): """Collect the NUMA nodes nics information. - "nics": [ - {"name": "<network interface name>", "numa_node": <numa_node_id>}, - ..., - ] + The information is returned in the form of:: + + "nics": [ + {"name": "<network interface name>", + "numa_node": <numa_node_id>}, + ..., + ] :param nic_device_path: nic device directory path :raises: IncompatibleNumaFormatError: when unexpected format data @@ -207,25 +215,26 @@ def get_nodes_nics_info(nic_device_path): def collect_numa_topology_info(data, failures): """Collect the NUMA topology information. - { - "numa_topology": { - "ram": [{"numa_node": <numa_node_id>, "size_kb": <memory_in_kb>}, ...], - "cpus": [ - { - "cpu": <cpu_id>, "numa_node": <numa_node_id>, - "thread_siblings": [<list of sibling threads>] - }, - ..., - ], - "nics": [ - {"name": "<network interface name>", "numa_node": <numa_node_id>}, - ..., - ] - } - } - The data is gathered from /sys/devices/system/node/node<X> and - /sys/class/net/ directories. + /sys/class/net/ directories. The information is collected in the form of:: + + { + "numa_topology": { + "ram": [{"numa_node": <numa_node_id>, "size_kb": <memory_in_kb>}, + ...], + "cpus": [ + { + "cpu": <cpu_id>, "numa_node": <numa_node_id>, + "thread_siblings": [<list of sibling threads>] + }, + ..., + ], + "nics": [ + {"name": "<network interface name>", "numa_node": <numa_node_id>}, + ..., + ] + } + } :param data: mutable data that we'll send to inspector :param failures: AccumulatedFailures object diff --git a/ironic_python_agent/utils.py b/ironic_python_agent/utils.py index 4621ff8d..0fa744a7 100644 --- a/ironic_python_agent/utils.py +++ b/ironic_python_agent/utils.py @@ -76,9 +76,8 @@ def try_execute(*cmd, **kwargs): Instead of raising an exception on failure, this method simply returns None in case of failure. - :param *cmd: positional arguments to pass to processutils.execute() - :param log_stdout: keyword-only argument: whether to log the output - :param **kwargs: keyword arguments to pass to processutils.execute() + :param cmd: positional arguments to pass to processutils.execute() + :param kwargs: keyword arguments to pass to processutils.execute() :raises: UnknownArgumentError on receiving unknown arguments :returns: tuple of (stdout, stderr) or None in some error cases """ |
