Manage ODU4 services over multiple OTU4
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test08_otn_sh_renderer.py
index 44e2e8fef7b3351a1d1a5b21bf4a6bf65a73f333..87e459063bf348a1e12603979a015c23fb264e87 100644 (file)
 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 TransportPCEtesting(unittest.TestCase):
@@ -189,8 +192,8 @@ class TransportPCEtesting(unittest.TestCase):
                              res['interface'][0])
 
         self.assertDictEqual(
-            {u'frequency': 196.1, u'rate': u'org-openroadm-common-types:R100G',
-             u'transmit-power': -5, u'modulation-format': 'dp-qpsk'},
+            {'frequency': 196.1, 'rate': 'org-openroadm-common-types:R100G',
+             'transmit-power': -5, 'modulation-format': 'dp-qpsk'},
             res['interface'][0]['org-openroadm-optical-channel-interfaces:och'])
 
     def test_05_check_interface_OTU(self):
@@ -204,10 +207,10 @@ class TransportPCEtesting(unittest.TestCase):
                         'type': 'org-openroadm-interfaces:otnOtu',
                         'supporting-port': 'CP1-CFP0-P1'
                         }
-        input_dict_2 = {'tx-dapi': 'fuYZwEO660g=',
-                        'expected-sapi': 'fuYZwEO660g=',
-                        'tx-sapi': 'Swfw02qXGyI=',
-                        'expected-dapi': 'Swfw02qXGyI=',
+        input_dict_2 = {'tx-dapi': 'AMf1n5hK6Xkk',
+                        'expected-sapi': 'AMf1n5hK6Xkk',
+                        'tx-sapi': 'H/OelLynehI=',
+                        'expected-dapi': 'H/OelLynehI=',
                         'rate': 'org-openroadm-otn-common-types:OTU4',
                         'fec': 'scfec'
                         }
@@ -232,8 +235,8 @@ class TransportPCEtesting(unittest.TestCase):
                              res['interface'][0])
 
         self.assertDictEqual(
-            {u'frequency': 196.1, u'rate': u'org-openroadm-common-types:R100G',
-             u'transmit-power': -5, u'modulation-format': 'dp-qpsk'},
+            {'frequency': 196.1, 'rate': 'org-openroadm-common-types:R100G',
+             'transmit-power': -5, 'modulation-format': 'dp-qpsk'},
             res['interface'][0]['org-openroadm-optical-channel-interfaces:och'])
 
     def test_07_check_interface_OTU(self):
@@ -247,10 +250,10 @@ class TransportPCEtesting(unittest.TestCase):
                         'type': 'org-openroadm-interfaces:otnOtu',
                         'supporting-port': 'CP1-CFP0-P1'
                         }
-        input_dict_2 = {'tx-dapi': 'Swfw02qXGyI=',
-                        'expected-sapi': 'Swfw02qXGyI=',
-                        'tx-sapi': 'fuYZwEO660g=',
-                        'expected-dapi': 'fuYZwEO660g=',
+        input_dict_2 = {'tx-dapi': 'H/OelLynehI=',
+                        'expected-sapi': 'H/OelLynehI=',
+                        'tx-sapi': 'AMf1n5hK6Xkk',
+                        'expected-dapi': 'AMf1n5hK6Xkk',
                         'rate': 'org-openroadm-otn-common-types:OTU4',
                         'fec': 'scfec'
                         }
@@ -381,10 +384,10 @@ class TransportPCEtesting(unittest.TestCase):
         # SAPI/DAPI are added in the Otu4 renderer
         input_dict_2 = {'odu-function': 'org-openroadm-otn-common-types:ODU-TTP',
                         'rate': 'org-openroadm-otn-common-types:ODU4',
-                        'expected-dapi': 'Swfw02qXGyI=',
-                        'expected-sapi': 'fuYZwEO660g=',
-                        'tx-dapi': 'fuYZwEO660g=',
-                        'tx-sapi': 'Swfw02qXGyI='}
+                        'expected-dapi': 'H/OelLynehI=',
+                        'expected-sapi': 'AMf1n5hK6Xkk',
+                        'tx-dapi': 'AMf1n5hK6Xkk',
+                        'tx-sapi': 'H/OelLynehI='}
 
         self.assertDictEqual(dict(input_dict_1, **res['interface'][0]),
                              res['interface'][0])
