use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.Esi in project bgpcep by opendaylight.
the class LacpParser method serializeEsi.
@Override
public Esi serializeEsi(final ContainerNode esi) {
final LacpAutoGeneratedBuilder builder = new LacpAutoGeneratedBuilder();
builder.setCeLacpMacAddress(extractLacpMac(esi));
builder.setCeLacpPortKey(extractPK(esi));
return new LacpAutoGeneratedCaseBuilder().setLacpAutoGenerated(builder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.Esi in project bgpcep by opendaylight.
the class LanParser method serializeEsi.
@Override
public Esi serializeEsi(final ContainerNode esi) {
final LanAutoGeneratedBuilder lanBuilder = new LanAutoGeneratedBuilder();
lanBuilder.setRootBridgeMacAddress(extractBrigeMac(esi));
lanBuilder.setRootBridgePriority(extractBP(esi));
return new LanAutoGeneratedCaseBuilder().setLanAutoGenerated(lanBuilder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.Esi in project bgpcep by opendaylight.
the class MacParser method serializeEsi.
@Override
public Esi serializeEsi(final ContainerNode esi) {
final MacAutoGeneratedBuilder builder = new MacAutoGeneratedBuilder();
builder.setSystemMacAddress(extractSystmeMac(esi));
builder.setLocalDiscriminator(extractUint24LD(esi));
return new MacAutoGeneratedCaseBuilder().setMacAutoGenerated(builder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.Esi in project bgpcep by opendaylight.
the class ASGenParser method serializeEsi.
@Override
public Esi serializeEsi(final ContainerNode esi) {
final AsGeneratedBuilder builder = new AsGeneratedBuilder();
builder.setLocalDiscriminator(extractLD(esi));
builder.setAs(extractAS(esi));
return new AsGeneratedCaseBuilder().setAsGenerated(builder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.Esi in project bgpcep by opendaylight.
the class ASGenParserTest method parserTest.
@Test
public void parserTest() {
final ByteBuf buff = Unpooled.buffer(VALUE_SIZE);
final AsGeneratedCase asGen = new AsGeneratedCaseBuilder().setAsGenerated(new AsGeneratedBuilder().setAs(AS_NUMBER).setLocalDiscriminator(LD).build()).build();
this.parser.serializeEsi(asGen, buff);
assertArrayEquals(RESULT, ByteArray.getAllBytes(buff));
final Esi acResult = this.parser.parseEsi(Unpooled.wrappedBuffer(VALUE));
assertEquals(asGen, acResult);
final ContainerNode cont = createContBuilder(new NodeIdentifier(AsGenerated.QNAME)).addChild(createValueBuilder(AS_MODEL, AS_NID).build()).addChild(createValueBuilder(LD, LD_NID).build()).build();
final Esi acmResult = this.parser.serializeEsi(cont);
assertEquals(asGen, acmResult);
}
Aggregations