Manage 100GE on XPDR with a list of xponder
[transportpce.git] / tests / transportpce_tests / hybrid / test01_device_change_notifications.py
index 10a309ef7242158f170af63886c4d104e79bf9cf..c489551b1be95dba2a1e7a5e963d92a4d1f12ae1 100644 (file)
@@ -14,9 +14,13 @@ import json
 import unittest
 import time
 import requests
+# pylint: disable=wrong-import-order
 import sys
 sys.path.append('transportpce_tests/common/')
-import test_utils
+# pylint: disable=wrong-import-position
+# pylint: disable=import-error
+import test_utils  # nopep8
+
 
 class TransportPCEFulltesting(unittest.TestCase):
 
@@ -38,9 +42,7 @@ class TransportPCEFulltesting(unittest.TestCase):
             "clli": "SNJSCAMCJP8",
                     "tx-direction": {
                         "port": {
-                            "port-device-name": "1/0/C1",
                             "port-type": "fixed",
-                            "port-name": "1",
                             "port-rack": "000000.00",
                             "port-shelf": "Chassis#1"
                         },
@@ -53,9 +55,7 @@ class TransportPCEFulltesting(unittest.TestCase):
                     },
             "rx-direction": {
                         "port": {
-                            "port-device-name": "1/0/C1",
                             "port-type": "fixed",
-                            "port-name": "1",
                             "port-rack": "000000.00",
                             "port-shelf": "Chassis#1"
                         },
@@ -75,9 +75,7 @@ class TransportPCEFulltesting(unittest.TestCase):
             "clli": "SNJSCAMCJT4",
                     "tx-direction": {
                         "port": {
-                            "port-device-name": "1/0/C1",
                             "port-type": "fixed",
-                            "port-name": "1",
                             "port-rack": "000000.00",
                             "port-shelf": "Chassis#1"
                         },
@@ -90,9 +88,7 @@ class TransportPCEFulltesting(unittest.TestCase):
                     },
             "rx-direction": {
                         "port": {
-                            "port-device-name": "1/0/C1",
                             "port-type": "fixed",
-                            "port-name": "1",
                             "port-rack": "000000.00",
                             "port-shelf": "Chassis#1"
                         },
@@ -132,6 +128,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(10)
 
     def setUp(self):  # instruction executed before each test method
+        # pylint: disable=consider-using-f-string
         print("execution of {}".format(self.id().split(".")[-1]))
 
     def test_01_connect_xpdrA(self):
@@ -718,8 +715,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         res = response.json()
         links = res['network'][0]['ietf-network-topology:link']
         for link in links:
-            if (link["org-openroadm-common-network:link-type"] == "XPONDER-OUTPUT" or
-                    link["org-openroadm-common-network:link-type"] == "XPONDER-INPUT"):
+            if link["org-openroadm-common-network:link-type"] in ('XPONDER-OUTPUT', 'XPONDER-INPUT'):
                 link_name = link["link-id"]
                 response = test_utils.delete_request(url+link_name)
                 self.assertEqual(response.status_code, requests.codes.ok)