aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-07-10 16:18:26 +0200
committerPeter Mikus <pmikus@cisco.com>2019-07-10 20:16:59 +0000
commit7b0e8a9dee0f874c4b7317e9132064dbab8fd34a (patch)
tree6363b0625c9b00a1e9eea0bd45d027353dc464f2 /resources/libraries
parent82094363f6077e1b28845719db3a6191c0c93a99 (diff)
Fix few pylint violations
+ Stop attempting to check test/ as module inits are not there. Change-Id: Ia4e498061be3e3118b07e98c9c2f761f2454653e Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/bash/entry/check/pylint.sh2
-rw-r--r--resources/libraries/python/IPUtil.py8
-rw-r--r--resources/libraries/python/IPsecUtil.py4
-rw-r--r--resources/libraries/python/TestConfig.py6
4 files changed, 9 insertions, 11 deletions
diff --git a/resources/libraries/bash/entry/check/pylint.sh b/resources/libraries/bash/entry/check/pylint.sh
index a3cad9a0d7..919e140f28 100644
--- a/resources/libraries/bash/entry/check/pylint.sh
+++ b/resources/libraries/bash/entry/check/pylint.sh
@@ -29,7 +29,7 @@ source "${BASH_FUNCTION_DIR}/common.sh" || {
echo "Source failed." >&2
exit 1
}
-pylint_args=("--rcfile=pylint.cfg" "resources/" "tests/")
+pylint_args=("--rcfile=pylint.cfg" "resources/")
if pylint "${pylint_args[@]}" > "pylint.log"; then
warn
warn "Pylint checker: PASS"
diff --git a/resources/libraries/python/IPUtil.py b/resources/libraries/python/IPUtil.py
index 17ba75d7fb..2dafebf5f6 100644
--- a/resources/libraries/python/IPUtil.py
+++ b/resources/libraries/python/IPUtil.py
@@ -161,13 +161,13 @@ class IPUtil(object):
:param node: VPP node.
:type node: dict
"""
- ip = ip_address(unicode(address))
+ addr = ip_address(unicode(address))
PapiExecutor.run_cli_cmd(
node, 'show {ip_ver} fib {addr}/{addr_len}'.format(
- ip_ver='ip6' if ip.version == 6 else 'ip',
- addr=ip,
- addr_len=ip.max_prefixlen))
+ ip_ver='ip6' if addr.version == 6 else 'ip',
+ addr=addr,
+ addr_len=addr.max_prefixlen))
@staticmethod
def get_interface_vrf_table(node, interface, ip_version='ipv4'):
diff --git a/resources/libraries/python/IPsecUtil.py b/resources/libraries/python/IPsecUtil.py
index 123043828d..1a59172958 100644
--- a/resources/libraries/python/IPsecUtil.py
+++ b/resources/libraries/python/IPsecUtil.py
@@ -705,9 +705,7 @@ class IPsecUtil(object):
remote_crypto_key=ckey,
integ=integ,
laddr=ip_address(unicode(if1_ip_addr)) + i * addr_incr,
- raddr=ip_address(unicode(if2_ip_addr)),
- uifc=Topology.get_interface_name(nodes['DUT1'],
- if1_key)))
+ raddr=ip_address(unicode(if2_ip_addr))))
tmp_f2.write(
'ipsec_tunnel_if_add_del '
'local_spi {local_spi} '
diff --git a/resources/libraries/python/TestConfig.py b/resources/libraries/python/TestConfig.py
index 1f8af5d457..a5bd5650a2 100644
--- a/resources/libraries/python/TestConfig.py
+++ b/resources/libraries/python/TestConfig.py
@@ -132,11 +132,11 @@ class TestConfig(object):
ip=src_ip,
ip_len=128 if src_ip.version == 6 else 32))
commands.append(
- 'vxlan_add_del_tunnel src {src_ip} dst {dst_ip} vni {vni}\n'
- .format(src_ip=src_ip, dst_ip=dst_ip,
+ 'vxlan_add_del_tunnel src {srcip} dst {dstip} vni {vni}\n'\
+ .format(srcip=src_ip, dstip=dst_ip,
vni=vni_start + i))
commands.append(
- 'create_vlan_subif sw_if_index {sw_idx} vlan {vlan}\n'
+ 'create_vlan_subif sw_if_index {sw_idx} vlan {vlan}\n'\
.format(sw_idx=Topology.get_interface_sw_index(
node, node_vlan_if), vlan=i + 1))
VatExecutor().write_and_execute_script(node, tmp_fn, commands)