Merge "Refactor some docstrings"

This commit is contained in:
Zuul 2024-03-30 06:55:36 +00:00 committed by Gerrit Code Review
commit a017624a85
5 changed files with 6 additions and 7 deletions

View File

@ -288,7 +288,7 @@ def create_icmp_flows(flow_template, rule):
def _flow_priority_offset_from_conj_id(conj_id):
"Return a flow priority offset encoded in a conj_id."
"""Return a flow priority offset encoded in a conj_id."""
# A base conj_id, which is returned by ConjIdMap.get_conj_id, is a
# multiple of 8, and we use 2 conj_ids per offset.
return conj_id % 8 // 2

View File

@ -136,7 +136,6 @@ def _calc_min_rate(burst):
rate (bytes/sec) accepted by Pyroute2. This method is based on
pyroute2.netlink.rtnl.tcmsg.common.calc_xmittime
:param rate: (int) rate in bytes per second.
:param burst: (int) burst in bytes.
:return: (int) minimum accepted rate in bytes per second.
"""

View File

@ -106,7 +106,7 @@ class PluginReportStateAPI(object):
class PluginApi(object):
'''Agent side of the rpc API.
"""Agent side of the rpc API.
API version history:
1.0 - Initial version.
@ -127,7 +127,7 @@ class PluginApi(object):
- update_device_up
- update_device_list (indirectly, called from update_device_down
and update_device_up)
'''
"""
def __init__(self, topic):
target = oslo_messaging.Target(topic=topic, version='1.9')

View File

@ -45,7 +45,7 @@ _NOVA_CONNECTION = None
def register_custom_supported_check(alias, f, plugin_agnostic=False):
'''Register a custom function to determine if extension is supported.
"""Register a custom function to determine if extension is supported.
Consequent calls for the same alias replace the registered function.
@ -54,7 +54,7 @@ def register_custom_supported_check(alias, f, plugin_agnostic=False):
:param plugin_agnostic: if False, don't require a plugin to claim support
with supported_extension_aliases. If True, a plugin must claim the
extension is supported.
'''
"""
EXTENSION_SUPPORTED_CHECK_MAP[alias] = f
if plugin_agnostic:

View File

@ -161,7 +161,7 @@ def ofctl_arg_supported(cmd, **kwargs):
"""Verify if ovs-ofctl binary supports cmd with **kwargs.
:param cmd: ovs-ofctl command to use for test.
:param **kwargs: arguments to test with the command.
:param kwargs: arguments to test with the command.
:returns: a boolean if the supplied arguments are supported.
"""
br_name = common_utils.get_rand_device_name(prefix='br-test-')