@@ -393,7 +396,7 @@ class TransportPCEtesting(unittest.TestCase):
                              res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']
                              )
         self.assertDictEqual(
-            {u'payload-type': u'21', u'exp-payload-type': u'21'},
+            {'payload-type': '21', 'exp-payload-type': '21'},
             res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu'])
 
     def test_10_check_interface_ODU4(self):
@@ -409,10 +412,10 @@ class TransportPCEtesting(unittest.TestCase):
         # SAPI/DAPI are added in the Otu4 renderer
         input_dict_2 = {'odu-function': 'org-openroadm-otn-common-types:ODU-TTP',
                         'rate': 'org-openroadm-otn-common-types:ODU4',
-                        'tx-sapi': 'fuYZwEO660g=',
-                        'tx-dapi': 'Swfw02qXGyI=',
-                        'expected-sapi': 'Swfw02qXGyI=',
-                        'expected-dapi': 'fuYZwEO660g='
+                        'tx-sapi': 'AMf1n5hK6Xkk',
+                        'tx-dapi': 'H/OelLynehI=',
+                        'expected-sapi': 'H/OelLynehI=',
+                        'expected-dapi': 'AMf1n5hK6Xkk'
                         }
         self.assertDictEqual(dict(input_dict_1, **res['interface'][0]),
                              res['interface'][0])
@@ -421,7 +424,7 @@ class TransportPCEtesting(unittest.TestCase):
                              res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']
                              )
         self.assertDictEqual(
-            {u'payload-type': u'21', u'exp-payload-type': u'21'},
+            {'payload-type': '21', 'exp-payload-type': '21'},
             res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu'])
 
     # Test creation of 10G service
@@ -546,7 +549,7 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertDictEqual(dict(input_dict, **res['interface'][0]),
                              res['interface'][0])
         self.assertDictEqual(
-            {u'speed': 10000},
+            {'speed': 10000},
             res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet'])
 
     def test_13_check_interface_ODU2E_CLIENT(self):
@@ -570,7 +573,7 @@ class TransportPCEtesting(unittest.TestCase):
                                   **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']),
                              res['interface'][0]['org-openroadm-otn-odu-interfaces:odu'])
         self.assertDictEqual(
-            {u'payload-type': u'03', u'exp-payload-type': u'03'},
+            {'payload-type': '03', 'exp-payload-type': '03'},
             res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu'])
 
     def test_14_check_ODU2E_connection(self):
@@ -587,9 +590,9 @@ class TransportPCEtesting(unittest.TestCase):
 
         self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]),
                              res['odu-connection'][0])
-        self.assertDictEqual({u'dst-if': u'XPDR1-NETWORK1-ODU2e-SPDRA-SPDRC-10G'},
+        self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e-SPDRA-SPDRC-10G'},
                              res['odu-connection'][0]['destination'])
-        self.assertDictEqual({u'src-if': u'XPDR1-CLIENT1-ODU2e-SPDRA-SPDRC-10G'},
+        self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e-SPDRA-SPDRC-10G'},
                              res['odu-connection'][0]['source'])
 
     def test_15_check_interface_ODU2E_NETWORK(self):
@@ -670,7 +673,7 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertDictEqual(dict(input_dict, **res['interface'][0]),
                              res['interface'][0])
         self.assertDictEqual(
-            {u'speed': 10000},
+            {'speed': 10000},
             res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet'])
 
     def test_18_check_interface_ODU2E_CLIENT(self):
@@ -694,7 +697,7 @@ class TransportPCEtesting(unittest.TestCase):
                                   **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']),
                              res['interface'][0]['org-openroadm-otn-odu-interfaces:odu'])
         self.assertDictEqual(
-            {u'payload-type': u'03', u'exp-payload-type': u'03'},
+            {'payload-type': '03', 'exp-payload-type': '03'},
             res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu'])
 
     def test_19_check_ODU2E_connection(self):
@@ -711,9 +714,9 @@ class TransportPCEtesting(unittest.TestCase):
 
         self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]),
                              res['odu-connection'][0])
-        self.assertDictEqual({u'dst-if': u'XPDR1-NETWORK1-ODU2e-SPDRA-SPDRC-10G'},
+        self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e-SPDRA-SPDRC-10G'},
                              res['odu-connection'][0]['destination'])
-        self.assertDictEqual({u'src-if': u'XPDR1-CLIENT1-ODU2e-SPDRA-SPDRC-10G'},
+        self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e-SPDRA-SPDRC-10G'},
                              res['odu-connection'][0]['source'])
 
     def test_20_check_interface_ODU2E_NETWORK(self):