use of org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.NeighborsKey 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);
}
use of org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.NeighborsKey in project netvirt by opendaylight.
the class BgpConfigurationManager method delAddressFamily.
public void delAddressFamily(String nbrIp, int afi, int safi) {
Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
InstanceIdentifier.InstanceIdentifierBuilder<AddressFamilies> iib = InstanceIdentifier.builder(Bgp.class).child(Neighbors.class, new NeighborsKey(nbrAddr)).child(AddressFamilies.class, new AddressFamiliesKey((long) afi, (long) safi));
InstanceIdentifier<AddressFamilies> iid = iib.build();
delete(iid);
}
use of org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.NeighborsKey in project netvirt by opendaylight.
the class BgpConfigurationManager method delUpdateSource.
public void delUpdateSource(String nbrIp) {
Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
InstanceIdentifier.InstanceIdentifierBuilder<UpdateSource> iib = InstanceIdentifier.builder(Bgp.class).child(Neighbors.class, new NeighborsKey(nbrAddr)).child(UpdateSource.class);
InstanceIdentifier<UpdateSource> iid = iib.build();
delete(iid);
}
Aggregations