diff options
author | Tibor Frank <tifrank@cisco.com> | 2016-08-24 16:09:20 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2016-09-05 14:02:48 +0200 |
commit | c3bf9f6ad20223998c1103ba3061a5e338979e2b (patch) | |
tree | eb8aca3374dc12f708d6fe9fcfd9f70eab6d1a3c /resources/libraries/python/IPv4Util.py | |
parent | 752104dfc1b8453367f0d6740f628b702c07e0b5 (diff) |
CSIT-229: ip4-lispgpe-ip4
- main fib,
- vrf,
- phy2lisp
Change-Id: Ic9bacef4574dc07b25041c4cd0653825a65c94fb
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/IPv4Util.py')
-rw-r--r-- | resources/libraries/python/IPv4Util.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/resources/libraries/python/IPv4Util.py b/resources/libraries/python/IPv4Util.py index 3043f230c2..ca5a1b571f 100644 --- a/resources/libraries/python/IPv4Util.py +++ b/resources/libraries/python/IPv4Util.py @@ -218,29 +218,3 @@ class IPv4Util(object): if rc != 0: raise RuntimeError("Arp set not successful, reason:{}". format(stderr)) - - @staticmethod - def set_linux_interface_ip(node, interface, ip, prefix, namespace=None): - """Set IP address to interface in linux. - - :param node: Node where to execute command. - :param interface: Interface in namespace. - :param ip: IP to be set on interface. - :param prefix: IP prefix. - :param namespace: Execute command in namespace. Optional - :type node: dict - :type interface: str - :type ip: str - :type prefix: int - :type namespace: str - :raises RuntimeError: IP could not be set. - """ - if namespace is not None: - cmd = 'ip netns exec {} ip addr add {}/{} dev {}'.format( - namespace, ip, prefix, interface) - else: - cmd = 'ip addr add {}/{} dev {}'.format(ip, prefix, interface) - (rc, _, stderr) = exec_cmd(node, cmd, timeout=5, sudo=True) - if rc != 0: - raise RuntimeError( - 'Could not set IP for interface, reason:{}'.format(stderr)) |