From 4be94a653e2bff518682f10fce2b5e2b9eeb7ed6 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Thu, 5 Mar 2020 11:41:08 +0100 Subject: 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 --- test/vcpe/csar_parser.py | 2 +- test/vcpe/preload.py | 2 +- test/vcpe/vcpe.py | 2 +- test/vcpe/vcpecommon.py | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'test/vcpe') 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): -- cgit 1.2.3-korg