Class BasicHostConfig
- java.lang.Object
-
- org.onosproject.net.config.Config<S>
-
- org.onosproject.net.config.basics.AllowedEntityConfig<S>
-
- org.onosproject.net.config.basics.BasicElementConfig<HostId>
-
- org.onosproject.net.config.basics.BasicHostConfig
-
public final class BasicHostConfig extends BasicElementConfig<HostId>
Basic configuration for network end-station hosts.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.onosproject.net.config.Config
Config.FieldPresence
-
-
Field Summary
-
Fields inherited from class org.onosproject.net.config.basics.BasicElementConfig
GRID_X, GRID_Y, LATITUDE, LOC_TYPE, LOC_TYPE_GEO, LOC_TYPE_GRID, LOC_TYPE_NONE, LONGITUDE, NAME, OWNER, RACK_ADDRESS, ROLES, UI_TYPE, ZERO_THRESHOLD
-
Fields inherited from class org.onosproject.net.config.basics.AllowedEntityConfig
ALLOWED
-
-
Constructor Summary
Constructors Constructor Description BasicHostConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<HostLocation>auxLocations()Returns the auxLocations of the host.VlanIdinnerVlan()java.util.Set<IpAddress>ipAddresses()Returns IP addresses of the host.booleanisValid()Indicates whether or not the backing JSON node contains valid data.java.util.Set<HostLocation>locations()Returns the location of the host.java.lang.Stringname()Returns friendly label for the element.EthTypeouterTpid()BasicHostConfigsetAuxLocations(java.util.Set<HostLocation> auxLocations)Sets the auxLocations of the host.BasicHostConfigsetInnerVlan(VlanId vlanId)BasicHostConfigsetIps(java.util.Set<IpAddress> ipAddresses)Sets the IP addresses of the host.BasicHostConfigsetLocations(java.util.Set<HostLocation> locations)Sets the location of the host.BasicHostConfigsetOuterTpid(EthType tpid)-
Methods inherited from class org.onosproject.net.config.basics.BasicElementConfig
geoCoordsSet, gridCoordsSet, gridX, gridX, gridY, gridY, latitude, latitude, locType, locType, longitude, longitude, name, owner, owner, rackAddress, rackAddress, roles, roles, uiType, uiType
-
Methods inherited from class org.onosproject.net.config.basics.AllowedEntityConfig
isAllowed, isAllowed
-
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, isValidLength, key, node, setList, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subject, toString
-
-
-
-
Method Detail
-
isValid
public boolean isValid()
Description copied from class:ConfigIndicates whether or not the backing JSON node contains valid data.Default implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid.
- Overrides:
isValidin classBasicElementConfig<HostId>- Returns:
- true if the data is valid; false otherwise
-
name
public java.lang.String name()
Description copied from class:BasicElementConfigReturns friendly label for the element. If not set, returns the element identifier.- Overrides:
namein classBasicElementConfig<HostId>- Returns:
- friendly label or element identifier itself if not set
-
locations
public java.util.Set<HostLocation> locations()
Returns the location of the host.- Returns:
- location of the host or null if none specified
- Throws:
java.lang.IllegalArgumentException- if locations are set but empty or not specified with correct format
-
auxLocations
public java.util.Set<HostLocation> auxLocations()
Returns the auxLocations of the host.- Returns:
- auxLocations of the host or null if none specified
- Throws:
java.lang.IllegalArgumentException- if auxLocations are set but empty or not specified with correct format
-
setLocations
public BasicHostConfig setLocations(java.util.Set<HostLocation> locations)
Sets the location of the host.- Parameters:
locations- location of the host or null to unset- Returns:
- the config of the host
-
setAuxLocations
public BasicHostConfig setAuxLocations(java.util.Set<HostLocation> auxLocations)
Sets the auxLocations of the host.- Parameters:
auxLocations- auxLocations of the host or null to unset- Returns:
- the config of the host
-
ipAddresses
public java.util.Set<IpAddress> ipAddresses()
Returns IP addresses of the host.- Returns:
- IP addresses of the host or null if not set
- Throws:
java.lang.IllegalArgumentException- if not specified with correct format
-
setIps
public BasicHostConfig setIps(java.util.Set<IpAddress> ipAddresses)
Sets the IP addresses of the host.- Parameters:
ipAddresses- IP addresses of the host or null to unset- Returns:
- the config of the host
-
innerVlan
public VlanId innerVlan()
-
setInnerVlan
public BasicHostConfig setInnerVlan(VlanId vlanId)
-
outerTpid
public EthType outerTpid()
-
setOuterTpid
public BasicHostConfig setOuterTpid(EthType tpid)
-
-