"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSA",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSC",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SC1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SC1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2018-06-15T00:00:01Z",
'type': 'org-openroadm-interfaces:otnOtu',
'supporting-port': 'CP1-CFP0-P1'
}
- input_dict_2 = {'tx-sapi': 'Swfw02qXGyI=',
- 'expected-dapi': 'Swfw02qXGyI=',
+ input_dict_2 = {'tx-sapi': 'H/OelLynehI=',
+ 'expected-dapi': 'H/OelLynehI=',
+ 'tx-dapi': 'AMf1n5hK6Xkk',
+ 'expected-sapi': 'AMf1n5hK6Xkk',
'rate': 'org-openroadm-otn-common-types:OTU4',
'fec': 'scfec'
}
'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'
}
for link in res['network'][0]['ietf-network-topology:link']:
self.assertIn(link['link-id'], listLinkId)
self.assertEqual(
- link['transportpce-topology:otn-link-type'], 'OTU4')
+ link['transportpce-networkutils:otn-link-type'], 'OTU4')
self.assertEqual(
link['org-openroadm-common-network:link-type'], 'OTN-LINK')
self.assertEqual(
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-OTU',
'type': 'org-openroadm-interfaces:otnOdu',
- 'supporting-port': 'CP1-CFP0-P1'}
+ 'supporting-port': 'CP1-CFP0-P1',
+ 'circuit-id': 'TBD',
+ 'description': 'TBD'}
# 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='}
+ 'monitoring-mode': 'terminated',
+ '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])
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-OTU',
'type': 'org-openroadm-interfaces:otnOdu',
- 'supporting-port': 'CP1-CFP0-P1'}
+ 'supporting-port': 'CP1-CFP0-P1',
+ 'circuit-id': 'TBD',
+ 'description': 'TBD'}
# 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='
+ 'monitoring-mode': 'terminated',
+ '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])
self.assertEqual(
link['org-openroadm-otn-network-topology:used-bandwidth'], 0)
self.assertEqual(
- link['transportpce-topology:otn-link-type'], 'ODTU4')
+ link['transportpce-networkutils:otn-link-type'], 'ODTU4')
self.assertEqual(
link['org-openroadm-common-network:link-type'], 'OTN-LINK')
self.assertIn(link['org-openroadm-common-network:opposite-link'],
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
+ if node['node-id'] in ('SPDR-SA1-XPDR1', 'SPDR-SC1-XPDR1'):
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["ethernet-encoding"] = "10GBASE-R"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["ethernet-encoding"] = "10GBASE-R"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
def test_32_check_interface_ODU2E_CLIENT_spdra(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SA1", "interface/XPDR1-CLIENT1-ODU2e-service1-10GE")
+ "SPDR-SA1", "interface/XPDR1-CLIENT1-ODU2e")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e-service1-10GE',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-SFP4',
'supporting-interface': 'XPDR1-CLIENT1-ETHERNET10G',
def test_33_check_interface_ODU2E_NETWORK_spdra(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SA1", "interface/XPDR1-NETWORK1-ODU2e-service1-10GE")
+ "SPDR-SA1", "interface/XPDR1-NETWORK1-ODU2e")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e-service1-10GE',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
def test_34_check_ODU2E_connection_spdra(self):
response = test_utils.check_netconf_node_request(
"SPDR-SA1",
- "odu-connection/XPDR1-CLIENT1-ODU2e-service1-10GE-x-XPDR1-NETWORK1-ODU2e-service1-10GE")
+ "odu-connection/XPDR1-CLIENT1-ODU2e-x-XPDR1-NETWORK1-ODU2e")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
input_dict_1 = {
'connection-name':
- 'XPDR1-CLIENT1-ODU2e-service1-10GE-x-XPDR1-NETWORK1-ODU2e-service1-10GE',
+ 'XPDR1-CLIENT1-ODU2e-x-XPDR1-NETWORK1-ODU2e',
'direction': 'bidirectional'
}
self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]),
res['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e-service1-10GE'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
res['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e-service1-10GE'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
res['odu-connection'][0]['source'])
def test_35_check_interface_10GE_CLIENT_spdrc(self):
def test_36_check_interface_ODU2E_CLIENT_spdrc(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SC1", "interface/XPDR1-CLIENT1-ODU2e-service1-10GE")
+ "SPDR-SC1", "interface/XPDR1-CLIENT1-ODU2e")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e-service1-10GE',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-SFP4',
'supporting-interface': 'XPDR1-CLIENT1-ETHERNET10G',
def test_37_check_interface_ODU2E_NETWORK_spdrc(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SC1", "interface/XPDR1-NETWORK1-ODU2e-service1-10GE")
+ "SPDR-SC1", "interface/XPDR1-NETWORK1-ODU2e")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e-service1-10GE',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
def test_38_check_ODU2E_connection_spdrc(self):
response = test_utils.check_netconf_node_request(
"SPDR-SC1",
- "odu-connection/XPDR1-CLIENT1-ODU2e-service1-10GE-x-XPDR1-NETWORK1-ODU2e-service1-10GE")
+ "odu-connection/XPDR1-CLIENT1-ODU2e-x-XPDR1-NETWORK1-ODU2e")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
input_dict_1 = {
'connection-name':
- 'XPDR1-CLIENT1-ODU2e-service1-10GE-x-XPDR1-NETWORK1-ODU2e-service1-10GE',
+ 'XPDR1-CLIENT1-ODU2e-x-XPDR1-NETWORK1-ODU2e',
'direction': 'bidirectional'
}
self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]),
res['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e-service1-10GE'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
res['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e-service1-10GE'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
res['odu-connection'][0]['source'])
def test_39_check_otn_topo_links(self):
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
+ if node['node-id'] in ('SPDR-SA1-XPDR1', 'SPDR-SC1-XPDR1'):
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
+ if node['node-id'] in ('SPDR-SA1-XPDR1', 'SPDR-SC1-XPDR1'):
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
+ if node['node-id'] in ('SPDR-SA1-XPDR1', 'SPDR-SC1-XPDR1'):
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
self.cr_serv_sample_data["input"]["connection-type"] = "infrastructure"
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "OTU"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "OTU"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
# pylint: disable=line-too-long
self.cr_serv_sample_data["input"]["service-name"] = "service2-ODU4"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "ODU"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
del self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"]
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "ODU"
self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
del self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"]
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
del self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
def test_73_check_interface_ODU0_CLIENT_spdra(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SA1", "interface/XPDR3-CLIENT1-ODU0-service1-1GE")
+ "SPDR-SA1", "interface/XPDR3-CLIENT1-ODU0")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0-service1-1GE',
+ input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP3-SFP1',
'supporting-interface': 'XPDR3-CLIENT1-ETHERNET1G',
def test_74_check_interface_ODU0_NETWORK_spdra(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SA1", "interface/XPDR3-NETWORK1-ODU0-service1-1GE")
+ "SPDR-SA1", "interface/XPDR3-NETWORK1-ODU0")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0-service1-1GE',
+ input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP3-CFP0',
'supporting-interface': 'XPDR3-NETWORK1-ODU4',
def test_75_check_ODU0_connection_spdra(self):
response = test_utils.check_netconf_node_request(
"SPDR-SA1",
- "odu-connection/XPDR3-CLIENT1-ODU0-service1-1GE-x-XPDR3-NETWORK1-ODU0-service1-1GE")
+ "odu-connection/XPDR3-CLIENT1-ODU0-x-XPDR3-NETWORK1-ODU0")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
input_dict_1 = {
'connection-name':
- 'XPDR3-CLIENT1-ODU0-service1-1GE-x-XPDR3-NETWORK1-ODU0-service1-1GE',
+ 'XPDR3-CLIENT1-ODU0-x-XPDR3-NETWORK1-ODU0',
'direction': 'bidirectional'
}
self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]),
res['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0-service1-1GE'},
+ self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0'},
res['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0-service1-1GE'},
+ self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0'},
res['odu-connection'][0]['source'])
def test_76_check_interface_1GE_CLIENT_spdrc(self):
def test_77_check_interface_ODU0_CLIENT_spdrc(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SC1", "interface/XPDR3-CLIENT1-ODU0-service1-1GE")
+ "SPDR-SC1", "interface/XPDR3-CLIENT1-ODU0")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0-service1-1GE',
+ input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP3-SFP1',
'supporting-interface': 'XPDR3-CLIENT1-ETHERNET1G',
def test_78_check_interface_ODU0_NETWORK_spdrc(self):
response = test_utils.check_netconf_node_request(
- "SPDR-SC1", "interface/XPDR3-NETWORK1-ODU0-service1-1GE")
+ "SPDR-SC1", "interface/XPDR3-NETWORK1-ODU0")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
- input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0-service1-1GE',
+ input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP3-CFP0',
'supporting-interface': 'XPDR3-NETWORK1-ODU4',
def test_79_check_ODU0_connection_spdrc(self):
response = test_utils.check_netconf_node_request(
"SPDR-SC1",
- "odu-connection/XPDR3-CLIENT1-ODU0-service1-1GE-x-XPDR3-NETWORK1-ODU0-service1-1GE")
+ "odu-connection/XPDR3-CLIENT1-ODU0-x-XPDR3-NETWORK1-ODU0")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
input_dict_1 = {
'connection-name':
- 'XPDR3-CLIENT1-ODU0-service1-1GE-x-XPDR3-NETWORK1-ODU0-service1-1GE',
+ 'XPDR3-CLIENT1-ODU0-x-XPDR3-NETWORK1-ODU0',
'direction': 'bidirectional'
}
self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]),
res['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0-service1-1GE'},
+ self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0'},
res['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0-service1-1GE'},
+ self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0'},
res['odu-connection'][0]['source'])
def test_80_check_otn_topo_links(self):
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR3' or node['node-id'] == 'SPDR-SC1-XPDR3':
+ if node['node-id'] in ('SPDR-SA1-XPDR3', 'SPDR-SC1-XPDR3'):
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR3-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR3' or node['node-id'] == 'SPDR-SC1-XPDR3':
+ if node['node-id'] in ('SPDR-SA1-XPDR3', 'SPDR-SC1-XPDR3'):
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR3-NETWORK1':
res = response.json()
links = res['network'][0]['ietf-network-topology:link']
for link in links:
- if (link["org-openroadm-common-network:link-type"] == "XPONDER-OUTPUT" or
- link["org-openroadm-common-network:link-type"] == "XPONDER-INPUT"):
+ if link["org-openroadm-common-network:link-type"] in ('XPONDER-OUTPUT', 'XPONDER-INPUT'):
link_name = link["link-id"]
response = test_utils.delete_request(url+link_name)
self.assertEqual(response.status_code, requests.codes.ok)