Search in sources :

Example 6 with BgpPeerCfg

use of org.onosproject.bgp.controller.BgpPeerCfg in project onos by opennetworkinglab.

the class BgpConfig method connectPeer.

@Override
public boolean connectPeer(String routerid) {
    BgpPeerCfg lspeer = this.bgpPeerTree.get(routerid);
    if (lspeer != null) {
        lspeer.setSelfInnitConnection(true);
        if (lspeer.connectPeer() == null) {
            connectPeer = new BgpConnectPeerImpl(bgpController, routerid, Controller.BGP_PORT_NUM);
            lspeer.setConnectPeer(connectPeer);
            connectPeer.connectPeer();
            peerList.add((BgpConnectPeerImpl) connectPeer);
        }
        return true;
    }
    return false;
}
Also used : BgpPeerCfg(org.onosproject.bgp.controller.BgpPeerCfg)

Aggregations

BgpPeerCfg (org.onosproject.bgp.controller.BgpPeerCfg)6 Entry (java.util.Map.Entry)1 BgpPeer (org.onosproject.bgp.controller.BgpPeer)1 BgpValueType (org.onosproject.bgpio.types.BgpValueType)1