use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.linkstate.attribute.UnreservedBandwidthBuilder in project bgpcep by opendaylight.
the class LinkAttributesParser method parseUnreservedBandwidth.
private static void parseUnreservedBandwidth(final ByteBuf value, final LinkAttributesBuilder builder) {
final List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev171207.linkstate.attribute.UnreservedBandwidth> unreservedBandwidth = new ArrayList<>(UNRESERVED_BW_COUNT);
for (int i = 0; i < UNRESERVED_BW_COUNT; i++) {
final ByteBuf v = value.readSlice(BANDWIDTH_LENGTH);
unreservedBandwidth.add(new UnreservedBandwidthBuilder().setBandwidth(new Bandwidth(ByteArray.readAllBytes(v))).setPriority((short) i).build());
}
builder.setUnreservedBandwidth(unreservedBandwidth);
LOG.debug("Parsed Unreserved Bandwidth {}", builder.getUnreservedBandwidth());
}
Aggregations