From 37dd5aeef844a7f37cfd70589670c5bacbbe1645 Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Wed, 24 Nov 2021 09:40:30 +0100 Subject: [PATCH] Fix some pylint warnings JIRA: TRNSPRTPCE-320 Signed-off-by: guillaume.lambert Change-Id: Idc241d222c0b52ce90318f1b63f6f9e0fc3b114b --- .../1.2.1/test01_portmapping.py | 3 + .../1.2.1/test02_topo_portmapping.py | 3 + .../1.2.1/test03_topology.py | 3 + .../test04_renderer_service_path_nominal.py | 3 + tests/transportpce_tests/1.2.1/test05_olm.py | 3 + .../1.2.1/test06_end2end.py | 3 + .../2.2.1/test01_portmapping.py | 3 + .../2.2.1/test02_topo_portmapping.py | 3 + .../2.2.1/test03_topology.py | 3 + .../2.2.1/test04_otn_topology.py | 3 + .../2.2.1/test05_flex_grid.py | 3 + .../test06_renderer_service_path_nominal.py | 3 + .../2.2.1/test07_otn_renderer.py | 3 + .../2.2.1/test08_otn_sh_renderer.py | 3 + tests/transportpce_tests/2.2.1/test09_olm.py | 3 + tests/transportpce_tests/2.2.1/test10_tapi.py | 3 + .../2.2.1/test11_otn_end2end.py | 7 +++ .../2.2.1/test12_end2end.py | 3 + .../2.2.1/test13_tapi_full_multi_layer.py | 5 ++ .../2.2.1/test14_otn_switch_end2end.py | 8 +++ .../7.1/test01_portmapping.py | 3 + tests/transportpce_tests/common/test_utils.py | 2 + .../common/test_utils_rfc8040.py | 2 + .../test01_device_change_notifications.py | 3 + .../hybrid/test02_B100G_end2end.py | 4 ++ tests/transportpce_tests/pce/test01_pce.py | 3 + .../transportpce_tests/pce/test02_pce_400G.py | 58 +++++++++++++------ .../with_docker/test01_gnpy.py | 3 + .../with_docker/test02_nbinotifications.py | 3 + 29 files changed, 133 insertions(+), 19 deletions(-) diff --git a/tests/transportpce_tests/1.2.1/test01_portmapping.py b/tests/transportpce_tests/1.2.1/test01_portmapping.py index 013004c37..e94852fdb 100644 --- a/tests/transportpce_tests/1.2.1/test01_portmapping.py +++ b/tests/transportpce_tests/1.2.1/test01_portmapping.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils_rfc8040 # nopep8 diff --git a/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py b/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py index 093f9a809..a2f88b5f6 100644 --- a/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py +++ b/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py @@ -17,8 +17,11 @@ import time import unittest import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils_rfc8040 # nopep8 diff --git a/tests/transportpce_tests/1.2.1/test03_topology.py b/tests/transportpce_tests/1.2.1/test03_topology.py index 34e7c3945..850867cbf 100644 --- a/tests/transportpce_tests/1.2.1/test03_topology.py +++ b/tests/transportpce_tests/1.2.1/test03_topology.py @@ -16,8 +16,11 @@ import time import unittest import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py b/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py index 37261ad56..c6390cffb 100644 --- a/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py +++ b/tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/1.2.1/test05_olm.py b/tests/transportpce_tests/1.2.1/test05_olm.py index e6f43e7fa..19473bd8b 100644 --- a/tests/transportpce_tests/1.2.1/test05_olm.py +++ b/tests/transportpce_tests/1.2.1/test05_olm.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/1.2.1/test06_end2end.py b/tests/transportpce_tests/1.2.1/test06_end2end.py index 9d9fe8c3a..f33eeccc6 100644 --- a/tests/transportpce_tests/1.2.1/test06_end2end.py +++ b/tests/transportpce_tests/1.2.1/test06_end2end.py @@ -15,8 +15,11 @@ import base64 import time import unittest import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test01_portmapping.py b/tests/transportpce_tests/2.2.1/test01_portmapping.py index a48709dbb..f5f38e0b4 100644 --- a/tests/transportpce_tests/2.2.1/test01_portmapping.py +++ b/tests/transportpce_tests/2.2.1/test01_portmapping.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils_rfc8040 # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py b/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py index a2b8bf189..6051f7e53 100644 --- a/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py +++ b/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils_rfc8040 # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test03_topology.py b/tests/transportpce_tests/2.2.1/test03_topology.py index 3ba43d79c..d61526cc5 100644 --- a/tests/transportpce_tests/2.2.1/test03_topology.py +++ b/tests/transportpce_tests/2.2.1/test03_topology.py @@ -17,8 +17,11 @@ import unittest import time import logging import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test04_otn_topology.py b/tests/transportpce_tests/2.2.1/test04_otn_topology.py index 018a92f61..5e9b3b858 100644 --- a/tests/transportpce_tests/2.2.1/test04_otn_topology.py +++ b/tests/transportpce_tests/2.2.1/test04_otn_topology.py @@ -16,8 +16,11 @@ import unittest import time import logging import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test05_flex_grid.py b/tests/transportpce_tests/2.2.1/test05_flex_grid.py index 2719a91f3..7c3dbff45 100644 --- a/tests/transportpce_tests/2.2.1/test05_flex_grid.py +++ b/tests/transportpce_tests/2.2.1/test05_flex_grid.py @@ -12,8 +12,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py b/tests/transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py index 853daed46..1abc1e31d 100644 --- a/tests/transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py +++ b/tests/transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py @@ -15,8 +15,11 @@ import unittest # from unittest.result import failfast import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test07_otn_renderer.py b/tests/transportpce_tests/2.2.1/test07_otn_renderer.py index 3139986a0..3089c7fc6 100644 --- a/tests/transportpce_tests/2.2.1/test07_otn_renderer.py +++ b/tests/transportpce_tests/2.2.1/test07_otn_renderer.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py b/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py index dbfbec5f6..18c451628 100644 --- a/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py +++ b/tests/transportpce_tests/2.2.1/test08_otn_sh_renderer.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test09_olm.py b/tests/transportpce_tests/2.2.1/test09_olm.py index 8672fcbb3..37c41670a 100644 --- a/tests/transportpce_tests/2.2.1/test09_olm.py +++ b/tests/transportpce_tests/2.2.1/test09_olm.py @@ -15,8 +15,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test10_tapi.py b/tests/transportpce_tests/2.2.1/test10_tapi.py index 9251c2acb..cbc6e857a 100644 --- a/tests/transportpce_tests/2.2.1/test10_tapi.py +++ b/tests/transportpce_tests/2.2.1/test10_tapi.py @@ -15,11 +15,14 @@ # pylint: disable=unsupported-assignment-operation import os +# pylint: disable=wrong-import-order import sys import time import unittest import requests sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test11_otn_end2end.py b/tests/transportpce_tests/2.2.1/test11_otn_end2end.py index 385887c47..5237668f1 100644 --- a/tests/transportpce_tests/2.2.1/test11_otn_end2end.py +++ b/tests/transportpce_tests/2.2.1/test11_otn_end2end.py @@ -11,13 +11,17 @@ # pylint: disable=no-member # pylint: disable=too-many-public-methods +# pylint: disable=too-many-lines import base64 import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 @@ -1047,6 +1051,7 @@ class TransportPCEtesting(unittest.TestCase): time.sleep(2) def test_66_create_OCH_OTU4_service_2(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["service-name"] = "service2-OCH-OTU4" self.cr_serv_sample_data["input"]["connection-type"] = "infrastructure" self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100" @@ -1086,6 +1091,7 @@ class TransportPCEtesting(unittest.TestCase): time.sleep(2) def test_68_create_ODU4_service_2(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["service-name"] = "service2-ODU4" self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "ODU" self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3" @@ -1125,6 +1131,7 @@ class TransportPCEtesting(unittest.TestCase): time.sleep(2) def test_70_create_1GE_service(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["service-name"] = "service1-1GE" self.cr_serv_sample_data["input"]["connection-type"] = "service" self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "1" diff --git a/tests/transportpce_tests/2.2.1/test12_end2end.py b/tests/transportpce_tests/2.2.1/test12_end2end.py index 97ee94d1b..333244a7f 100644 --- a/tests/transportpce_tests/2.2.1/test12_end2end.py +++ b/tests/transportpce_tests/2.2.1/test12_end2end.py @@ -15,8 +15,11 @@ import base64 import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py b/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py index 4901b377c..37318b08a 100644 --- a/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py +++ b/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py @@ -16,8 +16,11 @@ import os import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 @@ -293,6 +296,7 @@ class TransportPCEtesting(unittest.TestCase): # test create connectivity service from spdrA to spdrC for odu def test_17_create_connectivity_service_ODU(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["end-point"][0]["layer-protocol-name"] = "ODU" self.cr_serv_sample_data["input"]["end-point"][0]["service-interface-point"]["service-interface-point-uuid"] = "eecbfa6e-57ab-3651-9606-c22c8ce73f18" self.cr_serv_sample_data["input"]["end-point"][1]["layer-protocol-name"] = "ODU" @@ -344,6 +348,7 @@ class TransportPCEtesting(unittest.TestCase): # test create connectivity service from spdrA to spdrC for dsr def test_19_create_connectivity_service_DSR(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["end-point"][0]["layer-protocol-name"] = "DSR" self.cr_serv_sample_data["input"]["end-point"][0]["service-interface-point"]["service-interface-point-uuid"] = "c14797a0-adcc-3875-a1fe-df8949d1a2d7" self.cr_serv_sample_data["input"]["end-point"][1]["layer-protocol-name"] = "DSR" diff --git a/tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py b/tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py index 2c4f46f43..4f87063eb 100644 --- a/tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py +++ b/tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py @@ -11,13 +11,17 @@ # pylint: disable=no-member # pylint: disable=too-many-public-methods +# pylint: disable=too-many-lines import base64 import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 @@ -593,6 +597,7 @@ class TransportPCEtesting(unittest.TestCase): # test service-create for OCH-OTU4 service from spdrB to spdrC def test_35_create_OCH_OTU4_service_BC(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["service-name"] = "service-OCH-OTU4-BC" self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SB1" self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSB" @@ -823,6 +828,7 @@ class TransportPCEtesting(unittest.TestCase): # test service-create for 100GE service from spdrA to spdrC via spdrB def test_46_create_100GE_service_ABC(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["service-name"] = "service-100GE-ABC" self.cr_serv_sample_data["input"]["connection-type"] = "service" self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet" @@ -1344,6 +1350,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(response.status_code, requests.codes.created) def test_83_create_OCH_OTU4_service_AC(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["service-name"] = "service-OCH-OTU4-AC" self.cr_serv_sample_data["input"]["connection-type"] = "infrastructure" self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100" @@ -1384,6 +1391,7 @@ class TransportPCEtesting(unittest.TestCase): # test service-create for 100GE service from spdrA to spdrC via spdrB def test_85_create_100GE_service_AC(self): + # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["service-name"] = "service-100GE-AC" self.cr_serv_sample_data["input"]["connection-type"] = "service" self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet" diff --git a/tests/transportpce_tests/7.1/test01_portmapping.py b/tests/transportpce_tests/7.1/test01_portmapping.py index 7178eaec9..38971fd26 100644 --- a/tests/transportpce_tests/7.1/test01_portmapping.py +++ b/tests/transportpce_tests/7.1/test01_portmapping.py @@ -14,8 +14,11 @@ import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils_rfc8040 # nopep8 diff --git a/tests/transportpce_tests/common/test_utils.py b/tests/transportpce_tests/common/test_utils.py index d5118149b..95388ac6f 100644 --- a/tests/transportpce_tests/common/test_utils.py +++ b/tests/transportpce_tests/common/test_utils.py @@ -13,6 +13,7 @@ import json import os +# pylint: disable=wrong-import-order import sys import re import signal @@ -22,6 +23,7 @@ import time import psutil import requests +# pylint: disable=import-error import simulators SIMS = simulators.SIMS diff --git a/tests/transportpce_tests/common/test_utils_rfc8040.py b/tests/transportpce_tests/common/test_utils_rfc8040.py index 5093ebcf5..61506ed83 100644 --- a/tests/transportpce_tests/common/test_utils_rfc8040.py +++ b/tests/transportpce_tests/common/test_utils_rfc8040.py @@ -13,6 +13,7 @@ import json import os +# pylint: disable=wrong-import-order import sys import re import signal @@ -22,6 +23,7 @@ import time import psutil import requests +# pylint: disable=import-error import simulators SIMS = simulators.SIMS diff --git a/tests/transportpce_tests/hybrid/test01_device_change_notifications.py b/tests/transportpce_tests/hybrid/test01_device_change_notifications.py index d2e86838b..b34204ba5 100644 --- a/tests/transportpce_tests/hybrid/test01_device_change_notifications.py +++ b/tests/transportpce_tests/hybrid/test01_device_change_notifications.py @@ -14,8 +14,11 @@ import json import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/hybrid/test02_B100G_end2end.py b/tests/transportpce_tests/hybrid/test02_B100G_end2end.py index db0a67c1e..e1236c1fb 100644 --- a/tests/transportpce_tests/hybrid/test02_B100G_end2end.py +++ b/tests/transportpce_tests/hybrid/test02_B100G_end2end.py @@ -11,13 +11,17 @@ # pylint: disable=no-member # pylint: disable=too-many-public-methods +# pylint: disable=too-many-lines import base64 import unittest import time import requests +# pylint: disable=wrong-import-order import sys sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/pce/test01_pce.py b/tests/transportpce_tests/pce/test01_pce.py index 18f552460..7c6771b33 100644 --- a/tests/transportpce_tests/pce/test01_pce.py +++ b/tests/transportpce_tests/pce/test01_pce.py @@ -13,10 +13,13 @@ import unittest import os +# pylint: disable=wrong-import-order import sys import time import requests sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/pce/test02_pce_400G.py b/tests/transportpce_tests/pce/test02_pce_400G.py index 7be2c48c6..576ffdadb 100644 --- a/tests/transportpce_tests/pce/test02_pce_400G.py +++ b/tests/transportpce_tests/pce/test02_pce_400G.py @@ -13,10 +13,13 @@ import unittest import os +# pylint: disable=wrong-import-order import sys import time import requests sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 @@ -31,27 +34,32 @@ class TransportPCE400Gtesting(unittest.TestCase): try: sample_files_parsed = False TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "..", "..", "sample_configs", "honeynode-topo400G.json") + "..", "..", "sample_configs", + "honeynode-topo400G.json") with open(TOPO_BI_DIR_FILE, 'r') as topo_bi_dir: cls.topo_bi_dir_data = topo_bi_dir.read() OTN_TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "..", "..", "sample_configs", "honeynode-otntopo400G.json") + "..", "..", "sample_configs", + "honeynode-otntopo400G.json") with open(OTN_TOPO_BI_DIR_FILE, 'r') as otn_topo_bi_dir: cls.otn_topo_bi_dir_data = otn_topo_bi_dir.read() OTUC4_OTN_TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "..", "..", "sample_configs", "honeynode-otntopo400GwithOTUC4.json") + "..", "..", "sample_configs", + "honeynode-otntopo400GwithOTUC4.json") with open(OTUC4_OTN_TOPO_BI_DIR_FILE, 'r') as otuc4_otn_topo_bi_dir: cls.otuc4_otn_topo_bi_dir_data = otuc4_otn_topo_bi_dir.read() ODUC4_OTN_TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "..", "..", "sample_configs", "honeynode-otntopo400GwithODUC4.json") + "..", "..", "sample_configs", + "honeynode-otntopo400GwithODUC4.json") with open(ODUC4_OTN_TOPO_BI_DIR_FILE, 'r') as oduc4_otn_topo_bi_dir: cls.oduc4_otn_topo_bi_dir_data = oduc4_otn_topo_bi_dir.read() PORT_MAPPING_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "..", "..", "sample_configs", "pce_portmapping_71.json") + "..", "..", "sample_configs", + "pce_portmapping_71.json") with open(PORT_MAPPING_FILE, 'r') as port_mapping: cls.port_mapping_data = port_mapping.read() sample_files_parsed = True @@ -136,13 +144,17 @@ class TransportPCE400Gtesting(unittest.TestCase): # Path Computation success def test_05_path_computation_OTUC4_xpdr_bi(self): response = test_utils.path_computation_request("request-1", "service-OTUC4", - {"service-rate": "400", "clli": "NodeA", - "service-format": "OTU", "node-id": "XPDR-A2", - "rx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2"}} + {"service-rate": "400", + "clli": "NodeA", + "service-format": "OTU", + "node-id": "XPDR-A2", + "rx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2"}} }, - {"service-rate": "400", "clli": "NodeC", - "service-format": "OTU", "node-id": "XPDR-C2", - "rx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2"}} + {"service-rate": "400", + "clli": "NodeC", + "service-format": "OTU", + "node-id": "XPDR-C2", + "rx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2"}} }) self.assertEqual(response.status_code, requests.codes.ok) res = response.json() @@ -181,13 +193,17 @@ class TransportPCE400Gtesting(unittest.TestCase): # Path Computation success def test_07_path_computation_ODUC4_xpdr_bi(self): response = test_utils.path_computation_request("request-1", "service-ODUC4", - {"service-rate": "400", "clli": "NodeA", "service-format": "ODU", - "node-id": "XPDR-A2", - "tx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2"}} + {"service-rate": "400", + "clli": "NodeA", + "service-format": "ODU", + "node-id": "XPDR-A2", + "tx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2"}} }, - {"service-rate": "400", "clli": "NodeC", "service-format": "ODU", - "node-id": "XPDR-C2", - "tx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2"}} + {"service-rate": "400", + "clli": "NodeC", + "service-format": "ODU", + "node-id": "XPDR-C2", + "tx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2"}} }) self.assertEqual(response.status_code, requests.codes.ok) res = response.json() @@ -214,11 +230,15 @@ class TransportPCE400Gtesting(unittest.TestCase): # Path Computation success def test_09_path_computation_100G_xpdr_bi(self): response = test_utils.path_computation_request("request-1", "service-100GE", - {"service-rate": "100", "clli": "NodeA", "service-format": "Ethernet", + {"service-rate": "100", + "clli": "NodeA", + "service-format": "Ethernet", "node-id": "XPDR-A2", "tx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2", "port-name": "XPDR2-CLIENT1"}}}, - {"service-rate": "100", "clli": "NodeC", "service-format": "Ethernet", + {"service-rate": "100", + "clli": "NodeC", + "service-format": "Ethernet", "node-id": "XPDR-C2", "tx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2", "port-name": "XPDR2-CLIENT1"}}}) diff --git a/tests/transportpce_tests/with_docker/test01_gnpy.py b/tests/transportpce_tests/with_docker/test01_gnpy.py index 0fae049f6..2ca0dd0d2 100644 --- a/tests/transportpce_tests/with_docker/test01_gnpy.py +++ b/tests/transportpce_tests/with_docker/test01_gnpy.py @@ -14,10 +14,13 @@ import unittest import os +# pylint: disable=wrong-import-order import sys import time import requests sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 diff --git a/tests/transportpce_tests/with_docker/test02_nbinotifications.py b/tests/transportpce_tests/with_docker/test02_nbinotifications.py index 2c01853bf..2d7edd617 100644 --- a/tests/transportpce_tests/with_docker/test02_nbinotifications.py +++ b/tests/transportpce_tests/with_docker/test02_nbinotifications.py @@ -13,11 +13,14 @@ import os import json +# pylint: disable=wrong-import-order import sys import unittest import time import requests sys.path.append('transportpce_tests/common/') +# pylint: disable=wrong-import-position +# pylint: disable=import-error import test_utils # nopep8 -- 2.36.6