Update connection and interface name
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test_end2end.py
index 859d3e92a0ee1e2643a098f4e0b1c57f88ebed48..66a75089b17c397d49c882770b612958d92fce67 100644 (file)
@@ -229,44 +229,44 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(2)
 
     def test_13_check_xc1_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-1")
+        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
         self.assertDictEqual(
             dict({
-                'connection-name': 'SRG1-PP1-TXRX-DEG2-TTP-TXRX-1',
+                'connection-name': 'SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768',
                 'opticalControlMode': 'gainLoss',
                 'target-output-power': -3.0
             }, **res['roadm-connections'][0]),
             res['roadm-connections'][0]
         )
         self.assertDictEqual(
-            {'src-if': 'SRG1-PP1-TXRX-nmc-1'},
+            {'src-if': 'SRG1-PP1-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['source'])
         self.assertDictEqual(
-            {'dst-if': 'DEG2-TTP-TXRX-nmc-1'},
+            {'dst-if': 'DEG2-TTP-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['destination'])
         time.sleep(5)
 
     def test_14_check_xc1_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-1")
+        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
         self.assertDictEqual(
             dict({
-                'connection-name': 'SRG1-PP1-TXRX-DEG1-TTP-TXRX-1',
+                'connection-name': 'SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768',
                 'opticalControlMode': 'gainLoss',
                 'target-output-power': -3.0
             }, **res['roadm-connections'][0]),
             res['roadm-connections'][0]
         )
         self.assertDictEqual(
-            {'src-if': 'SRG1-PP1-TXRX-nmc-1'},
+            {'src-if': 'SRG1-PP1-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['source'])
         self.assertDictEqual(
-            {'dst-if': 'DEG1-TTP-TXRX-nmc-1'},
+            {'dst-if': 'DEG1-TTP-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['destination'])
         time.sleep(5)
 
@@ -384,22 +384,22 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(1)
 
     def test_24_check_xc2_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP2-TXRX-2")
+        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/DEG2-TTP-TXRX-SRG1-PP2-TXRX-753:760")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
         self.assertDictEqual(
             dict({
-                'connection-name': 'DEG2-TTP-TXRX-SRG1-PP2-TXRX-2',
+                'connection-name': 'DEG2-TTP-TXRX-SRG1-PP2-TXRX-753:760',
                 'opticalControlMode': 'power'
             }, **res['roadm-connections'][0]),
             res['roadm-connections'][0]
         )
         self.assertDictEqual(
-            {'src-if': 'DEG2-TTP-TXRX-nmc-2'},
+            {'src-if': 'DEG2-TTP-TXRX-nmc-753:760'},
             res['roadm-connections'][0]['source'])
         self.assertDictEqual(
-            {'dst-if': 'SRG1-PP2-TXRX-nmc-2'},
+            {'dst-if': 'SRG1-PP2-TXRX-nmc-753:760'},
             res['roadm-connections'][0]['destination'])
 
     def test_25_check_topo_XPDRA(self):
@@ -614,44 +614,44 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(1)
 
     def test_38_check_xc1_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-1")
+        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
         self.assertDictEqual(
             dict({
-                'connection-name': 'SRG1-PP1-TXRX-DEG2-TTP-TXRX-1',
+                'connection-name': 'SRG1-PP1-TXRX-DEG2-TTP-TXRX-761:768',
                 'opticalControlMode': 'gainLoss',
                 'target-output-power': -3.0
             }, **res['roadm-connections'][0]),
             res['roadm-connections'][0]
         )
         self.assertDictEqual(
-            {'src-if': 'SRG1-PP1-TXRX-nmc-1'},
+            {'src-if': 'SRG1-PP1-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['source'])
         self.assertDictEqual(
-            {'dst-if': 'DEG2-TTP-TXRX-nmc-1'},
+            {'dst-if': 'DEG2-TTP-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['destination'])
         time.sleep(7)
 
     def test_39_check_xc1_ROADMC(self):
-        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-1")
+        response = test_utils.check_netconf_node_request("ROADM-C1", "roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
         self.assertDictEqual(
             dict({
-                'connection-name': 'SRG1-PP1-TXRX-DEG1-TTP-TXRX-1',
+                'connection-name': 'SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768',
                 'opticalControlMode': 'gainLoss',
                 'target-output-power': -3.0
             }, **res['roadm-connections'][0]),
             res['roadm-connections'][0]
         )
         self.assertDictEqual(
-            {'src-if': 'SRG1-PP1-TXRX-nmc-1'},
+            {'src-if': 'SRG1-PP1-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['source'])
         self.assertDictEqual(
-            {'dst-if': 'DEG1-TTP-TXRX-nmc-1'},
+            {'dst-if': 'DEG1-TTP-TXRX-nmc-761:768'},
             res['roadm-connections'][0]['destination'])
         time.sleep(7)
 
@@ -685,23 +685,23 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(2)
 
     def test_42_check_xc2_ROADMA(self):
-        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP2-TXRX-DEG2-TTP-TXRX-2")
+        response = test_utils.check_netconf_node_request("ROADM-A1", "roadm-connections/SRG1-PP2-TXRX-DEG2-TTP-TXRX-753:760")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2
         self.assertDictEqual(
             dict({
-                'connection-name': 'SRG1-PP2-TXRX-DEG2-TTP-TXRX-2',
+                'connection-name': 'SRG1-PP2-TXRX-DEG2-TTP-TXRX-753:760',
                 'opticalControlMode': 'gainLoss',
                 'target-output-power': -3.0
             }, **res['roadm-connections'][0]),
             res['roadm-connections'][0]
         )
         self.assertDictEqual(
-            {'src-if': 'SRG1-PP2-TXRX-nmc-2'},
+            {'src-if': 'SRG1-PP2-TXRX-nmc-753:760'},
             res['roadm-connections'][0]['source'])
         self.assertDictEqual(
-            {'dst-if': 'DEG2-TTP-TXRX-nmc-2'},
+            {'dst-if': 'DEG2-TTP-TXRX-nmc-753:760'},
             res['roadm-connections'][0]['destination'])
         time.sleep(2)