+ private boolean isTpWithGoodCapabilities(
+ org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node
+ .TerminationPoint tp) {
+ Mapping mapping = this.portMapping.getMapping(deviceNodeId, tp.getTpId().getValue());
+ if (mapping == null || mapping.getSupportedInterfaceCapability() == null) {
+ return true;
+ }
+ switch (this.serviceType) {
+ case "400GE":
+ if (mapping.getSupportedInterfaceCapability().contains(IfOTUCnODUCn.class)) {
+ return true;
+ } else {
+ return false;
+ }
+ case "100GE":
+ if (mapping.getSupportedInterfaceCapability().contains(
+ org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev181019.IfOCH.class)
+ || mapping.getSupportedInterfaceCapability().contains(IfOCH.class)) {
+ return true;
+ } else {
+ return false;
+ }
+ default:
+ return true;
+ }
+ }
+