Change way to start simulators
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test_end2end.py
index bc9b3a634b64d191901ae85816601801674af2c3..e68f798472f5fe9632cb8e67f27f35e4866474a6 100644 (file)
 
 # pylint: disable=no-member
 # pylint: disable=too-many-public-methods
-
+import base64
 import unittest
 import time
 import requests
-from common import test_utils
+import sys
+sys.path.append('transportpce_tests/common/')
+import test_utils
 
 
 class TransportPCEFulltesting(unittest.TestCase):
@@ -110,11 +112,15 @@ class TransportPCEFulltesting(unittest.TestCase):
     }
 
     WAITING = 20  # nominal value is 300
+    NODE_VERSION = '2.2.1'
 
     @classmethod
     def setUpClass(cls):
         cls.processes = test_utils.start_tpce()
-        cls.processes = test_utils.start_sims(['xpdra', 'roadma', 'roadmc', 'xpdrc'])
+        cls.processes = test_utils.start_sims([('xpdra', cls.NODE_VERSION),
+                                               ('roadma', cls.NODE_VERSION),
+                                               ('roadmc', cls.NODE_VERSION),
+                                               ('xpdrc', cls.NODE_VERSION)])
 
     @classmethod
     def tearDownClass(cls):
@@ -127,19 +133,19 @@ class TransportPCEFulltesting(unittest.TestCase):
         print("execution of {}".format(self.id().split(".")[-1]))
 
     def test_01_connect_xpdrA(self):
