diff options
author | selias <samelias@cisco.com> | 2016-09-30 14:04:06 +0200 |
---|---|---|
committer | selias <samelias@cisco.com> | 2016-10-04 10:05:53 +0200 |
commit | a912d105f3a1d8fed0b4cf6b18e0ef7789be81bf (patch) | |
tree | 72fbbaa05aec1c7e3b903eff45624800a8c1d607 /resources/libraries/python/Routing.py | |
parent | edd554cdb32b124136f49cb17f711ecda0f0176c (diff) |
Fix pylint warnings in python libraries
- no functional changes
- fixes 80+ PEP-8 violations
Change-Id: Icf414778ec40d5cb44364fa69a876f9a1870c3c7
Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/python/Routing.py')
-rw-r--r-- | resources/libraries/python/Routing.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/resources/libraries/python/Routing.py b/resources/libraries/python/Routing.py index fbe7b60183..ff675f39a9 100644 --- a/resources/libraries/python/Routing.py +++ b/resources/libraries/python/Routing.py @@ -17,10 +17,12 @@ from resources.libraries.python.VatExecutor import VatTerminal from resources.libraries.python.topology import Topology from resources.libraries.python.ssh import exec_cmd_no_error + class Routing(object): """Routing utilities.""" + # pylint: disable=too-many-arguments @staticmethod def vpp_route_add(node, network, prefix_len, gateway=None, interface=None, use_sw_index=True, resolve_attempts=10, @@ -101,23 +103,23 @@ class Routing(object): where=place) @staticmethod - def add_route(node, ip, prefix, gw, namespace=None): + def add_route(node, ip_addr, prefix, gateway, namespace=None): """Add route in namespace. :param node: Node where to execute command. - :param ip: Route destination IP. + :param ip_addr: Route destination IP address. :param prefix: IP prefix. - :param namespace: Execute command in namespace. Optional - :param gw: Gateway. + :param namespace: Execute command in namespace. Optional. + :param gateway: Gateway address. :type node: dict - :type ip: str + :type ip_addr: str :type prefix: int - :type gw: str + :type gateway: str :type namespace: str """ if namespace is not None: cmd = 'ip netns exec {} ip route add {}/{} via {}'.format( - namespace, ip, prefix, gw) + namespace, ip_addr, prefix, gateway) else: - cmd = 'ip route add {}/{} via {}'.format(ip, prefix, gw) + cmd = 'ip route add {}/{} via {}'.format(ip_addr, prefix, gateway) exec_cmd_no_error(node, cmd, sudo=True) |