X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=bgp%2Frib-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fbgp%2Frib%2Fimpl%2FStrictBgpPeerRegistryModule.java;h=f73ed6b7d22a608f33c13755a2dc202fefaa444b;hb=e6d9fbf96737ba5d69a77ac79127b348d13d6a7a;hp=e6d454370712e469d4201fdee353057fbe53cbd3;hpb=662a4449d1e5ff3d87859ea997d0ecaef7cfaac3;p=bgpcep.git diff --git a/bgp/rib-impl/src/main/java/org/opendaylight/controller/config/yang/bgp/rib/impl/StrictBgpPeerRegistryModule.java b/bgp/rib-impl/src/main/java/org/opendaylight/controller/config/yang/bgp/rib/impl/StrictBgpPeerRegistryModule.java index e6d4543707..f73ed6b7d2 100644 --- a/bgp/rib-impl/src/main/java/org/opendaylight/controller/config/yang/bgp/rib/impl/StrictBgpPeerRegistryModule.java +++ b/bgp/rib-impl/src/main/java/org/opendaylight/controller/config/yang/bgp/rib/impl/StrictBgpPeerRegistryModule.java @@ -1,14 +1,14 @@ package org.opendaylight.controller.config.yang.bgp.rib.impl; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import org.opendaylight.protocol.bgp.parser.BGPDocumentedException; -import org.opendaylight.protocol.bgp.parser.BGPSessionListener; import org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry; import org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry; import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionPreferences; -import org.opendaylight.protocol.bgp.rib.impl.spi.ReusableBGPPeer; +import org.opendaylight.protocol.bgp.rib.spi.BGPSessionListener; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.Open; /** * Registry of BGP peers that allows only one connection per 2 peers @@ -45,27 +45,33 @@ public class StrictBgpPeerRegistryModule extends org.opendaylight.controller.con @Override public BGPSessionPreferences getPeerPreferences(final IpAddress ip) { - return global.getPeerPreferences(ip); + return this.global.getPeerPreferences(ip); } @Override - public BGPSessionListener getPeer(final IpAddress ip, final Ipv4Address sourceId, final Ipv4Address remoteId) throws BGPDocumentedException { - return global.getPeer(ip, sourceId, remoteId); + public BGPSessionListener getPeer(final IpAddress ip, final Ipv4Address sourceId, final Ipv4Address remoteId, final Open open) + throws BGPDocumentedException { + return this.global.getPeer(ip, sourceId, remoteId, open); } @Override public boolean isPeerConfigured(final IpAddress ip) { - return global.isPeerConfigured(ip); + return this.global.isPeerConfigured(ip); } @Override public void removePeer(final IpAddress ip) { - global.removePeer(ip); + this.global.removePeer(ip); } @Override - public void addPeer(final IpAddress ip, final ReusableBGPPeer peer, final BGPSessionPreferences preferences) { - global.addPeer(ip, peer, preferences); + public void removePeerSession(final IpAddress ip) { + this.global.removePeerSession(ip); + } + + @Override + public void addPeer(final IpAddress ip, final BGPSessionListener peer, final BGPSessionPreferences preferences) { + this.global.addPeer(ip, peer, preferences); } @Override @@ -75,10 +81,9 @@ public class StrictBgpPeerRegistryModule extends org.opendaylight.controller.con @Override public String toString() { - return Objects.toStringHelper(this) - .add("peers", global) + return MoreObjects.toStringHelper(this) + .add("peers", this.global) .toString(); } } - }