import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
+import org.opendaylight.mdsal.binding.api.NotificationPublishService;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.tapi.R2RTapiLinkDiscovery;
import org.opendaylight.transportpce.tapi.TapiStringConstants;
import org.opendaylight.transportpce.tapi.utils.TapiLink;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220922.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220922.network.Nodes;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.NodeTypes;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.XpdrNodeTypes;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.tapi.context.ServiceInterfacePoint;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.tapi.context.ServiceInterfacePointBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.tapi.context.ServiceInterfacePointKey;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.OwnedNodeEdgePoint1;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.OwnedNodeEdgePoint1Builder;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.cep.list.ConnectionEndPoint;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.cep.list.ConnectionEndPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.cep.list.ConnectionEndPointKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.connectivity.context.Connection;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.connectivity.context.ConnectionBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.connectivity.context.ConnectionKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.connectivity.service.EndPoint;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.connectivity.service.EndPointKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.context.ConnectivityContext;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.context.topology.context.topology.node.owned.node.edge.point.CepList;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.context.topology.context.topology.node.owned.node.edge.point.CepListBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev181210.DIGITALSIGNALTYPE100GigE;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev181210.DIGITALSIGNALTYPE10GigELAN;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev181210.DIGITALSIGNALTYPEGigE;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.NotificationBuilder;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.NotificationType;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.ObjectType;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.notification.ChangedAttributes;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.notification.ChangedAttributesBuilder;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.notification.ChangedAttributesKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU0;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU2;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU2E;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.transfer.timing.pac.LatencyCharacteristic;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.transfer.timing.pac.LatencyCharacteristicBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.Notification;
import org.opendaylight.yangtools.yang.common.Uint16;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Component
public class TapiNetworkModelServiceImpl implements TapiNetworkModelService {
private static final Logger LOG = LoggerFactory.getLogger(TapiNetworkModelServiceImpl.class);
+
private final Uuid tapiTopoUuid = new Uuid(UUID.nameUUIDFromBytes(TapiStringConstants.T0_FULL_MULTILAYER
.getBytes(StandardCharsets.UTF_8)).toString());
private final NetworkTransactionService networkTransactionService;
- private Map<ServiceInterfacePointKey, ServiceInterfacePoint> sipMap;
private final R2RTapiLinkDiscovery linkDiscovery;
private final TapiLink tapiLink;
-
- public TapiNetworkModelServiceImpl(final R2RTapiLinkDiscovery linkDiscovery,
- NetworkTransactionService networkTransactionService, TapiLink tapiLink) {
+ private final NotificationPublishService notificationPublishService;
+ private Map<ServiceInterfacePointKey, ServiceInterfacePoint> sipMap = new HashMap<>();
+
+ @Activate
+ public TapiNetworkModelServiceImpl(@Reference NetworkTransactionService networkTransactionService,
+ @Reference DeviceTransactionManager deviceTransactionManager,
+ @Reference TapiLink tapiLink,
+ @Reference final NotificationPublishService notificationPublishService) {
this.networkTransactionService = networkTransactionService;
- this.sipMap = new HashMap<>();
- this.linkDiscovery = linkDiscovery;
+ this.linkDiscovery = new R2RTapiLinkDiscovery(networkTransactionService, deviceTransactionManager, tapiLink);
this.tapiLink = tapiLink;
+ this.notificationPublishService = notificationPublishService;
}
@Override
// create switching pool
OduSwitchingPools oorOduSwitchingPool = createSwitchPoolForXpdr(
- mapping.getXponderType().getIntValue(), xpdrClMaps, xpdrNetMaps, xpdrNb);
+ mapping.getXpdrType().getIntValue(), xpdrClMaps, xpdrNetMaps, xpdrNb);
// node transformation
Map<NodeKey, Node> nodeMap = new HashMap<>(transformXpdrToTapiNode(
- nodeId, xpdrClMaps, xpdrNetMaps, mapping.getXponderType(), oorOduSwitchingPool));
+ nodeId, xpdrClMaps, xpdrNetMaps, mapping.getXpdrType(), oorOduSwitchingPool));
// add nodes and sips to tapi context
mergeNodeinTopology(nodeMap);
mergeSipsinContext(this.sipMap);
List<Uuid> changedOneps = updateNeps(mapping, uuids);
updateLinks(changedOneps, mapping);
+ sendNotification(changedOneps, mapping);
LOG.info("Updated TAPI topology successfully.");
}
+ @SuppressWarnings("rawtypes")
+ private void sendNotification(List<Uuid> changedOneps, Mapping mapping) {
+ Notification notification = new NotificationBuilder()
+ .setNotificationType(NotificationType.ATTRIBUTEVALUECHANGE)
+ .setTargetObjectType(ObjectType.NODEEDGEPOINT)
+ .setChangedAttributes(getChangedAttributes(changedOneps, mapping))
+ .setUuid(tapiTopoUuid)
+ .build();
+ try {
+ notificationPublishService.putNotification(notification);
+ } catch (InterruptedException e) {
+ LOG.error("Could not send notification");
+ }
+ }
+
+ private Map<ChangedAttributesKey, ChangedAttributes> getChangedAttributes(List<Uuid> changedOneps,
+ Mapping mapping) {
+ Map<ChangedAttributesKey, ChangedAttributes> changedAttributes = new HashMap<>();
+ for (Uuid nep : changedOneps) {
+ changedAttributes.put(new ChangedAttributesKey(nep.getValue()),
+ new ChangedAttributesBuilder().setValueName(nep.getValue())
+ .setOldValue(mapping.getPortOperState().equals("InService") ? "OutOfService" : "InService")
+ .setNewValue(mapping.getPortOperState())
+ .build());
+ }
+ return changedAttributes;
+ }
+
private void updateLinks(List<Uuid> changedOneps, Mapping mapping) {
try {
InstanceIdentifier<Topology> topoIID = InstanceIdentifier.builder(Context.class)
LOG.error("Could not update TAPI links");
return;
}
- Map<LinkKey, Link> links = optTopology.get().getLink();
- if (links != null) {
- for (Link link : links.values()) {
- List<Uuid> linkNeps = Objects.requireNonNull(link.getNodeEdgePoint()).values().stream()
- .map(NodeEdgePointRef::getNodeEdgePointUuid).collect(Collectors.toList());
- if (!Collections.disjoint(changedOneps, linkNeps)) {
- InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Context.class)
- .augmentation(Context1.class).child(TopologyContext.class)
- .child(Topology.class, new TopologyKey(tapiTopoUuid))
- .child(Link.class, new LinkKey(link.getUuid())).build();
- Link linkblr = new LinkBuilder().setUuid(link.getUuid())
- .setAdministrativeState(transformAdminState(mapping.getPortAdminState()))
- .setOperationalState(transformOperState(mapping.getPortOperState())).build();
- this.networkTransactionService.merge(LogicalDatastoreType.OPERATIONAL, linkIID, linkblr);
- }
+ for (Link link : optTopology.get().nonnullLink().values()) {
+ List<Uuid> linkNeps = Objects.requireNonNull(link.getNodeEdgePoint()).values().stream()
+ .map(NodeEdgePointRef::getNodeEdgePointUuid).collect(Collectors.toList());
+ if (!Collections.disjoint(changedOneps, linkNeps)) {
+ InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Context.class)
+ .augmentation(Context1.class).child(TopologyContext.class)
+ .child(Topology.class, new TopologyKey(tapiTopoUuid))
+ .child(Link.class, new LinkKey(link.getUuid())).build();
+ Link linkblr = new LinkBuilder().setUuid(link.getUuid())
+ .setAdministrativeState(transformAdminState(mapping.getPortAdminState()))
+ .setOperationalState(transformOperState(mapping.getPortOperState())).build();
+ this.networkTransactionService.merge(LogicalDatastoreType.OPERATIONAL, linkIID, linkblr);
}
}
this.networkTransactionService.commit().get();
for (OwnedNodeEdgePoint onep : oneps) {
changedOneps.add(onep.getUuid());
updateSips(mapping, onep);
+ CepList cepList = getUpdatedCeps(mapping, onep);
InstanceIdentifier<OwnedNodeEdgePoint> onepIID = InstanceIdentifier.builder(Context.class)
.augmentation(Context1.class).child(TopologyContext.class)
.child(Topology.class, new TopologyKey(tapiTopoUuid))
.child(OwnedNodeEdgePoint.class, new OwnedNodeEdgePointKey(onep.getUuid()))
.build();
OwnedNodeEdgePoint onepblr = new OwnedNodeEdgePointBuilder().setUuid(onep.getUuid())
+ .addAugmentation(new OwnedNodeEdgePoint1Builder().setCepList(cepList).build())
.setAdministrativeState(transformAdminState(mapping.getPortAdminState()))
.setOperationalState(transformOperState(mapping.getPortOperState())).build();
this.networkTransactionService.merge(LogicalDatastoreType.OPERATIONAL, onepIID, onepblr);
return changedOneps;
}
+ private CepList getUpdatedCeps(Mapping mapping, OwnedNodeEdgePoint onep) {
+ OwnedNodeEdgePoint1 onep1 = onep.augmentation(OwnedNodeEdgePoint1.class);
+ Map<ConnectionEndPointKey, ConnectionEndPoint> cepMap = new HashMap<>();
+ if (onep1 != null && onep1.getCepList() != null && onep1.getCepList().getConnectionEndPoint() != null) {
+ for (Map.Entry<ConnectionEndPointKey, ConnectionEndPoint> entry : onep1.getCepList().getConnectionEndPoint()
+ .entrySet()) {
+ ConnectionEndPoint cep = new ConnectionEndPointBuilder(entry.getValue())
+ .setOperationalState(transformOperState(mapping.getPortOperState())).build();
+ cepMap.put(entry.getKey(), cep);
+ }
+ }
+ return new CepListBuilder().setConnectionEndPoint(cepMap).build();
+ }
+
private List<Uuid> getChangedNodeUuids(String nodeId, Mapping mapping) {
List<Uuid> uuids = new ArrayList<>();
if (nodeId.contains("ROADM")) {
xpdrNetMaps.get(i).getLogicalConnectionPoint()))
.build();
- List<Class<? extends SupportedIfCapability>> newSupIfCapList =
+ List<SupportedIfCapability> newSupIfCapList =
new ArrayList<>(xpdrNetMaps.get(i).getSupportedInterfaceCapability());
OwnedNodeEdgePoint onep = createNep(nepUuid1, xpdrNetMaps.get(i).getLogicalConnectionPoint(),
xpdrNetMaps.get(i).getLogicalConnectionPoint()))
.build();
- List<Class<? extends SupportedIfCapability>> newSupIfCapList =
- new ArrayList<>(xpdrNetMaps.get(i).getSupportedInterfaceCapability());
+ List<SupportedIfCapability> newSupIfCapList =
+ new ArrayList<>(xpdrNetMaps.get(i).getSupportedInterfaceCapability());
OwnedNodeEdgePoint onep = createNep(nepUuid2, xpdrNetMaps.get(i).getLogicalConnectionPoint(),
Map.of(onedName.key(), onedName), LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA,
xpdrNetMaps.get(i).getLogicalConnectionPoint()))
.build();
- List<Class<? extends SupportedIfCapability>> newSupIfCapList =
+ List<SupportedIfCapability> newSupIfCapList =
new ArrayList<>(xpdrNetMaps.get(i).getSupportedInterfaceCapability());
OwnedNodeEdgePoint onep = createNep(nepUuid3, xpdrNetMaps.get(i).getLogicalConnectionPoint(),
name = nameBldr.setValueName("NodeEdgePoint_C").build();
}
- List<Class<? extends SupportedIfCapability>> newSupIfCapList =
+ List<SupportedIfCapability> newSupIfCapList =
new ArrayList<>(xpdrClMaps.get(i).getSupportedInterfaceCapability());
OwnedNodeEdgePoint onep = createNep(nepUuid, xpdrClMaps.get(i).getLogicalConnectionPoint(),
xpdrNetMaps.get(i).getLogicalConnectionPoint()))
.build();
- List<Class<? extends SupportedIfCapability>> newSupIfCapList =
+ List<SupportedIfCapability> newSupIfCapList =
new ArrayList<>(xpdrNetMaps.get(i).getSupportedInterfaceCapability());
OwnedNodeEdgePoint onep = createNep(nepUuid, xpdrNetMaps.get(i).getLogicalConnectionPoint(),
xpdrClMaps.get(i).getLogicalConnectionPoint()))
.build();
- List<Class<? extends SupportedIfCapability>> newSupIfCapList =
+ List<SupportedIfCapability> newSupIfCapList =
new ArrayList<>(xpdrClMaps.get(i).getSupportedInterfaceCapability());
OwnedNodeEdgePoint onep = createNep(nepUuid, xpdrClMaps.get(i).getLogicalConnectionPoint(),
private OwnedNodeEdgePoint createNep(Uuid nepUuid, String tpid, Map<NameKey, Name> nepNames,
LayerProtocolName nepProtocol, LayerProtocolName nodeProtocol, boolean withSip,
String keyword,
- List<Class<? extends SupportedIfCapability>> supportedInterfaceCapability,
+ List<SupportedIfCapability> supportedInterfaceCapability,
OperationalState operState, AdministrativeState adminState) {
OwnedNodeEdgePointBuilder onepBldr = new OwnedNodeEdgePointBuilder()
.setUuid(nepUuid)
.setUuid(nepUuid)
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName.key(), nepName))
- .setSupportedCepLayerProtocolQualifier(Set.of(PHOTONICLAYERQUALIFIEROMS.class))
+ .setSupportedCepLayerProtocolQualifier(Set.of(PHOTONICLAYERQUALIFIEROMS.VALUE))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(adminState).setOperationalState(operState)
.setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
.setUuid(nepUuid1)
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName1.key(), nepName1))
- .setSupportedCepLayerProtocolQualifier(Set.of(PHOTONICLAYERQUALIFIEROMS.class))
+ .setSupportedCepLayerProtocolQualifier(Set.of(PHOTONICLAYERQUALIFIEROMS.VALUE))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(adminState).setOperationalState(operState)
.setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
.setUuid(nepUuid2)
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName2.key(), nepName2))
- .setSupportedCepLayerProtocolQualifier(Set.of(PHOTONICLAYERQUALIFIEROMS.class))
+ .setSupportedCepLayerProtocolQualifier(Set.of(PHOTONICLAYERQUALIFIEROMS.VALUE))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(adminState).setOperationalState(operState)
.setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
private Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint>
createMSIP(int nb, LayerProtocolName layerProtocol, String tpid, String nodeid,
- List<Class<? extends SupportedIfCapability>> supportedInterfaceCapability,
+ List<SupportedIfCapability> supportedInterfaceCapability,
OperationalState operState, AdministrativeState adminState) {
Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> msipl = new HashMap<>();
for (int i = 0; i < nb; i++) {
}
private ServiceInterfacePoint createSIP(Uuid sipUuid, LayerProtocolName layerProtocol, String tpid, String nodeid,
- List<Class<? extends SupportedIfCapability>> supportedInterfaceCapability,
+ List<SupportedIfCapability> supportedInterfaceCapability,
OperationalState operState, AdministrativeState adminState) {
// TODO: what value should be set in total capacity and available capacity
LOG.info("SIP name = {}", String.join("+", nodeid, tpid));
return nodeRuleGroupMap;
}
- private Set<Class<? extends LAYERPROTOCOLQUALIFIER>> createSupportedLayerProtocolQualifier(
- List<Class<? extends SupportedIfCapability>> sicList, LayerProtocolName lpn) {
+ private Set<LAYERPROTOCOLQUALIFIER> createSupportedLayerProtocolQualifier(
+ List<SupportedIfCapability> sicList, LayerProtocolName lpn) {
if (sicList == null) {
- return Set.of(PHOTONICLAYERQUALIFIEROMS.class);
+ return Set.of(PHOTONICLAYERQUALIFIEROMS.VALUE);
}
Map<SupportedInterfaceCapabilityKey, SupportedInterfaceCapability> supIfMap = new HashMap<>();
LOG.info("SIC list = {}", sicList);
- for (Class<? extends SupportedIfCapability> supInterCapa : sicList) {
+ for (SupportedIfCapability supInterCapa : sicList) {
SupportedInterfaceCapability supIfCapa = new SupportedInterfaceCapabilityBuilder()
.withKey(new SupportedInterfaceCapabilityKey(supInterCapa))
.setIfCapType(supInterCapa)
.build();
supIfMap.put(supIfCapa.key(), supIfCapa);
}
- Set<Class<? extends LAYERPROTOCOLQUALIFIER>> sclpqList = new HashSet<>();
+ Set<LAYERPROTOCOLQUALIFIER> sclpqList = new HashSet<>();
for (SupportedInterfaceCapability sic : supIfMap.values()) {
+ String ifCapType = sic.getIfCapType().toString().split("\\{")[0];
switch (lpn.getName()) {
case "DSR":
- switch (sic.getIfCapType().getSimpleName()) {
+ switch (ifCapType) {
// TODO: it may be needed to add more cases clauses if the interface capabilities of a
// port are extended in the config file
case "If1GEODU0":
- sclpqList.add(ODUTYPEODU0.class);
- sclpqList.add(DIGITALSIGNALTYPEGigE.class);
+ sclpqList.add(ODUTYPEODU0.VALUE);
+ sclpqList.add(DIGITALSIGNALTYPEGigE.VALUE);
break;
case "If10GEODU2e":
- sclpqList.add(ODUTYPEODU2E.class);
- sclpqList.add(DIGITALSIGNALTYPE10GigELAN.class);
+ sclpqList.add(ODUTYPEODU2E.VALUE);
+ sclpqList.add(DIGITALSIGNALTYPE10GigELAN.VALUE);
break;
case "If10GEODU2":
- sclpqList.add(ODUTYPEODU2.class);
- sclpqList.add(DIGITALSIGNALTYPE10GigELAN.class);
+ sclpqList.add(ODUTYPEODU2.VALUE);
+ sclpqList.add(DIGITALSIGNALTYPE10GigELAN.VALUE);
break;
case "If10GE":
- sclpqList.add(DIGITALSIGNALTYPE10GigELAN.class);
+ sclpqList.add(DIGITALSIGNALTYPE10GigELAN.VALUE);
break;
case "If100GEODU4":
- sclpqList.add(DIGITALSIGNALTYPE100GigE.class);
- sclpqList.add(ODUTYPEODU4.class);
+ sclpqList.add(DIGITALSIGNALTYPE100GigE.VALUE);
+ sclpqList.add(ODUTYPEODU4.VALUE);
break;
case "If100GE":
- sclpqList.add(DIGITALSIGNALTYPE100GigE.class);
+ sclpqList.add(DIGITALSIGNALTYPE100GigE.VALUE);
break;
case "IfOCHOTU4ODU4":
case "IfOCH":
- sclpqList.add(ODUTYPEODU4.class);
+ sclpqList.add(ODUTYPEODU4.VALUE);
break;
default:
LOG.error("IfCapability type not managed");
}
break;
case "ODU":
- switch (sic.getIfCapType().getSimpleName()) {
+ switch (ifCapType) {
// TODO: it may be needed to add more cases clauses if the interface capabilities of a
// port are extended in the config file
case "If1GEODU0":
- sclpqList.add(ODUTYPEODU0.class);
+ sclpqList.add(ODUTYPEODU0.VALUE);
break;
case "If10GEODU2e":
- sclpqList.add(ODUTYPEODU2E.class);
+ sclpqList.add(ODUTYPEODU2E.VALUE);
break;
case "If10GEODU2":
case "If10GE":
- sclpqList.add(ODUTYPEODU2.class);
+ sclpqList.add(ODUTYPEODU2.VALUE);
break;
case "If100GEODU4":
case "If100GE":
case "IfOCHOTU4ODU4":
case "IfOCH":
- sclpqList.add(ODUTYPEODU4.class);
+ sclpqList.add(ODUTYPEODU4.VALUE);
break;
default:
LOG.error("IfCapability type not managed");
}
break;
case "PHOTONIC_MEDIA":
- if (sic.getIfCapType().getSimpleName().equals("IfOCHOTU4ODU4")
- || sic.getIfCapType().getSimpleName().equals("IfOCH")) {
- sclpqList.add(PHOTONICLAYERQUALIFIEROTSi.class);
- sclpqList.add(PHOTONICLAYERQUALIFIEROMS.class);
+ if (ifCapType.equals("IfOCHOTU4ODU4") || ifCapType.equals("IfOCH")) {
+ sclpqList.add(PHOTONICLAYERQUALIFIEROTSi.VALUE);
+ sclpqList.add(PHOTONICLAYERQUALIFIEROMS.VALUE);
}
break;
default: