aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/IPv4Setup.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-01-04 06:42:13 +0000
committerPeter Mikus <pmikus@cisco.com>2018-01-04 10:15:33 +0000
commitf4e3171ec87416266291170f7c9cd089a9d2d8e4 (patch)
tree98559748d5560e67d9e133d132510f21f6444c0e /resources/libraries/python/IPv4Setup.py
parent03f1fa8fbf089b48365fff2bead6a2afb56efd89 (diff)
FIX: Pylint errors
Change-Id: I93eae6d25da6a7cb51465e622ab068f408ab4079 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/IPv4Setup.py')
-rw-r--r--resources/libraries/python/IPv4Setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/resources/libraries/python/IPv4Setup.py b/resources/libraries/python/IPv4Setup.py
index 7129e67231..36dc6050a1 100644
--- a/resources/libraries/python/IPv4Setup.py
+++ b/resources/libraries/python/IPv4Setup.py
@@ -60,17 +60,19 @@ class IPv4Node(object):
pass
@abstractmethod
- def set_route(self, network, prefix_length, gateway, interface):
+ def set_route(self, network, prefix_length, gateway, interface, count=1):
"""Configure IPv4 route.
:param network: Network IPv4 address.
:param prefix_length: IPv4 prefix length.
:param gateway: IPv4 address of the gateway.
:param interface: Interface name.
+ :param count: Number of consecutive routes to add.
:type network: str
:type prefix_length: int
:type gateway: str
:type interface: str
+ :type route: int
:returns: nothing
"""
pass
@@ -146,7 +148,7 @@ class Tg(IPv4Node):
interface)
self._sudo_execute(cmd)
- def set_route(self, network, prefix_length, gateway, interface):
+ def set_route(self, network, prefix_length, gateway, interface, count=1):
netmask = self._get_netmask(prefix_length)
cmd = 'route add -net {} netmask {} gw {}'.\
format(network, netmask, gateway)