use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.path.key.object.PathKey in project bgpcep by opendaylight.
the class PathKeyUtilsTest method setUp.
@Before
public void setUp() {
this.key1 = new PathKeyBuilder().build();
this.key2 = new PathKeyBuilder().setPathKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.PathKey(Uint16.ONE)).build();
this.key3 = new PathKeyBuilder().setPathKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.PathKey(Uint16.ONE)).setPceId(new PceId(new byte[] { 2, 3, 4, 5 })).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.path.key.object.PathKey in project bgpcep by opendaylight.
the class PathKeyUtils method serializePathKey.
public static ByteBuf serializePathKey(final PathKeySubobject pk) {
final ByteBuf body = Unpooled.buffer();
final PathKey pathKey = pk.getPathKey();
checkArgument(pathKey != null, "PathKey is mandatory.");
ByteBufUtils.write(body, pathKey.getValue());
final PceId pceId = pk.getPceId();
checkArgument(pceId != null, "PceId is mandatory.");
body.writeBytes(pceId.getValue());
return body;
}
Aggregations