public synchronized void addNeighbor(
String nbrIp, long remoteAs, @Nullable final TcpMd5SignaturePasswordType md5Secret) {
- addNeighborAux(nbrIp, remoteAs, md5Secret);
- } // public addNeighbor(nbrIp, remoteAs, md5Secret)
-
- public synchronized void addNeighbor(String nbrIp, long remoteAs) {
- addNeighborAux(nbrIp, remoteAs, null);
- } // public addNeighbor(nbrIp, remoteAs)
-
- private void addNeighborAux(String nbrIp, long remoteAs, @Nullable final TcpMd5SignaturePasswordType md5Secret) {
Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
InstanceIdentifier.InstanceIdentifierBuilder<Neighbors> iib =
InstanceIdentifier.builder(Bgp.class)
Neighbors dto = new NeighborsBuilder().setAddress(nbrAddr)
.setRemoteAs(remoteAs).setTcpSecurityOption(tcpSecOption).build();
update(iid, dto);
- } // private addNeighborAux(nbrIp, remoteAs, md5Secret)
+ } // public addNeighbor(nbrIp, remoteAs, md5Secret)
public synchronized void addUpdateSource(String nbrIp, String srcIp) {
Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
bcm.delGracefulRestart();
}
- public void addNeighbor(String ipAddress, long asNum) throws TException {
- bcm.addNeighbor(ipAddress, asNum);
- }
-
public void addNeighbor(String ipAddress, long asNum,
@Nullable final TcpMd5SignaturePasswordType md5Password) throws TException {
bcm.addNeighbor(ipAddress, asNum, md5Password);
dispatch(bop);
}
- public synchronized void addNeighbor(String nbrIp, long nbrAsNum) throws TException, BgpRouterException {
- LOGGER.debug("Adding BGP Neighbor {} with as number {} ", nbrIp, nbrAsNum);
- addNeighborAux(nbrIp, nbrAsNum, null);
- }
-
public synchronized void addNeighbor(String nbrIp, long nbrAsNum, @Nullable String md5Secret)
throws TException, BgpRouterException {
- LOGGER.debug("Adding BGP Neighbor {} with as number {} and MD5 secret {}", nbrIp, nbrAsNum, md5Secret);
- addNeighborAux(nbrIp, nbrAsNum, md5Secret);
- } // public addNeighbor( nbrIp, nbrAsNum, md5Secret )
-
- private void addNeighborAux(String nbrIp, long nbrAsNum, @Nullable String md5Secret)
- throws TException, BgpRouterException {
+ if (md5Secret == null) {
+ LOGGER.debug("Adding BGP Neighbor {} with as number {} ", nbrIp, nbrAsNum);
+ } else {
+ LOGGER.debug("Adding BGP Neighbor {} with as number {} and MD5 secret {}", nbrIp, nbrAsNum, md5Secret);
+ }
bop.type = Optype.NBR;
bop.add = true;
bop.strs[0] = nbrIp;
bop.asNumber = nbrAsNum;
bop.strs[1] = md5Secret;
dispatch(bop);
- } // private addNeighborAux
+ } // public addNeighbor( nbrIp, nbrAsNum, md5Secret )
public synchronized void delNeighbor(String nbrIp) throws TException, BgpRouterException {
bop.type = Optype.NBR;