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 class
BgpConfig.BgpSpeakerConfig
Configuration for a BGP speaker.-
Nested classes/interfaces inherited from class org.onosproject.net.config.Config
Config.FieldPresence
-
-
Constructor Summary
Constructors Constructor Description BgpConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPeerToSpeaker(String speakerName, IpAddress peerAddress)
Adds peering address to BGP speaker.void
addSpeaker(BgpConfig.BgpSpeakerConfig speaker)
Adds a BGP speaker to the configuration.Set<BgpConfig.BgpSpeakerConfig>
bgpSpeakers()
Gets the set of configured BGP speakers.BgpConfig.BgpSpeakerConfig
getSpeakerFromPeer(IpAddress peerAddress)
Finds BGP speaker peering with a given external peer.BgpConfig.BgpSpeakerConfig
getSpeakerWithName(String name)
Examines whether a name of BGP speaker exists in configuration.void
removePeerFromSpeaker(BgpConfig.BgpSpeakerConfig speaker, IpAddress peerAddress)
Removes peering address from BGP speaker.void
removeSpeaker(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 String SPEAKERS
- See Also:
- Constant Field Values
-
CONNECT_POINT
public static final String CONNECT_POINT
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
PEERS
public static final String PEERS
- See Also:
- Constant Field Values
-
VLAN
public static final String VLAN
- See Also:
- Constant Field Values
-
-
Method Detail
-
bgpSpeakers
public Set<BgpConfig.BgpSpeakerConfig> bgpSpeakers()
Gets the set of configured BGP speakers.- Returns:
- BGP speakers
-
getSpeakerWithName
public BgpConfig.BgpSpeakerConfig getSpeakerWithName(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(String speakerName)
Removes BGP speaker from configuration.- Parameters:
speakerName
- BGP speaker name
-
addPeerToSpeaker
public void addPeerToSpeaker(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
-
-