- public String createOpenRoadmOchInterface(String nodeId, String logicalConnPoint, Long waveNumber)
- throws OpenRoadmInterfaceException {
- // TODO : Check this method
-
- fixedFlex = fixedFlex.getFixedFlexWaveMapping(waveNumber.shortValue());
-
- Mapping portMap = portMapping.getMapping(nodeId, logicalConnPoint);
- if (portMap == null) {
- throw new OpenRoadmInterfaceException(
- String.format(MAPPING_ERROR_EXCEPTION_MESSAGE, nodeId, logicalConnPoint));
- }
-
- // OCH interface specific data
- OchBuilder ocIfBuilder = new OchBuilder()
- .setFrequency(FrequencyTHz.getDefaultInstance(String.valueOf(fixedFlex.getCenterFrequency())))
- .setRate(R100G.class)
- // TODO: Check if this the correct way to set modulation format here
- .setModulationFormat(ModulationFormat.DpQpsk)
- .setTransmitPower(new PowerDBm(new BigDecimal("-5")));
-
- // Create generic interface
- InterfaceBuilder ochInterfaceBldr = createGenericInterfaceBuilder(portMap, OpticalChannel.class,
- createOpenRoadmOchInterfaceName(logicalConnPoint, waveNumber));
- // Create Interface1 type object required for adding as augmentation
- // TODO look at imports of different versions of class
- org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev181019.Interface1Builder
- ochIf1Builder = new org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev181019
- .Interface1Builder();
- ochInterfaceBldr.addAugmentation(ochIf1Builder.setOch(ocIfBuilder.build()).build());
-
- // Post interface on the device
- openRoadmInterfaces.postInterface(nodeId, ochInterfaceBldr);
-
- // Post the equipment-state change on the device circuit-pack if xpdr node
- if (portMap.getLogicalConnectionPoint().contains(StringConstants.NETWORK_TOKEN)) {
- this.openRoadmInterfaces.postEquipmentState(nodeId, portMap.getSupportingCircuitPackName(), true);
- }
-
- return ochInterfaceBldr.getName();
- }
-