import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.IsisAreaIdentifier;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.link.attributes.IgpLinkAttributesBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.IgpNodeAttributesBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.igp.node.attributes.PrefixBuilder;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.Prefix1;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.Prefix1Builder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.link.attributes.OspfLinkAttributesBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.node.attributes.OspfNodeAttributesBuilder;
case Static:
case Ospf:
if (pa != null && pa.getOspfForwardingAddress() != null) {
- pb.addAugmentation(Prefix1.class, new Prefix1Builder().setOspfPrefixAttributes(
+ pb.addAugmentation(new Prefix1Builder().setOspfPrefixAttributes(
new OspfPrefixAttributesBuilder().setForwardingAddress(pa.getOspfForwardingAddress()
.getIpv4AddressNoZone()).build()).build());
}
case Static:
case IsisLevel1:
case IsisLevel2:
- inab.addAugmentation(
- org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021
- .IgpNodeAttributes1.class, isisNodeAttributes(nd, na));
+ inab.addAugmentation(isisNodeAttributes(nd, na));
break;
case Ospf:
- inab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021
- .IgpNodeAttributes1.class, ospfNodeAttributes(nd, na));
+ inab.addAugmentation(ospfNodeAttributes(nd, na));
break;
default:
break;
case Static:
case IsisLevel1:
case IsisLevel2:
- ilab.addAugmentation(
- org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021
- .IgpLinkAttributes1.class, isisLinkAttributes(ld.getMultiTopologyId(), la));
+ ilab.addAugmentation(isisLinkAttributes(ld.getMultiTopologyId(), la));
break;
case OspfV3:
case Ospf:
- ilab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021
- .IgpLinkAttributes1.class, ospfLinkAttributes(ld.getMultiTopologyId(), la));
+ ilab.addAugmentation(ospfLinkAttributes(ld.getMultiTopologyId(), la));
break;
default:
break;
tb.setTeDefaultMetric(la.getTeMetric().getValue());
}
if (la.getUnreservedBandwidth() != null) {
- tb.setUnreservedBandwidth(unreservedBandwidthList(la.getUnreservedBandwidth()));
+ tb.setUnreservedBandwidth(unreservedBandwidthList(la.nonnullUnreservedBandwidth().values()));
}
if (la.getMaxLinkBandwidth() != null) {
tb.setMaxLinkBandwidth(bandwidthToBigDecimal(la.getMaxLinkBandwidth()));
tb.setTeDefaultMetric(la.getTeMetric().getValue());
}
if (la.getUnreservedBandwidth() != null) {
- tb.setUnreservedBandwidth(unreservedBandwidthList(la.getUnreservedBandwidth()));
+ tb.setUnreservedBandwidth(unreservedBandwidthList(la.nonnullUnreservedBandwidth().values()));
}
if (la.getMaxLinkBandwidth() != null) {
tb.setMaxLinkBandwidth(bandwidthToBigDecimal(la.getMaxLinkBandwidth()));
}
private static List<UnreservedBandwidth> unreservedBandwidthList(
- final List<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
+ final Collection<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
.bgp.linkstate.rev200120.UnreservedBandwidth> input) {
final List<UnreservedBandwidth> ret = new ArrayList<>(input.size());