# pylint: disable=too-many-public-methods
import unittest
-#from unittest.result import failfast
+# from unittest.result import failfast
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 TransportPCERendererTesting(unittest.TestCase):
'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network',
'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1',
- 'lcp-hash-val': 'AMkDwQ7xTmRI',
+ 'lcp-hash-val': 'AMkDwQ7xTmRI', 'xponder-type': 'tpdr',
'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
self.assertIn(
'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
- 'lcp-hash-val': 'AJUUr6I5fALj',
+ 'lcp-hash-val': 'AJUUr6I5fALj', 'xponder-type': 'tpdr',
'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
res['interface'][0]
)
self.assertDictEqual(
- {u'frequency': 195.8, u'width': 40},
+ {'frequency': 195.8, 'width': 40},
res['interface'][0]['org-openroadm-network-media-channel-interfaces:nmc-ctp'])
def test_07_service_path_create_rdm_check(self):
res['interface'][0]
)
self.assertDictEqual(
- {u'min-freq': 195.775, u'max-freq': 195.825},
+ {'min-freq': 195.775, 'max-freq': 195.825},
res['interface'][0]['org-openroadm-media-channel-interfaces:mc-ttp'])
def test_08_service_path_create_rdm_check(self):
res['interface'][0]
)
self.assertDictEqual(
- {u'frequency': 195.8, u'width': 40},
+ {'frequency': 195.8, 'width': 40},
res['interface'][0]['org-openroadm-network-media-channel-interfaces:nmc-ctp'])
# -mc supporting interfaces must not be created for SRG, only degrees
res['interface'][0]
)
self.assertDictEqual(
- {u'rate': u'org-openroadm-common-types:R100G',
- u'transmit-power': -5,
- u'modulation-format': 'dp-qpsk',
- u'frequency': 195.8},
+ {'rate': 'org-openroadm-common-types:R100G',
+ 'transmit-power': -5,
+ 'modulation-format': 'dp-qpsk',
+ 'frequency': 195.8},
res['interface'][0]['org-openroadm-optical-channel-interfaces:och'])
def test_12_service_path_create_xpdr_check(self):
}, **res['interface'][0]),
res['interface'][0]
)
- input_dict_2 = {'tx-sapi': 'AMkDwQ7xTmRI',
- 'expected-dapi': 'AMkDwQ7xTmRI',
- 'rate': 'org-openroadm-otn-common-types:OTU4',
+ input_dict_2 = {'rate': 'org-openroadm-otn-common-types:OTU4',
'fec': 'scfec'}
self.assertDictEqual(input_dict_2,
res['interface'][0]['org-openroadm-otn-otu-interfaces:otu'])
def test_13_service_path_create_xpdr_check(self):
- response = test_utils.check_netconf_node_request("XPDR-A1", "interface/XPDR1-NETWORK1-ODU")
+ response = test_utils.check_netconf_node_request("XPDR-A1", "interface/XPDR1-NETWORK1-ODU4")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
# the 2 following statements replace self.assertDictContainsSubset deprecated in python 3.2
self.assertDictEqual(
dict({
- 'name': 'XPDR1-NETWORK1-ODU',
+ 'name': 'XPDR1-NETWORK1-ODU4',
'administrative-state': 'inService',
'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
'type': 'org-openroadm-interfaces:otnOdu',
self.assertDictEqual(
dict({
'rate': 'org-openroadm-otn-common-types:ODU4',
- u'monitoring-mode': u'terminated'
+ 'monitoring-mode': 'terminated'
}, **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']),
res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']
)
- self.assertDictEqual({u'exp-payload-type': u'07', u'payload-type': u'07'},
+ self.assertDictEqual({'exp-payload-type': '07', 'payload-type': '07'},
res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu'])
def test_14_service_path_create_xpdr_check(self):
res['interface'][0]
)
self.assertDictEqual(
- {u'fec': u'off', u'speed': 100000},
+ {'fec': 'off', 'speed': 100000},
res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet'])
def test_15_service_path_create_xpdr_check(self):