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):
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):
'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'
}
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):
'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'
}
# 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])
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):
# 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])
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
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):
**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):
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):
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):
**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):
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):