diff --git a/neutron/agent/linux/openvswitch_firewall/rules.py b/neutron/agent/linux/openvswitch_firewall/rules.py index a6f2e1773dc..a195832ac26 100644 --- a/neutron/agent/linux/openvswitch_firewall/rules.py +++ b/neutron/agent/linux/openvswitch_firewall/rules.py @@ -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 diff --git a/neutron/agent/linux/tc_lib.py b/neutron/agent/linux/tc_lib.py index 3719f0709ef..5844a24ac8d 100644 --- a/neutron/agent/linux/tc_lib.py +++ b/neutron/agent/linux/tc_lib.py @@ -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. """ diff --git a/neutron/agent/rpc.py b/neutron/agent/rpc.py index 1bb9733e233..28bb07559e2 100644 --- a/neutron/agent/rpc.py +++ b/neutron/agent/rpc.py @@ -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') diff --git a/neutron/api/extensions.py b/neutron/api/extensions.py index 2154486d589..37706d12cfa 100644 --- a/neutron/api/extensions.py +++ b/neutron/api/extensions.py @@ -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: diff --git a/neutron/cmd/sanity/checks.py b/neutron/cmd/sanity/checks.py index ad56987eca5..c19610be333 100644 --- a/neutron/cmd/sanity/checks.py +++ b/neutron/cmd/sanity/checks.py @@ -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-')