public class BgpConfig extends Config<ApplicationId>
Modifier and Type | Class and Description |
---|---|
static class |
BgpConfig.BgpSpeakerConfig
Configuration for a BGP speaker.
|
Config.FieldPresence
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONNECT_POINT |
static java.lang.String |
NAME |
static java.lang.String |
PEERS |
static java.lang.String |
SPEAKERS |
static java.lang.String |
VLAN |
Constructor and Description |
---|
BgpConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addPeerToSpeaker(java.lang.String speakerName,
IpAddress peerAddress)
Adds peering address to BGP speaker.
|
void |
addSpeaker(BgpConfig.BgpSpeakerConfig speaker)
Adds a BGP speaker to the configuration.
|
java.util.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(java.lang.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(java.lang.String speakerName)
Removes BGP speaker from configuration.
|
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
public static final java.lang.String SPEAKERS
public static final java.lang.String CONNECT_POINT
public static final java.lang.String NAME
public static final java.lang.String PEERS
public static final java.lang.String VLAN
public java.util.Set<BgpConfig.BgpSpeakerConfig> bgpSpeakers()
public BgpConfig.BgpSpeakerConfig getSpeakerWithName(java.lang.String name)
name
- the name of BGP speaker being searchpublic void addSpeaker(BgpConfig.BgpSpeakerConfig speaker)
speaker
- the BGP speaker configuration entrypublic void removeSpeaker(java.lang.String speakerName)
speakerName
- BGP speaker namepublic void addPeerToSpeaker(java.lang.String speakerName, IpAddress peerAddress)
speakerName
- name of BGP speakerpeerAddress
- peering address to be addedpublic BgpConfig.BgpSpeakerConfig getSpeakerFromPeer(IpAddress peerAddress)
peerAddress
- BGP peer addresspublic void removePeerFromSpeaker(BgpConfig.BgpSpeakerConfig speaker, IpAddress peerAddress)
speaker
- BGP speaker configuration entriespeerAddress
- peering address to be removed