Search in sources :

Example 1 with UpdateSourceBuilder

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

the class BgpConfigurationManager method addUpdateSource.

// public addNeighbor(nbrIp, remoteAs, md5Secret)
public void addUpdateSource(String nbrIp, String srcIp) {
    Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
    Ipv4Address srcAddr = new Ipv4Address(srcIp);
    InstanceIdentifier.InstanceIdentifierBuilder<UpdateSource> iib = InstanceIdentifier.builder(Bgp.class).child(Neighbors.class, new NeighborsKey(nbrAddr)).child(UpdateSource.class);
    InstanceIdentifier<UpdateSource> iid = iib.build();
    UpdateSource dto = new UpdateSourceBuilder().setPeerIp(nbrAddr).setSourceIp(srcAddr).build();
    update(iid, dto);
}
Also used : UpdateSourceBuilder(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.UpdateSourceBuilder) Neighbors(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.Neighbors) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) NeighborsKey(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.NeighborsKey) Ipv4Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address) UpdateSource(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.UpdateSource)

Aggregations

Neighbors (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.Neighbors)1 NeighborsKey (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.NeighborsKey)1 UpdateSource (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.UpdateSource)1 UpdateSourceBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.UpdateSourceBuilder)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