-        response = test_utils.mount_device("XPDR-A1", 'xpdra')
+        response = test_utils.mount_device("XPDR-A1", ('xpdra', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_02_connect_xpdrC(self):
-        response = test_utils.mount_device("XPDR-C1", 'xpdrc')
+        response = test_utils.mount_device("XPDR-C1", ('xpdrc', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_03_connect_rdmA(self):
-        response = test_utils.mount_device("ROADM-A1", 'roadma')
+        response = test_utils.mount_device("ROADM-A1", ('roadma', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_04_connect_rdmC(self):
-        response = test_utils.mount_device("ROADM-C1", 'roadmc')
+        response = test_utils.mount_device("ROADM-C1", ('roadmc', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_05_connect_xprdA_N1_to_roadmA_PP1(self):
@@ -229,44 +235,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)
 
@@ -290,34 +296,41 @@ class TransportPCEFulltesting(unittest.TestCase):
         response = test_utils.get_ordm_topo_request("node/ROADM-A1-SRG1")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertNotIn({u'index': 1},
-                         res['node'][0][u'org-openroadm-network-topology:srg-attributes']['available-wavelengths'])
+        freq_map = base64.b64decode(
+            res['node'][0]['org-openroadm-network-topology:srg-attributes']['avail-freq-maps'][0]['freq-map'])
+        freq_map_array = [int(x) for x in freq_map]
+        self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
         liste_tp = res['node'][0]['ietf-network-topology:termination-point']
         for ele in liste_tp:
             if ele['tp-id'] == 'SRG1-PP1-TXRX':
-                self.assertIn({u'index': 1, u'frequency': 196.1,
-                               u'width': 40},
-                              ele['org-openroadm-network-topology:pp-attributes']['used-wavelength'])
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
             if ele['tp-id'] == 'SRG1-PP2-TXRX':
-                self.assertNotIn('used-wavelength', dict.keys(ele))
+                self.assertNotIn('avail-freq-maps', dict.keys(ele))
         time.sleep(3)
 
     def test_17_check_topo_ROADMA_DEG1(self):
         response = test_utils.get_ordm_topo_request("node/ROADM-A1-DEG2")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertNotIn({u'index': 1},
-                         res['node'][0][u'org-openroadm-network-topology:degree-attributes']['available-wavelengths'])
+        freq_map = base64.b64decode(
+            res['node'][0]['org-openroadm-network-topology:degree-attributes']['avail-freq-maps'][0]['freq-map'])
+        freq_map_array = [int(x) for x in freq_map]
+        self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
         liste_tp = res['node'][0]['ietf-network-topology:termination-point']
         for ele in liste_tp:
             if ele['tp-id'] == 'DEG2-CTP-TXRX':
-                self.assertIn({u'index': 1, u'frequency': 196.1,
-                               u'width': 40},
-                              ele['org-openroadm-network-topology:ctp-attributes']['used-wavelengths'])
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:ctp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
             if ele['tp-id'] == 'DEG2-TTP-TXRX':
-                self.assertIn({u'index': 1, u'frequency': 196.1,
-                               u'width': 40},
-                              ele['org-openroadm-network-topology:tx-ttp-attributes']['used-wavelengths'])
+                    freq_map = base64.b64decode(
+                        ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
+                    freq_map_array = [int(x) for x in freq_map]
+                    self.assertEqual(freq_map_array[95], 0, "Index 1 should not be available")
         time.sleep(3)
 
     def test_18_connect_xprdA_N2_to_roadmA_PP2(self):
@@ -377,22 +390,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):
@@ -417,25 +430,25 @@ class TransportPCEFulltesting(unittest.TestCase):
         response = test_utils.get_ordm_topo_request("node/ROADM-A1-SRG1")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertNotIn({u'index': 1}, res['node'][0]
-                         [u'org-openroadm-network-topology:srg-attributes']['available-wavelengths'])
-        self.assertNotIn({u'index': 2}, res['node'][0]
-                         [u'org-openroadm-network-topology:srg-attributes']['available-wavelengths'])
+        freq_map = base64.b64decode(
+            res['node'][0]['org-openroadm-network-topology:srg-attributes']['avail-freq-maps'][0]['freq-map'])
+        freq_map_array = [int(x) for x in freq_map]
+        self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
+        self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available")
         liste_tp = res['node'][0]['ietf-network-topology:termination-point']
         for ele in liste_tp:
             if ele['tp-id'] == 'SRG1-PP1-TXRX':
-                self.assertIn({u'index': 1, u'frequency': 196.1,
-                               u'width': 40},
-                              ele['org-openroadm-network-topology:pp-attributes']['used-wavelength'])
-                self.assertNotIn({u'index': 2, u'frequency': 196.05,
-                                  u'width': 40},
-                                 ele['org-openroadm-network-topology:pp-attributes']['used-wavelength'])
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
+                self.assertEqual(freq_map_array[94], 255, "Lambda 2 should be available")
             if ele['tp-id'] == 'SRG1-PP2-TXRX':
-                self.assertIn({u'index': 2, u'frequency': 196.05, u'width': 40},
-                              ele['org-openroadm-network-topology:pp-attributes']['used-wavelength'])
-                self.assertNotIn({u'index': 1, u'frequency': 196.1,
-                                  u'width': 40},
-                                 ele['org-openroadm-network-topology:pp-attributes']['used-wavelength'])
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available")
+                self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available")
             if ele['tp-id'] == 'SRG1-PP3-TXRX':
                 self.assertNotIn('org-openroadm-network-topology:pp-attributes', dict.keys(ele))
         time.sleep(10)
@@ -444,24 +457,25 @@ class TransportPCEFulltesting(unittest.TestCase):
         response = test_utils.get_ordm_topo_request("node/ROADM-A1-DEG2")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertNotIn({u'index': 1}, res['node'][0]
-                         [u'org-openroadm-network-topology:degree-attributes']['available-wavelengths'])
-        self.assertNotIn({u'index': 2}, res['node'][0]
-                         [u'org-openroadm-network-topology:degree-attributes']['available-wavelengths'])
+        freq_map = base64.b64decode(
+            res['node'][0]['org-openroadm-network-topology:degree-attributes']['avail-freq-maps'][0]['freq-map'])
+        freq_map_array = [int(x) for x in freq_map]
+        self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
+        self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available")
         liste_tp = res['node'][0]['ietf-network-topology:termination-point']
         for ele in liste_tp:
             if ele['tp-id'] == 'DEG2-CTP-TXRX':
-                self.assertIn({u'index': 1, u'frequency': 196.1,
-                               u'width': 40},
-                              ele['org-openroadm-network-topology:ctp-attributes']['used-wavelengths'])
-                self.assertIn({u'index': 2, u'frequency': 196.05, u'width': 40},
-                              ele['org-openroadm-network-topology:ctp-attributes']['used-wavelengths'])
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:ctp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
+                self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available")
             if ele['tp-id'] == 'DEG2-TTP-TXRX':
-                self.assertIn({u'index': 1, u'frequency': 196.1,
-                               u'width': 40},
-                              ele['org-openroadm-network-topology:tx-ttp-attributes']['used-wavelengths'])
-                self.assertIn({u'index': 2, u'frequency': 196.05, u'width': 40},
-                              ele['org-openroadm-network-topology:tx-ttp-attributes']['used-wavelengths'])
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available")
+                self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available")
         time.sleep(10)
 
 #     creation service test on a non-available resource
@@ -527,14 +541,25 @@ class TransportPCEFulltesting(unittest.TestCase):
         response = test_utils.get_ordm_topo_request("node/ROADM-A1-SRG1")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertIn({u'index': 1}, res['node'][0]
-                      [u'org-openroadm-network-topology:srg-attributes']['available-wavelengths'])
-        self.assertIn({u'index': 2}, res['node'][0]
-                      [u'org-openroadm-network-topology:srg-attributes']['available-wavelengths'])
+        freq_map = base64.b64decode(
+            res['node'][0]['org-openroadm-network-topology:srg-attributes']['avail-freq-maps'][0]['freq-map'])
+        freq_map_array = [int(x) for x in freq_map]
+        self.assertEqual(freq_map_array[95], 255, "Index 1 should  be available")
+        self.assertEqual(freq_map_array[94], 255, "Index 2 should  be available")
         liste_tp = res['node'][0]['ietf-network-topology:termination-point']
         for ele in liste_tp:
-            if ele['tp-id'] == 'SRG1-PP1-TXRX' or ele['tp-id'] == 'SRG1-PP1-TXRX':
-                self.assertNotIn('org-openroadm-network-topology:pp-attributes', dict.keys(ele))
+            if ele['tp-id'] == 'SRG1-PP1-TXRX' or ele['tp-id'] == 'SRG1-PP2-TXRX':
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 255, "Index 1 should  be available")
+                self.assertEqual(freq_map_array[94], 255, "Index 2 should  be available")
+            elif ele['tp-id'] == 'SRG1-CP-TXRX':
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:cp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 255, "Index 1 should  be available")
+                self.assertEqual(freq_map_array[94], 255, "Index 2 should  be available")
             else:
                 self.assertNotIn('org-openroadm-network-topology:pp-attributes', dict.keys(ele))
         time.sleep(10)
@@ -543,16 +568,25 @@ class TransportPCEFulltesting(unittest.TestCase):
         response = test_utils.get_ordm_topo_request("node/ROADM-A1-DEG2")
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertIn({u'index': 1}, res['node'][0]
-                      [u'org-openroadm-network-topology:degree-attributes']['available-wavelengths'])
-        self.assertIn({u'index': 2}, res['node'][0]
-                      [u'org-openroadm-network-topology:degree-attributes']['available-wavelengths'])
+        freq_map = base64.b64decode(
+            res['node'][0]['org-openroadm-network-topology:degree-attributes']['avail-freq-maps'][0]['freq-map'])
+        freq_map_array = [int(x) for x in freq_map]
+        self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available")
+        self.assertEqual(freq_map_array[94], 255, "Lambda 2 should be available")
         liste_tp = res['node'][0]['ietf-network-topology:termination-point']
         for ele in liste_tp:
             if ele['tp-id'] == 'DEG2-CTP-TXRX':
-                self.assertNotIn('org-openroadm-network-topology:ctp-attributes', dict.keys(ele))
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:ctp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available")
+                self.assertEqual(freq_map_array[94], 255, "Lambda 2 should be available")
             if ele['tp-id'] == 'DEG2-TTP-TXRX':
-                self.assertNotIn('org-openroadm-network-topology:tx-ttp-attributes', dict.keys(ele))
+                freq_map = base64.b64decode(
+                    ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map'])
+                freq_map_array = [int(x) for x in freq_map]
+                self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available")
+                self.assertEqual(freq_map_array[94], 255, "Lambda 2 should be available")
         time.sleep(10)
 
 # test service-create for Optical Channel (OC) service from srg-pp to srg-pp
@@ -586,44 +620,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)
 
@@ -657,23 +691,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)