Search in sources :

Example 1 with EbgpMultihopBuilder

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

the class BgpConfigurationManager method addEbgpMultihop.

public void addEbgpMultihop(String nbrIp, int hops) {
    Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
    InstanceIdentifier.InstanceIdentifierBuilder<EbgpMultihop> iib = InstanceIdentifier.builder(Bgp.class).child(NeighborsContainer.class).child(Neighbors.class, new NeighborsKey(nbrAddr)).child(EbgpMultihop.class);
    InstanceIdentifier<EbgpMultihop> iid = iib.build();
    EbgpMultihop dto = new EbgpMultihopBuilder().setPeerIp(nbrAddr).setNhops((long) hops).build();
    update(iid, dto);
}
Also used : EbgpMultihop(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.neighbors.EbgpMultihop) Neighbors(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.Neighbors) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) Bgp(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.Bgp) EbgpMultihopBuilder(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.neighbors.EbgpMultihopBuilder) NeighborsKey(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.NeighborsKey) Ipv4Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)

Aggregations

Bgp (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.Bgp)1 Neighbors (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.Neighbors)1 NeighborsKey (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.NeighborsKey)1 EbgpMultihop (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.neighbors.EbgpMultihop)1 EbgpMultihopBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighborscontainer.neighbors.EbgpMultihopBuilder)1 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)1 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)1