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 Set<HostLocation>
auxLocations()
Returns the auxLocations of the host.VlanId
innerVlan()
Set<IpAddress>
ipAddresses()
Returns IP addresses of the host.boolean
isValid()
Indicates whether or not the backing JSON node contains valid data.Set<HostLocation>
locations()
Returns the location of the host.String
name()
Returns friendly label for the element.EthType
outerTpid()
BasicHostConfig
setAuxLocations(Set<HostLocation> auxLocations)
Sets the auxLocations of the host.BasicHostConfig
setInnerVlan(VlanId vlanId)
BasicHostConfig
setIps(Set<IpAddress> ipAddresses)
Sets the IP addresses of the host.BasicHostConfig
setLocations(Set<HostLocation> locations)
Sets the location of the host.BasicHostConfig
setOuterTpid(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:Config
Indicates 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:
isValid
in classBasicElementConfig<HostId>
- Returns:
- true if the data is valid; false otherwise
-
name
public String name()
Description copied from class:BasicElementConfig
Returns friendly label for the element. If not set, returns the element identifier.- Overrides:
name
in classBasicElementConfig<HostId>
- Returns:
- friendly label or element identifier itself if not set
-
locations
public Set<HostLocation> locations()
Returns the location of the host.- Returns:
- location of the host or null if none specified
- Throws:
IllegalArgumentException
- if locations are set but empty or not specified with correct format
-
auxLocations
public Set<HostLocation> auxLocations()
Returns the auxLocations of the host.- Returns:
- auxLocations of the host or null if none specified
- Throws:
IllegalArgumentException
- if auxLocations are set but empty or not specified with correct format
-
setLocations
public BasicHostConfig setLocations(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(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 Set<IpAddress> ipAddresses()
Returns IP addresses of the host.- Returns:
- IP addresses of the host or null if not set
- Throws:
IllegalArgumentException
- if not specified with correct format
-
setIps
public BasicHostConfig setIps(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)
-
-