Refactor some docstrings
Change-Id: I0ed606d0b206f3bb361e602b4b8ec8f36355c54d Signed-off-by: Youngjun <yj.yoo@okestro.com>
This commit is contained in:
parent
2a196fefd4
commit
418d87b276
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
"""
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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-')
|
||||
|
|
Loading…
Reference in New Issue