Search in sources :

Example 1 with AsIdBuilder

use of org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.AsIdBuilder in project netvirt by opendaylight.

the class BgpConfigurationManager method startBgp.

public void startBgp(long as, String routerId, int spt, boolean fbit) {
    IpAddress rid = routerId == null ? null : new IpAddress(routerId.toCharArray());
    Long staleTime = (long) spt;
    InstanceIdentifier.InstanceIdentifierBuilder<AsId> iib = InstanceIdentifier.builder(Bgp.class).child(AsId.class);
    InstanceIdentifier<AsId> iid = iib.build();
    AsId dto = new AsIdBuilder().setLocalAs(as).setRouterId(rid).setStalepathTime(staleTime).setAnnounceFbit(fbit).build();
    update(iid, dto);
}
Also used : AsId(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.AsId) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) Bgp(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.Bgp) AsIdBuilder(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.AsIdBuilder)

Aggregations

Bgp (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.Bgp)1 AsId (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.AsId)1 AsIdBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.AsIdBuilder)1 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)1 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)1