From 0f80b98b035622913de578161abe524dc4e90957 Mon Sep 17 00:00:00 2001 From: Boden R Date: Mon, 22 Aug 2016 16:46:13 -0600 Subject: [PATCH] Add docstrings for utils.host Cleaning up a little technical debt by adding docstrings for our public APIs. Note: I plan to submit a patch per file as part of this bug work. These patches won't depend on each other. The last patch of the series will close the bug. Change-Id: Ib848349ae8f7497aa9f2646e8db20c26aa4f3d8c Partial-Bug: #1614594 --- neutron_lib/utils/host.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neutron_lib/utils/host.py b/neutron_lib/utils/host.py index b6c15e4d1..a447a0b59 100644 --- a/neutron_lib/utils/host.py +++ b/neutron_lib/utils/host.py @@ -15,6 +15,11 @@ import multiprocessing def cpu_count(): + """Get the system CPU count. + + :returns: The number of CPUs on the system as an int. If there's an issue + fetching the CPU count on the system, a default value of 1 is returned. + """ try: return multiprocessing.cpu_count() except NotImplementedError: