@Beta public class InterfaceConfig extends Config<ConnectPoint>
Config.FieldPresence| Modifier and Type | Field and Description |
|---|---|
static String |
IPS |
static String |
MAC |
static String |
NAME |
static String |
VLAN |
| Constructor and Description |
|---|
InterfaceConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterface(Interface intf)
Adds an interface to the config.
|
Set<Interface> |
getInterfaces()
Retrieves all interfaces configured on this port.
|
boolean |
isValid()
Indicates whether or not the backing JSON node contains valid data.
|
void |
removeInterface(String name)
Removes an interface from the 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, key, node, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subjectpublic static final String NAME
public static final String IPS
public static final String MAC
public static final String VLAN
public boolean isValid()
ConfigDefault implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid.
isValid in class Config<ConnectPoint>public Set<Interface> getInterfaces() throws ConfigException
ConfigException - if there is any error in the JSON configpublic void addInterface(Interface intf)
intf - interface to addpublic void removeInterface(String name)
name - name of the interface to remove