use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.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.rev131005.pcrep.message.pcrep.message.replies.result.SuccessCase in project bgpcep by opendaylight.
the class PCEPReplyMessageParser method serializeSuccess.
private void serializeSuccess(final SuccessCase s, final ByteBuf buffer) {
if (s == null || s.getSuccess() == null) {
return;
}
for (final Paths p : s.getSuccess().getPaths()) {
serializeObject(p.getEro(), buffer);
serializeObject(p.getLspa(), buffer);
serializeObject(p.getOf(), buffer);
serializeObject(p.getBandwidth(), buffer);
if (p.getMetrics() != null) {
for (final Metrics m : p.getMetrics()) {
serializeObject(m.getMetric(), buffer);
}
}
serializeObject(p.getIro(), buffer);
}
serializeVendorInformationObjects(s.getSuccess().getVendorInformationObject(), buffer);
}
Aggregations