aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/SFC
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-07-21 15:17:51 +0200
committerPeter Mikus <pmikus@cisco.com>2017-07-26 04:34:06 +0000
commitc70b9cd6c48d71208cf729ba335ff9753e94b694 (patch)
tree45ad5d254ebb0b8c3f4f3e8da3004a1d53eede41 /resources/libraries/python/SFC
parent601629148310349732f76259df0fc5b5e26ea9f7 (diff)
Fix pylint errors
Change-Id: I9b8d69978ee35bf7610cdfd372135ce3515eec96 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/SFC')
-rw-r--r--resources/libraries/python/SFC/SFCTest.py9
-rw-r--r--resources/libraries/python/SFC/VerifyPacket.py8
2 files changed, 8 insertions, 9 deletions
diff --git a/resources/libraries/python/SFC/SFCTest.py b/resources/libraries/python/SFC/SFCTest.py
index ec08efd17c..2584632af9 100644
--- a/resources/libraries/python/SFC/SFCTest.py
+++ b/resources/libraries/python/SFC/SFCTest.py
@@ -20,11 +20,12 @@ from resources.libraries.python.ssh import SSH
from resources.libraries.python.constants import Constants as con
from resources.libraries.python.topology import Topology
+
class SFCTest(object):
"""Configure and Start the NSH SFC functional tests."""
@staticmethod
- def config_and_start_SFC_test(dut_node, dut_if1, dut_if2, if1_adj_mac,
+ def config_and_start_sfc_test(dut_node, dut_if1, dut_if2, if1_adj_mac,
if2_adj_mac, testtype):
"""
Start the SFC functional on the dut_node.
@@ -61,9 +62,9 @@ class SFCTest(object):
else:
exec_shell = "set_sfc_sff.sh"
- cmd = 'cd {0}/tests/nsh_sfc/sfc_scripts/ && sudo ./{1} {2} ' \
- '{3} {4} {5}'.format(con.REMOTE_FW_DIR, exec_shell, vpp_intf_name1,
- vpp_intf_name2, if1_adj_mac, if2_adj_mac)
+ cmd = 'cd {0}/tests/nsh_sfc/sfc_scripts/ && sudo ./{1} {2} {3} {4} ' \
+ '{5}'.format(con.REMOTE_FW_DIR, exec_shell, vpp_intf_name1,
+ vpp_intf_name2, if1_adj_mac, if2_adj_mac)
(ret_code, _, _) = ssh.exec_command(cmd, timeout=600)
if ret_code != 0:
diff --git a/resources/libraries/python/SFC/VerifyPacket.py b/resources/libraries/python/SFC/VerifyPacket.py
index fd72bb296b..189301002c 100644
--- a/resources/libraries/python/SFC/VerifyPacket.py
+++ b/resources/libraries/python/SFC/VerifyPacket.py
@@ -20,11 +20,9 @@ import ipaddress
from scapy.layers.inet import IP, UDP
from scapy.all import Raw
-from resources.libraries.python.constants import Constants as con
from resources.libraries.python.SFC.SFCConstants import SFCConstants as sfccon
from resources.libraries.python.SFC.TunnelProtocol import VxLAN, VxLANGPE, NSH
-from robot.api import logger
def valid_ipv4(ipaddr):
"""Check if IP address has the correct IPv4 address format.
@@ -185,9 +183,9 @@ class VerifyPacket(object):
recv_pkt_len = len(ether)
if recv_pkt_len != expect_pkt_len:
- raise RuntimeError("Received packet size {0} not " \
- "the expect size {1}".format(recv_pkt_len, \
- expect_pkt_len))
+ raise RuntimeError("Received packet size {0} not "
+ "the expect size {1}".format(recv_pkt_len,
+ expect_pkt_len))
if not ether.haslayer(IP):
raise RuntimeError("Not a IPv4 packet")