Search in sources :

Example 6 with NeighborsKey

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);
}
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)

Example 7 with NeighborsKey

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);
}
Also used : AddressFamilies(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.AddressFamilies) AddressFamiliesKey(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.AddressFamiliesKey) 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)

Example 8 with NeighborsKey

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);
}
Also used : 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)8 NeighborsKey (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.NeighborsKey)8 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)8 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)8 Bgp (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.Bgp)2 AddressFamilies (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.AddressFamilies)2 AddressFamiliesKey (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.AddressFamiliesKey)2 EbgpMultihop (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.EbgpMultihop)2 UpdateSource (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.UpdateSource)2 NeighborsBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.NeighborsBuilder)1 AddressFamiliesBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.AddressFamiliesBuilder)1 EbgpMultihopBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.EbgpMultihopBuilder)1 UpdateSourceBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.UpdateSourceBuilder)1 TcpSecurityOption (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.tcp.security.option.grouping.TcpSecurityOption)1 TcpMd5SignatureOptionBuilder (org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.tcp.security.option.grouping.tcp.security.option.TcpMd5SignatureOptionBuilder)1