+ private boolean isTerminationPointAvailable(
+ org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.TerminationPoint1 nttp1) {
+ byte[] availableByteArray = new byte[GridConstant.NB_OCTECTS];
+ Arrays.fill(availableByteArray, (byte) GridConstant.AVAILABLE_SLOT_VALUE);
+ return nttp1 == null || nttp1.getPpAttributes() == null
+ || nttp1.getPpAttributes().getAvailFreqMaps() == null
+ || !nttp1.getPpAttributes().getAvailFreqMaps().containsKey(freqMapKey)
+ || nttp1.getPpAttributes().getAvailFreqMaps().get(freqMapKey).getFreqMap() == null
+ || Arrays.equals(nttp1.getPpAttributes().getAvailFreqMaps().get(freqMapKey).getFreqMap(),
+ availableByteArray);
+ }
+
+ 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":
+ for (Class<? extends SupportedIfCapability> ifCap : mapping.getSupportedInterfaceCapability()) {
+ if (ifCap.equals(IfOtsiOtsigroup.class)) {
+ return true;
+ }
+ }
+ return false;
+ case "100GE":
+ if (mapping.getSupportedInterfaceCapability().contains(IfOCH.class)
+ || mapping.getSupportedInterfaceCapability().contains(IfOCHOTU4ODU4.class)) {
+ return true;
+ } else {
+ return false;
+ }
+ default:
+ return true;
+ }
+ }
+
+ public void initFrequenciesBitSet() {