use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.pcrep.message.pcrep.message.replies.result.SuccessCase in project bgpcep by opendaylight.
the class PCEPReplyMessageParser method serializeReply.
protected void serializeReply(final Replies reply, final ByteBuf buffer) {
serializeObject(reply.getRp(), buffer);
serializeMonitoring(reply, buffer);
serializeVendorInformationObjects(reply.getVendorInformationObject(), buffer);
if (reply.getResult() == null) {
return;
}
if (reply.getResult() instanceof FailureCase) {
final FailureCase f = (FailureCase) reply.getResult();
serializeFailure(f, buffer);
return;
}
final SuccessCase s = (SuccessCase) reply.getResult();
serializeSuccess(s, buffer);
serializeMonitoringMetrics(reply, buffer);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.pcrep.message.pcrep.message.replies.result.SuccessCase in project bgpcep by opendaylight.
the class PCEPReplyMessageParser method serializeSuccess.
private void serializeSuccess(final SuccessCase success, final ByteBuf buffer) {
if (success == null || success.getSuccess() == null) {
return;
}
for (final Paths p : success.getSuccess().nonnullPaths()) {
serializeObject(p.getEro(), buffer);
serializeObject(p.getLspa(), buffer);
serializeObject(p.getOf(), buffer);
serializeObject(p.getBandwidth(), buffer);
for (final Metrics m : p.nonnullMetrics()) {
serializeObject(m.getMetric(), buffer);
}
serializeObject(p.getIro(), buffer);
}
serializeVendorInformationObjects(success.getSuccess().getVendorInformationObject(), buffer);
}
Aggregations