Fix docs job failure due to malformated docstring

Change-Id: Ic3532e51481fd07e2f816aeacb07ded2d56791ee
This commit is contained in:
Kaifeng Wang 2019-04-09 10:24:17 +08:00
parent 45d6a228f4
commit 4cb2ac4ae4
3 changed files with 45 additions and 37 deletions

View File

@ -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

View File

@ -49,6 +49,8 @@ def get_numa_node_id(numa_node_dir):
def get_nodes_memory_info(numa_node_dirs):
"""Collect the NUMA nodes memory information.
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
@ -96,6 +98,15 @@ 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.
NUMA nodes path: /sys/devices/system/node/node<node_id>
Thread dirs path: /sys/devices/system/node/node<node_id>/cpu<thread_id>
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>,
@ -103,12 +114,6 @@ def get_nodes_cores_info(numa_node_dirs):
},
...,
]
NUMA nodes path: /sys/devices/system/node/node<node_id>
Thread dirs path: /sys/devices/system/node/node<node_id>/cpu<thread_id>
CPU id file path: /sys/devices/system/node/node<node_id>/cpu<thread_id>/
topology/core_id
:param numa_node_dirs: A list of NUMA node directories
:raises: IncompatibleNumaFormatError: when unexpected format data
@ -167,8 +172,11 @@ def get_nodes_cores_info(numa_node_dirs):
def get_nodes_nics_info(nic_device_path):
"""Collect the NUMA nodes nics information.
The information is returned in the form of::
"nics": [
{"name": "<network interface name>", "numa_node": <numa_node_id>},
{"name": "<network interface name>",
"numa_node": <numa_node_id>},
...,
]
@ -207,9 +215,13 @@ def get_nodes_nics_info(nic_device_path):
def collect_numa_topology_info(data, failures):
"""Collect the NUMA topology information.
The data is gathered from /sys/devices/system/node/node<X> and
/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>}, ...],
"ram": [{"numa_node": <numa_node_id>, "size_kb": <memory_in_kb>},
...],
"cpus": [
{
"cpu": <cpu_id>, "numa_node": <numa_node_id>,
@ -224,9 +236,6 @@ def collect_numa_topology_info(data, failures):
}
}
The data is gathered from /sys/devices/system/node/node<X> and
/sys/class/net/ directories.
:param data: mutable data that we'll send to inspector
:param failures: AccumulatedFailures object

View File

@ -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
"""