package org.opendaylight.transportpce.pce.networkanalyzer;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import org.opendaylight.yang.gen.v1.http.org.openroadm.link.rev200529.span.attributes.LinkConcatenationKey;
import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev200529.networks.network.link.oms.attributes.Span;
import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmLinkType;
-import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.OtnLinkType;
+import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev220123.OtnLinkType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final OpenroadmLinkType linkType;
private final NodeId sourceId;
private final NodeId destId;
- private transient Object sourceTP;
- private transient Object destTP;
+ private final TpId sourceTP;
+ private final TpId destTP;
private final String sourceNetworkSupNodeId;
private final String destNetworkSupNodeId;
private final String sourceCLLI;
return state;
}
- public Object getSourceTP() {
+ public TpId getSourceTP() {
return sourceTP;
}
- public Object getDestTP() {
+ public TpId getDestTP() {
return destTP;
}
}
OtnLinkType otnLinkType = link
- .augmentation(org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.Link1.class)
+ .augmentation(org.opendaylight.yang.gen.v1.http.transportpce.topology.rev220123.Link1.class)
.getOtnLinkType();
if (this.availableBandwidth == 0L) {
LOG.error("PceLink: No bandwidth available for OTN Link, link {} is ignored ", linkId);
long neededBW;
OtnLinkType neededType = null;
switch (serviceType) {
-
+ case "ODUC4":
+ if (this.usedBandwidth != 0L) {
+ return false;
+ }
+ neededBW = 400000L;
+ neededType = OtnLinkType.OTUC4;
+ break;
case "ODU4":
+ case "100GEs":
if (this.usedBandwidth != 0L) {
return false;
}
case "ODU1":
neededBW = 2500L;
break;
+ case "100GEm":
+ neededBW = 100000L;
+ neededType = OtnLinkType.ODUC4;
+ break;
case "10GE":
neededBW = 10000L;
neededType = OtnLinkType.ODTU4;
public String toString() {
return "PceLink type=" + linkType + " ID=" + linkId.getValue() + " latency=" + latency;
}
-
- private void writeObject(ObjectOutputStream out) throws IOException {
- out.defaultWriteObject();
- out.writeObject(this.sourceTP);
- out.writeObject(this.destTP);
- }
-
- private void readObject(ObjectInputStream in) throws IOException,ClassNotFoundException {
- in.defaultReadObject();
- this.sourceTP = in.readObject();
- this.destTP = in.readObject();
- }
}