Package org.onosproject.routing.config
Class BgpConfig
- java.lang.Object
-
- org.onosproject.net.config.Config<ApplicationId>
-
- org.onosproject.routing.config.BgpConfig
-
public class BgpConfig extends Config<ApplicationId>
Configuration object for BGP config.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBgpConfig.BgpSpeakerConfigConfiguration for a BGP speaker.-
Nested classes/interfaces inherited from class org.onosproject.net.config.Config
Config.FieldPresence
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONNECT_POINTstatic java.lang.StringNAMEstatic java.lang.StringPEERSstatic java.lang.StringSPEAKERSstatic java.lang.StringVLAN
-
Constructor Summary
Constructors Constructor Description BgpConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPeerToSpeaker(java.lang.String speakerName, IpAddress peerAddress)Adds peering address to BGP speaker.voidaddSpeaker(BgpConfig.BgpSpeakerConfig speaker)Adds a BGP speaker to the configuration.java.util.Set<BgpConfig.BgpSpeakerConfig>bgpSpeakers()Gets the set of configured BGP speakers.BgpConfig.BgpSpeakerConfiggetSpeakerFromPeer(IpAddress peerAddress)Finds BGP speaker peering with a given external peer.BgpConfig.BgpSpeakerConfiggetSpeakerWithName(java.lang.String name)Examines whether a name of BGP speaker exists in configuration.voidremovePeerFromSpeaker(BgpConfig.BgpSpeakerConfig speaker, IpAddress peerAddress)Removes peering address from BGP speaker.voidremoveSpeaker(java.lang.String speakerName)Removes BGP speaker from configuration.-
Methods inherited from class org.onosproject.net.config.Config
apply, clear, get, get, get, get, get, get, getList, getList, hasField, hasField, hasFields, hasFields, hasOnlyFields, hasOnlyFields, init, isBoolean, isBoolean, isConnectPoint, isConnectPoint, isDecimal, isDecimal, isIntegralNumber, isIntegralNumber, isIpAddress, isIpAddress, isIpPrefix, isIpPrefix, isMacAddress, isMacAddress, isNumber, isNumber, isString, isString, isTpPort, isTpPort, isValid, isValidLength, key, node, setList, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subject, toString
-
-
-
-
Field Detail
-
SPEAKERS
public static final java.lang.String SPEAKERS
- See Also:
- Constant Field Values
-
CONNECT_POINT
public static final java.lang.String CONNECT_POINT
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
PEERS
public static final java.lang.String PEERS
- See Also:
- Constant Field Values
-
VLAN
public static final java.lang.String VLAN
- See Also:
- Constant Field Values
-
-
Method Detail
-
bgpSpeakers
public java.util.Set<BgpConfig.BgpSpeakerConfig> bgpSpeakers()
Gets the set of configured BGP speakers.- Returns:
- BGP speakers
-
getSpeakerWithName
public BgpConfig.BgpSpeakerConfig getSpeakerWithName(java.lang.String name)
Examines whether a name of BGP speaker exists in configuration.- Parameters:
name- the name of BGP speaker being search- Returns:
- the BGP speaker
-
addSpeaker
public void addSpeaker(BgpConfig.BgpSpeakerConfig speaker)
Adds a BGP speaker to the configuration.- Parameters:
speaker- the BGP speaker configuration entry
-
removeSpeaker
public void removeSpeaker(java.lang.String speakerName)
Removes BGP speaker from configuration.- Parameters:
speakerName- BGP speaker name
-
addPeerToSpeaker
public void addPeerToSpeaker(java.lang.String speakerName, IpAddress peerAddress)Adds peering address to BGP speaker.- Parameters:
speakerName- name of BGP speakerpeerAddress- peering address to be added
-
getSpeakerFromPeer
public BgpConfig.BgpSpeakerConfig getSpeakerFromPeer(IpAddress peerAddress)
Finds BGP speaker peering with a given external peer.- Parameters:
peerAddress- BGP peer address- Returns:
- BGP speaker
-
removePeerFromSpeaker
public void removePeerFromSpeaker(BgpConfig.BgpSpeakerConfig speaker, IpAddress peerAddress)
Removes peering address from BGP speaker.- Parameters:
speaker- BGP speaker configuration entriespeerAddress- peering address to be removed
-
-