sortedCreatedOduInterfaces.sort((s1,s2) -> s1.compareTo(s2));
String srcTp = sortedCreatedOduInterfaces.get(0);
String dstTp = sortedCreatedOduInterfaces.get(1);
+ // Strip the service name from the src and dst
+ String oduXConnectionName = srcTp.split(":")[0] + "-x-" + dstTp.split(":")[0];
OduConnectionBuilder oduConnectionBuilder = new OduConnectionBuilder()
- .setConnectionName(srcTp + "-x-" + dstTp)
+ .setConnectionName(oduXConnectionName)
.setDestination(new org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.odu.connection
.DestinationBuilder().setDstIf(dstTp).build())
.setSource(new org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.odu.connection
deviceTx.commit(Timeouts.DEVICE_WRITE_TIMEOUT, Timeouts.DEVICE_WRITE_TIMEOUT_UNIT);
try {
commit.get();
- LOG.info("Otn-connection successfully created: {}-{}", srcTp, dstTp);
- return Optional.of(srcTp + "-x-" + dstTp);
+ LOG.info("Otn-connection successfully created: {}", oduXConnectionName);
+ return Optional.of(oduXConnectionName);
} catch (InterruptedException | ExecutionException e) {
LOG.warn("Failed to post {}.", oduConnectionBuilder.build(), e);
}
String deviceId = node.getNodeId();
String srcTp = createdOduInterfaces.get(0);
String dstTp = createdOduInterfaces.get(1);
-
+ LOG.debug("Client TP: {}, Network TP: {}, Network2TP: {} SrcTP: {}, DstTP: {}",
+ node.getClientTp(), node.getNetworkTp(), node.getNetwork2Tp(), srcTp, dstTp);
+ if (!srcTp.contains(node.getClientTp())) {
+ // If the src-tp does not contain client port, then we swap src-tp & dest-tp
+ String tmp;
+ tmp = dstTp;
+ dstTp = srcTp;
+ srcTp = tmp;
+ LOG.debug("After swap, SrcTP: {}, DstTP: {}", srcTp, dstTp);
+ }
+ // Strip the service name from the src and dst
+ String oduXConnectionName = srcTp.split(":")[0] + "-x-" + dstTp.split(":")[0];
OduConnectionBuilder oduConnectionBuilder = new OduConnectionBuilder()
- .setConnectionName(srcTp + "-x-" + dstTp)
+ .setConnectionName(oduXConnectionName)
.setDestination(new org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.odu.connection
.DestinationBuilder().setDstIf(dstTp).build())
.setSource(new org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.odu.connection
deviceTx.commit(Timeouts.DEVICE_WRITE_TIMEOUT, Timeouts.DEVICE_WRITE_TIMEOUT_UNIT);
try {
commit.get();
- LOG.info("Otn-connection successfully created: {}-{}", srcTp, dstTp);
- return Optional.of(srcTp + "-x-" + dstTp);
+ LOG.info("Otn-connection successfully created: {}", oduXConnectionName);
+ return Optional.of(oduXConnectionName);
} catch (InterruptedException | ExecutionException e) {
LOG.warn("Failed to post {}.", oduConnectionBuilder.build(), e);
}
LOG.error(OTN_FUNTIONS_ARE_NOT_SUPPORTED_BY_OPENROADM_MODELS_1_2_1_MSG);
return null;
case StringConstants.OPENROADM_DEVICE_VERSION_2_2_1:
- return openRoadmOtnInterface221.createOpenRoadmOdu0Interface(nodeId, logicalConnPoint,
+ return openRoadmOtnInterface221.createOpenRoadmOdu0Interface(nodeId, logicalConnPoint, servicename,
isCTP, tribPortNumber, tribSlotIndex, apiInfoA, apiInfoZ, payLoadType);
default:
return null;
}
}
- public String createOpenRoadmOdu2Interface(String nodeId, String logicalConnPoint,
+ public String createOpenRoadmOdu2Interface(String nodeId, String logicalConnPoint, String servicename,
boolean isCTP, int tribPortNumber, int tribSlotIndex, AEndApiInfo apiInfoA, ZEndApiInfo apiInfoZ,
String payLoadType)
throws OpenRoadmInterfaceException {
LOG.error(OTN_FUNTIONS_ARE_NOT_SUPPORTED_BY_OPENROADM_MODELS_1_2_1_MSG);
return null;
case StringConstants.OPENROADM_DEVICE_VERSION_2_2_1:
- return openRoadmOtnInterface221.createOpenRoadmOdu2Interface(nodeId, logicalConnPoint,
+ return openRoadmOtnInterface221.createOpenRoadmOdu2Interface(nodeId, logicalConnPoint, servicename,
isCTP, tribPortNumber, tribSlotIndex, apiInfoA, apiInfoZ, payLoadType);
default:
return null;
}
}
- public String createOpenRoadmOdu2eInterface(String nodeId, String logicalConnPoint,
+ public String createOpenRoadmOdu2eInterface(String nodeId, String logicalConnPoint, String servicename,
boolean isCTP, int tribPortNumber, int tribSlotIndex, AEndApiInfo apiInfoA, ZEndApiInfo apiInfoZ,
String payLoadType)
throws OpenRoadmInterfaceException {
LOG.error(OTN_FUNTIONS_ARE_NOT_SUPPORTED_BY_OPENROADM_MODELS_1_2_1_MSG);
return null;
case StringConstants.OPENROADM_DEVICE_VERSION_2_2_1:
- return openRoadmOtnInterface221.createOpenRoadmOdu2eInterface(nodeId, logicalConnPoint,
+ return openRoadmOtnInterface221.createOpenRoadmOdu2eInterface(nodeId, logicalConnPoint, servicename,
isCTP, tribPortNumber, tribSlotIndex, apiInfoA, apiInfoZ, payLoadType);
default:
return null;
LOG.error(OTN_FUNTIONS_ARE_NOT_SUPPORTED_BY_OPENROADM_MODELS_2_2_1_MSG);
return null;
case StringConstants.OPENROADM_DEVICE_VERSION_7_1:
- return openRoadmOtnInterface710.createOpenRoadmOdu4Interface(nodeId, logicalConnPoint,
+ return openRoadmOtnInterface710.createOpenRoadmOdu4Interface(nodeId, logicalConnPoint, serviceName,
payLoad, isNetworkPort, minTribSlotNumber, maxTribSlotNumber);
default:
return null;
return ethernetInterfaceName;
}
- public String createOpenRoadmOdu2eInterface(String nodeId, String logicalConnPoint,
+ public String createOpenRoadmOdu2eInterface(String nodeId, String logicalConnPoint, String serviceName,
boolean isCTP, int tribPortNumber, int tribSlotIndex, AEndApiInfo apiInfoA, ZEndApiInfo apiInfoZ,
String payloadType) throws OpenRoadmInterfaceException {
String.format(MAPPING_ERROR_EXCEPTION_MESSAGE, nodeId, logicalConnPoint));
}
InterfaceBuilder oduInterfaceBldr = createGenericInterfaceBuilder(mapping, OtnOdu.VALUE,
- logicalConnPoint + "-ODU2e");
+ logicalConnPoint + "-ODU2e" + ":" + serviceName);
if (mapping.getSupportingOdu4() != null) {
oduInterfaceBldr.setSupportingInterface(mapping.getSupportingOdu4());
}
return oduInterfaceBldr.getName();
}
- public String createOpenRoadmOdu0Interface(String nodeId, String logicalConnPoint,
- boolean isCTP, int tribPortNumber, int tribSlotIndex, AEndApiInfo apiInfoA, ZEndApiInfo apiInfoZ,
+ public String createOpenRoadmOdu0Interface(String nodeId, String logicalConnPoint, String servicename,
+ boolean isCTP, int tribPortNumber, int tribSlotIndex, AEndApiInfo apiInfoA, ZEndApiInfo apiInfoZ,
String payloadType) throws OpenRoadmInterfaceException {
Mapping mapping = this.portMapping.getMapping(nodeId, logicalConnPoint);
String.format(MAPPING_ERROR_EXCEPTION_MESSAGE, nodeId, logicalConnPoint));
}
InterfaceBuilder oduInterfaceBldr = createGenericInterfaceBuilder(mapping, OtnOdu.VALUE,
- logicalConnPoint + "-ODU0");
+ logicalConnPoint + "-ODU0" + ":" + servicename);
if (mapping.getSupportingOdu4() != null) {
oduInterfaceBldr.setSupportingInterface(mapping.getSupportingOdu4());
}
}
public String createOpenRoadmOdu2Interface(String nodeId, String logicalConnPoint,
- boolean isCTP, int tribPortNumber, int tribSlotIndex, AEndApiInfo apiInfoA, ZEndApiInfo apiInfoZ,
- String payloadType) throws OpenRoadmInterfaceException {
+ String servicename, boolean isCTP, int tribPortNumber, int tribSlotIndex, AEndApiInfo apiInfoA,
+ ZEndApiInfo apiInfoZ, String payloadType) throws OpenRoadmInterfaceException {
Mapping mapping = this.portMapping.getMapping(nodeId, logicalConnPoint);
if (mapping == null) {
String.format(MAPPING_ERROR_EXCEPTION_MESSAGE, nodeId, logicalConnPoint));
}
InterfaceBuilder oduInterfaceBldr = createGenericInterfaceBuilder(mapping, OtnOdu.VALUE,
- logicalConnPoint + "-ODU2");
+ logicalConnPoint + "-ODU2" + ":" + servicename);
if (mapping.getSupportingOdu4() != null) {
oduInterfaceBldr.setSupportingInterface(mapping.getSupportingOdu4());
}
nodeId, logicalConnPoint));
}
- public String createOpenRoadmOdu4Interface(String nodeId, String logicalConnPoint,
+ public String createOpenRoadmOdu4Interface(String nodeId, String logicalConnPoint, String serviceName,
String payLoad, boolean isNetworkPort, OpucnTribSlotDef minTribSlotNumber, OpucnTribSlotDef maxTribSlotNumber)
throws OpenRoadmInterfaceException {
Mapping portMap = this.portMapping.getMapping(nodeId, logicalConnPoint);
// Supporting interface is a list for B100G (7.1) device models
supportingInterfaceList.add(supportingInterface);
- InterfaceBuilder oduIfBuilder = createGenericInterfaceBuilder(portMap, OtnOdu.VALUE, logicalConnPoint + "-ODU4")
+ InterfaceBuilder oduIfBuilder = createGenericInterfaceBuilder(
+ portMap, OtnOdu.VALUE, logicalConnPoint + "-ODU4" + ":" + serviceName)
.setSupportingInterfaceList(supportingInterfaceList);
// Agument ODU4 specific interface data
OduBuilder oduBuilder = new OduBuilder().setRate(ODU4.VALUE)
createdEthInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmEth10GInterface(
node.getNodeId(), node.getClientTp()));
createdOduInterfaces.add(
- // suppporting interface?, payload ?
+ // supporting interface?, payload ?
openRoadmInterfaceFactory.createOpenRoadmOdu2eInterface(node.getNodeId(),
- node.getClientTp(), false, input.getTribPortNumber(),
+ node.getClientTp(), input.getServiceName(), false, input.getTribPortNumber(),
input.getTribSlot(), apiInfoA, apiInfoZ, PT_03));
}
createdOduInterfaces.add(
// supporting interface? payload ?
openRoadmInterfaceFactory.createOpenRoadmOdu2eInterface(node.getNodeId(), node.getNetworkTp(),
- true, input.getTribPortNumber(), input.getTribSlot(), null,
+ input.getServiceName(), true, input.getTribPortNumber(), input.getTribSlot(), null,
null, null));
linkTpList.add(
new LinkTpBuilder().setNodeId(node.getNodeId()).setTpId(node.getNetworkTp()).build());
createdOduInterfaces.add(
// supporting interface? payload ?
openRoadmInterfaceFactory.createOpenRoadmOdu2eInterface(node.getNodeId(),
- node.getNetwork2Tp(), true, input.getTribPortNumber(),
+ node.getNetwork2Tp(), input.getServiceName(),true, input.getTribPortNumber(),
input.getTribSlot(), null, null, null));
linkTpList.add(
new LinkTpBuilder().setNodeId(node.getNodeId()).setTpId(node.getNetworkTp()).build());
self.assertIn('XPDR1-CLIENT4-ODU2e-x-XPDR1-NETWORK1-ODU2e',
response['output']['node-interface'][0]['connection-id'])
self.assertIn('XPDR1-CLIENT4-ETHERNET10G', response['output']['node-interface'][0]['eth-interface-id'])
- self.assertIn('XPDR1-NETWORK1-ODU2e', response['output']['node-interface'][0]['odu-interface-id'])
- self.assertIn('XPDR1-CLIENT4-ODU2e', response['output']['node-interface'][0]['odu-interface-id'])
+ self.assertIn('XPDR1-NETWORK1-ODU2e:service1', response['output']['node-interface'][0]['odu-interface-id'])
+ self.assertIn('XPDR1-CLIENT4-ODU2e:service1', response['output']['node-interface'][0]['odu-interface-id'])
def test_12_check_interface_10GE_CLIENT(self):
response = test_utils.check_node_attribute_request("SPDR-SA1", "interface", "XPDR1-CLIENT4-ETHERNET10G")
def test_13_check_interface_ODU2E_CLIENT(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SA1", "interface", "XPDR1-CLIENT4-ODU2e")
+ "SPDR-SA1", "interface", "XPDR1-CLIENT4-ODU2e:service1")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-CLIENT4-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-CLIENT4-ODU2e:service1',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-SFP4',
'supporting-interface': 'XPDR1-CLIENT4-ETHERNET10G',
def test_14_check_interface_ODU2E_NETWORK(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SA1", "interface", "XPDR1-NETWORK1-ODU2e")
+ "SPDR-SA1", "interface", "XPDR1-NETWORK1-ODU2e:service1")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e', 'administrative-state': 'inService',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e:service1', 'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
'type': 'org-openroadm-interfaces:otnOdu',
self.assertDictEqual(dict(response['odu-connection'][0], **input_dict_1),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e:service1'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT4-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT4-ODU2e:service1'},
response['odu-connection'][0]['source'])
def test_16_otn_service_path_delete_10GE(self):
def test_18_check_no_interface_ODU2E_NETWORK(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SA1", "interface", "XPDR1-NETWORK1-ODU2e")
+ "SPDR-SA1", "interface", "XPDR1-NETWORK1-ODU2e:service1")
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_19_check_no_interface_ODU2E_CLIENT(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SA1", "interface", "XPDR1-CLIENT4-ODU2e")
+ "SPDR-SA1", "interface", "XPDR1-CLIENT4-ODU2e:service1")
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_20_check_no_interface_10GE_CLIENT(self):
def test_13_check_interface_ODU2E_CLIENT(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SA1", "interface", "XPDR1-CLIENT1-ODU2e")
+ "SPDR-SA1", "interface", "XPDR1-CLIENT1-ODU2e:SPDRA-SPDRC-10G")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e:SPDRA-SPDRC-10G',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-SFP4',
'supporting-interface': 'XPDR1-CLIENT1-ETHERNET10G',
}
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e:SPDRA-SPDRC-10G'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e:SPDRA-SPDRC-10G'},
response['odu-connection'][0]['source'])
def test_15_check_interface_ODU2E_NETWORK(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SA1", "interface", "XPDR1-NETWORK1-ODU2e")
+ "SPDR-SA1", "interface", "XPDR1-NETWORK1-ODU2e:SPDRA-SPDRC-10G")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e-SPDRA:SPDRC-10G',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
# Test the interfaces on SPDR-C1
def test_16_check_interface_ODU2E_NETWORK(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SC1", "interface", "XPDR1-NETWORK1-ODU2e")
+ "SPDR-SC1", "interface", "XPDR1-NETWORK1-ODU2e:SPDRA-SPDRC-10G")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e:SPDRA-SPDRC-10G',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
def test_18_check_interface_ODU2E_CLIENT(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SC1", "interface", "XPDR1-CLIENT1-ODU2e")
+ "SPDR-SC1", "interface", "XPDR1-CLIENT1-ODU2e:SPDRA-SPDRC-10G")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e-SPDRA-SPDRC-10G',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-SFP4',
'supporting-interface': 'XPDR1-CLIENT1-ETHERNET10G',
}
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e:SPDRA-SPDRC-10G'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e:SPDRA-SPDRC-10G'},
response['odu-connection'][0]['source'])
def test_20_check_interface_ODU2E_NETWORK(self):
response = test_utils.check_node_attribute_request(
- "SPDR-SC1", "interface", "XPDR1-NETWORK1-ODU2e")
+ "SPDR-SC1", "interface", "XPDR1-NETWORK1-ODU2e:SPDRA-SPDRC-10G")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e:SPDRA-SPDRC-10G',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
def test_32_check_interface_ODU2E_CLIENT_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e')
+ 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e:service1-10GE',
'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_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR1-NETWORK1-ODU2e')
+ 'SPDR-SA1', 'interface', 'XPDR1-NETWORK1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e:service1-10GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e:service1-10GE'},
response['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_node_attribute_request(
- 'SPDR-SC1', 'interface', 'XPDR1-CLIENT1-ODU2e')
+ 'SPDR-SC1', 'interface', 'XPDR1-CLIENT1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e:service1-10GE',
'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_node_attribute_request(
- 'SPDR-SC1', 'interface', 'XPDR1-NETWORK1-ODU2e')
+ 'SPDR-SC1', 'interface', 'XPDR1-NETWORK1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e:service1-10GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e:service1-10GE'},
response['odu-connection'][0]['source'])
def test_39_check_otn_topo_links(self):
def test_73_check_interface_ODU0_CLIENT_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR3-CLIENT1-ODU0')
+ 'SPDR-SA1', 'interface', 'XPDR3-CLIENT1-ODU0:service1-1GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0',
+ input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0:service1-1GE',
'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_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR3-NETWORK1-ODU0')
+ 'SPDR-SA1', 'interface', 'XPDR3-NETWORK1-ODU0:service1-1GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0',
+ input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0:service1-1GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP3-CFP0',
'supporting-interface': 'XPDR3-NETWORK1-ODU4',
}
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0'},
+ self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0:service1-1GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0'},
+ self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0:service1-1GE'},
response['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_node_attribute_request(
- 'SPDR-SC1', 'interface', 'XPDR3-CLIENT1-ODU0')
+ 'SPDR-SC1', 'interface', 'XPDR3-CLIENT1-ODU0:service1-1GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0',
+ input_dict_1 = {'name': 'XPDR3-CLIENT1-ODU0:service1-1GE',
'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_node_attribute_request(
- 'SPDR-SC1', 'interface', 'XPDR3-NETWORK1-ODU0')
+ 'SPDR-SC1', 'interface', 'XPDR3-NETWORK1-ODU0:service1-1GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0',
+ input_dict_1 = {'name': 'XPDR3-NETWORK1-ODU0:service1-1GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP3-CFP0',
'supporting-interface': 'XPDR3-NETWORK1-ODU4',
}
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0'},
+ self.assertDictEqual({'dst-if': 'XPDR3-NETWORK1-ODU0:service1-1GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0'},
+ self.assertDictEqual({'src-if': 'XPDR3-CLIENT1-ODU0:service1-1GE'},
response['odu-connection'][0]['source'])
def test_80_check_otn_topo_links(self):
def test_85_check_no_interface_ODU0_NETWORK_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR3-NETWORK1-ODU0-service1')
+ 'SPDR-SA1', 'interface', 'XPDR3-NETWORK1-ODU0:service1-1GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_86_check_no_interface_ODU0_CLIENT_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR3-CLIENT1-ODU0-service1')
+ 'SPDR-SA1', 'interface', 'XPDR3-CLIENT1-ODU0:service1-1GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_87_check_no_interface_10GE_CLIENT_spdra(self):
def test_043_check_interface_ODU2E_CLIENT_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e')
+ 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-SFP4',
'supporting-interface': 'XPDR1-CLIENT1-ETHERNET10G',
response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu'])
response2 = test_utils.check_node_attribute_request(
- 'SPDR-SC1', 'interface', 'XPDR1-CLIENT1-ODU2e')
+ 'SPDR-SC1', 'interface', 'XPDR1-CLIENT1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
self.assertEqual(input_dict_2['tx-sapi'],
response2['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['tx-dapi'])
def test_044_check_interface_ODU2E_NETWORK_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR1-NETWORK1-ODU2e')
+ 'SPDR-SA1', 'interface', 'XPDR1-NETWORK1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
}
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e:service1-10GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e:service1-10GE'},
response['odu-connection'][0]['source'])
def test_046_check_interface_10GE_CLIENT_spdrc(self):
def test_047_check_interface_ODU2E_CLIENT_spdrc(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SC1', 'interface', 'XPDR1-CLIENT1-ODU2e')
+ 'SPDR-SC1', 'interface', 'XPDR1-CLIENT1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-CLIENT1-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-SFP4',
'supporting-interface': 'XPDR1-CLIENT1-ETHERNET10G',
response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu'])
response2 = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e')
+ 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
self.assertEqual(input_dict_2['tx-sapi'],
response2['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['tx-dapi'])
def test_048_check_interface_ODU2E_NETWORK_spdrc(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SC1', 'interface', 'XPDR1-NETWORK1-ODU2e')
+ 'SPDR-SC1', 'interface', 'XPDR1-NETWORK1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR1-NETWORK1-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR1-NETWORK1-ODU4',
}
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e:service1-10GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR1-CLIENT1-ODU2e:service1-10GE'},
response['odu-connection'][0]['source'])
def test_050_check_otn_topo_links(self):
def test_055_check_no_interface_ODU2E_NETWORK_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR1-NETWORK1-ODU2e')
+ 'SPDR-SA1', 'interface', 'XPDR1-NETWORK1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_056_check_no_interface_ODU2E_CLIENT_spdra(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e')
+ 'SPDR-SA1', 'interface', 'XPDR1-CLIENT1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_057_check_no_interface_10GE_CLIENT_spdra(self):
def test_078_check_interface_ODU2E_NETWORK1_spdrb(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SB1', 'interface', 'XPDR2-NETWORK1-ODU2e')
+ 'SPDR-SB1', 'interface', 'XPDR2-NETWORK1-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU2e',
+ input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR2-NETWORK1-ODU4',
def test_079_check_interface_ODU2E_NETWORK2_spdrb(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SB1', 'interface', 'XPDR2-NETWORK2-ODU2e')
+ 'SPDR-SB1', 'interface', 'XPDR2-NETWORK2-ODU2e:service1-10GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-NETWORK2-ODU2e',
+ input_dict_1 = {'name': 'XPDR2-NETWORK2-ODU2e:service1-10GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': 'CP1-CFP0',
'supporting-interface': 'XPDR2-NETWORK2-ODU4',
'XPDR2-NETWORK1-ODU2e-x-XPDR2-NETWORK2-ODU2e',
'direction': 'bidirectional'
}
-
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR2-NETWORK2-ODU2e'},
+ self.assertDictEqual({'dst-if': 'XPDR2-NETWORK2-ODU2e:service1-10GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR2-NETWORK1-ODU2e'},
+ self.assertDictEqual({'src-if': 'XPDR2-NETWORK1-ODU2e:service1-10GE'},
response['odu-connection'][0]['source'])
def test_081_check_otn_topo_links(self):
def test_087_check_no_interface_ODU2E_NETWORK1_spdrb(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SB1', 'interface', 'XPDR2-NETWORK1-ODU2e')
+ 'SPDR-SB1', 'interface', 'XPDR2-NETWORK1-ODU2e-service1-10GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_088_check_no_interface_ODU2E_NETWORK2_spdrb(self):
response = test_utils.check_node_attribute_request(
- 'SPDR-SB1', 'interface', 'XPDR2-NETWORK2-ODU2e')
+ 'SPDR-SB1', 'interface', 'XPDR2-NETWORK2-ODU2e-service1-10GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_089_check_otn_topo_links(self):
self.assertIn('XPDR2-CLIENT1-ODU4-x-XPDR2-NETWORK1-ODU4',
response['output']['node-interface'][0]['connection-id'])
self.assertIn('XPDR2-CLIENT1-ETHERNET-100G', response['output']['node-interface'][0]['eth-interface-id'])
- self.assertIn('XPDR2-NETWORK1-ODU4',
+ self.assertIn('XPDR2-NETWORK1-ODU4:service_Ethernet',
response['output']['node-interface'][0]['odu-interface-id'])
- self.assertIn('XPDR2-CLIENT1-ODU4',
+ self.assertIn('XPDR2-CLIENT1-ODU4:service_Ethernet',
response['output']['node-interface'][0]['odu-interface-id'])
def test_11_check_interface_100ge_client(self):
def test_12_check_interface_odu4_client(self):
response = test_utils.check_node_attribute_request(
- "XPDR-A2", "interface", "XPDR2-CLIENT1-ODU4")
+ "XPDR-A2", "interface", "XPDR2-CLIENT1-ODU4:service_Ethernet")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4',
+ input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4:service_Ethernet',
'administrative-state': 'inService',
'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT',
'supporting-interface-list': 'XPDR2-CLIENT1-ETHERNET-100G',
def test_13_check_interface_odu4_network(self):
response = test_utils.check_node_attribute_request(
- "XPDR-A2", "interface", "XPDR2-NETWORK1-ODU4")
+ "XPDR-A2", "interface", "XPDR2-NETWORK1-ODU4:service_Ethernet")
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4',
+ input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4:service_Ethernet',
'administrative-state': 'inService',
'supporting-circuit-pack-name': '1/2/2-PLUG-NET',
'supporting-interface-list': 'XPDR2-NETWORK1-ODUC2',
self.assertEqual(response['status_code'], requests.codes.ok)
input_dict_1 = {
'connection-name':
- 'XPDR2-CLIENT1-ODU4-x-XPDR2-NETWORK1-ODU4',
+ 'XPDR2-NETWORK1-ODU4-x-XPDR2-CLIENT1-ODU4',
'direction': 'bidirectional'
}
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR2-NETWORK1-ODU4'},
+ self.assertDictEqual({'dst-if': 'XPDR2-NETWORK1-ODU4:service_Ethernet'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR2-CLIENT1-ODU4'},
+ self.assertDictEqual({'src-if': 'XPDR2-CLIENT1-ODU4:service_Ethernet'},
response['odu-connection'][0]['source'])
# 1d) Delete Ethernet device interfaces
def test_17_check_no_interface_odu_network(self):
response = test_utils.check_node_attribute_request(
- "XPDR-A2", "interface", "XPDR2-NETWORK1-ODU4")
+ "XPDR-A2", "interface", "XPDR2-NETWORK1-ODU4:service_Ethernet")
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_18_check_no_interface_odu_client(self):
response = test_utils.check_node_attribute_request(
- "XPDR-A2", "interface", "XPDR2-CLIENT1-ODU4")
+ "XPDR-A2", "interface", "XPDR2-CLIENT1-ODU4:service_Ethernet")
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_19_check_no_interface_100ge_client(self):
def test_32_check_interface_ODU4_CLIENT_xpdra2(self):
response = test_utils.check_node_attribute_request(
- 'XPDR-A2', 'interface', 'XPDR2-CLIENT1-ODU4')
+ 'XPDR-A2', 'interface', 'XPDR2-CLIENT1-ODU4:service-100GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4',
+ input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4:service-100GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT',
'supporting-interface-list': 'XPDR2-CLIENT1-ETHERNET-100G',
def test_33_check_interface_ODU4_NETWORK_xpdra2(self):
response = test_utils.check_node_attribute_request(
- 'XPDR-A2', 'interface', 'XPDR2-NETWORK1-ODU4')
+ 'XPDR-A2', 'interface', 'XPDR2-NETWORK1-ODU4:service-100GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4',
+ input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4:service-100GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': '1/2/2-PLUG-NET',
'supporting-interface-list': 'XPDR2-NETWORK1-ODUC4',
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR2-NETWORK1-ODU4'},
+ self.assertDictEqual({'dst-if': 'XPDR2-NETWORK1-ODU4:service-100GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR2-CLIENT1-ODU4'},
+ self.assertDictEqual({'src-if': 'XPDR2-CLIENT1-ODU4:service-100GE'},
response['odu-connection'][0]['source'])
def test_35_check_interface_100GE_CLIENT_xpdrc2(self):
def test_36_check_interface_ODU4_CLIENT_xpdrc2(self):
response = test_utils.check_node_attribute_request(
- 'XPDR-C2', 'interface', 'XPDR2-CLIENT1-ODU4')
+ 'XPDR-C2', 'interface', 'XPDR2-CLIENT1-ODU4:service-100GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4',
+ input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4:service-100GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT',
'supporting-interface-list': 'XPDR2-CLIENT1-ETHERNET-100G',
def test_37_check_interface_ODU4_NETWORK_xpdrc2(self):
response = test_utils.check_node_attribute_request(
- 'XPDR-C2', 'interface', 'XPDR2-NETWORK1-ODU4')
+ 'XPDR-C2', 'interface', 'XPDR2-NETWORK1-ODU4:service-100GE')
self.assertEqual(response['status_code'], requests.codes.ok)
- input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4',
+ input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4:service-100GE',
'administrative-state': 'inService',
'supporting-circuit-pack-name': '1/2/2-PLUG-NET',
'supporting-interface-list': 'XPDR2-NETWORK1-ODUC4',
self.assertDictEqual(dict(input_dict_1, **response['odu-connection'][0]),
response['odu-connection'][0])
- self.assertDictEqual({'dst-if': 'XPDR2-NETWORK1-ODU4'},
+ self.assertDictEqual({'dst-if': 'XPDR2-NETWORK1-ODU4:service-100GE'},
response['odu-connection'][0]['destination'])
- self.assertDictEqual({'src-if': 'XPDR2-CLIENT1-ODU4'},
+ self.assertDictEqual({'src-if': 'XPDR2-CLIENT1-ODU4:service-100GE'},
response['odu-connection'][0]['source'])
def test_39_check_otn_topo_links(self):
def test_50_check_no_interface_ODU4_NETWORK_xpdra2(self):
response = test_utils.check_node_attribute_request(
- 'XPDR-A2', 'interface', 'XPDR2-NETWORK1-ODU4')
+ 'XPDR-A2', 'interface', 'XPDR2-NETWORK1-ODU4:service-100GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_51_check_no_interface_ODU4_CLIENT_xpdra2(self):
response = test_utils.check_node_attribute_request(
- 'XPDR-A2', 'interface', 'XPDR2-CLIENT1-ODU4')
+ 'XPDR-A2', 'interface', 'XPDR2-CLIENT1-ODU4:service-100GE')
self.assertEqual(response['status_code'], requests.codes.conflict)
def test_52_check_no_interface_100GE_CLIENT_xpdra2(self):