diff options
author | 2020-03-05 11:41:08 +0100 | |
---|---|---|
committer | 2020-03-05 15:26:48 +0000 | |
commit | 4be94a653e2bff518682f10fce2b5e2b9eeb7ed6 (patch) | |
tree | bfbc245f1a30e1655df5952278b1e921a0fdd17d /test | |
parent | 3d3d3c28d88d1f7bad2b9a274fe9ad4cfaf01554 (diff) |
Supress pylint warnings for undefined variables
'cmp', 'file' and 'unicode' functions are Python 2
specific.
Change-Id: I30fa091ef157453a328ab40e4186c30e5ed1b3a1
Issue-ID: INT-1427
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/ete/scripts/probe-onap.py | 2 | ||||
-rwxr-xr-x | test/vcpe/csar_parser.py | 2 | ||||
-rwxr-xr-x | test/vcpe/preload.py | 2 | ||||
-rwxr-xr-x | test/vcpe/vcpe.py | 2 | ||||
-rwxr-xr-x | test/vcpe/vcpecommon.py | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/test/ete/scripts/probe-onap.py b/test/ete/scripts/probe-onap.py index c41b97b0a..2ab849387 100644 --- a/test/ete/scripts/probe-onap.py +++ b/test/ete/scripts/probe-onap.py @@ -189,7 +189,7 @@ class Pod(object): return self.shas_images.values() def __cmp__(self, other): - return cmp(self.name, other.name) + return cmp(self.name, other.name) # pylint: disable=E0602 def __str__(self): desc = self.name + "\n" diff --git a/test/vcpe/csar_parser.py b/test/vcpe/csar_parser.py index 7046070e5..da6fa437a 100755 --- a/test/vcpe/csar_parser.py +++ b/test/vcpe/csar_parser.py @@ -199,7 +199,7 @@ class CsarParser: self.vnf_models = [] # this version only support a single VNF in the service template self.vfmodule_models = [] # this version only support a single VF module in the service template - svc_template = yaml.load(file(filename, 'r')) + svc_template = yaml.load(file(filename, 'r')) # pylint: disable=E0602 self.get_service_model_info(svc_template) self.get_vnf_and_network_model_info(svc_template) self.get_vfmodule_model_info(svc_template) diff --git a/test/vcpe/preload.py b/test/vcpe/preload.py index 6517fe5d8..117b63ec6 100755 --- a/test/vcpe/preload.py +++ b/test/vcpe/preload.py @@ -33,7 +33,7 @@ class Preload: stk.append(v) elif type(v) is list: stk.extend(v) - elif type(v) is str or type(v) is unicode: + elif type(v) is str or type(v) is unicode: # pylint: disable=E0602 if self.vcpecommon.template_variable_symbol in v: data[k] = self.replace(v, replace_dict) else: diff --git a/test/vcpe/vcpe.py b/test/vcpe/vcpe.py index aa924bca6..f6c85ec53 100755 --- a/test/vcpe/vcpe.py +++ b/test/vcpe/vcpe.py @@ -312,7 +312,7 @@ if __name__ == '__main__': #if 'y' == raw_input('Ready to deploy infrastructure? y/n: ').lower(): deploy_infra() elif args.mode == 'customer': - if 'y' == raw_input('Ready to deploy customer service? y/n: ').lower(): + if 'y' == raw_input('Ready to deploy customer service? y/n: ').lower(): # pylint: disable=E0602 deploy_custom_service() elif args.mode == 'loop': closed_loop(22) diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py index 8eeb68e9a..8bc5ef147 100755 --- a/test/vcpe/vcpecommon.py +++ b/test/vcpe/vcpecommon.py @@ -458,10 +458,10 @@ class VcpeCommon: :param sz: a string :return: the first IP address matching the network, e.g. 10.5.12.3 """ - network = ipaddress.ip_network(unicode('{0}/{1}'.format(net_addr, net_addr_len)), strict=False) + network = ipaddress.ip_network(unicode('{0}/{1}'.format(net_addr, net_addr_len)), strict=False) # pylint: disable=E0602 ip_list = re.findall(r'[0-9]+(?:\.[0-9]+){3}', sz) for ip in ip_list: - this_net = ipaddress.ip_network(unicode('{0}/{1}'.format(ip, net_addr_len)), strict=False) + this_net = ipaddress.ip_network(unicode('{0}/{1}'.format(ip, net_addr_len)), strict=False) # pylint: disable=E0602 if this_net == network: return str(ip) return None @@ -485,7 +485,7 @@ class VcpeCommon: break if ret is None: - ret = raw_input("Enter " + self.sdnc_controller_pod + " pod cluster node OAM IP address(10.0.0.0/16): ") + ret = raw_input("Enter " + self.sdnc_controller_pod + " pod cluster node OAM IP address(10.0.0.0/16): ") # pylint: disable=E0602 return ret def get_pod_node_public_ip(self, pod): @@ -507,7 +507,7 @@ class VcpeCommon: break if ret is None: - ret = raw_input("Enter " + self.sdnc_controller_pod + " pod cluster node public IP address(i.e. " + self.external_net_addr + "): ") + ret = raw_input("Enter " + self.sdnc_controller_pod + " pod cluster node public IP address(i.e. " + self.external_net_addr + "): ") # pylint: disable=E0602 return ret def get_vm_public_ip_by_nova(self, vm): |