public final class OpticalPortConfig
extends org.onosproject.net.config.Config<org.onosproject.net.ConnectPoint>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_KEY
Configuration key for
OpticalPortConfig. |
static String |
NAME |
static String |
PORT |
static String |
SPEED |
static String |
STATIC_LAMBDA |
static String |
STATIC_PORT |
static String |
TYPE |
| Constructor and Description |
|---|
OpticalPortConfig() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid() |
String |
name()
Returns the port name associated with this port configuration.
|
String |
numberName()
Returns a stringified representation of the port number, configured in
some port types without an alphanumeric name as the port name.
|
OpticalPortConfig |
portName(String name)
Sets the port name, or updates it if already set.
|
OpticalPortConfig |
portNumberName(Long name)
Sets the port name from port number, or updates it if already set.
|
OpticalPortConfig |
portType(org.onosproject.net.Port.Type type)
Sets the port type, or updates it if it's already set.
|
Optional<Integer> |
speed()
Returns the port speed configured for this port.
|
OpticalPortConfig |
speed(Integer bw)
Sets the port speed, or updates it if already set.
|
Optional<Long> |
staticLambda()
Returns the output lambda configured for this port.
|
OpticalPortConfig |
staticLambda(Long index)
Sets the output lambda index, or updates it if already set.
|
String |
staticPort()
Returns the string-representation of name of the output port.
|
OpticalPortConfig |
staticPort(String name)
Sets the output port name, or updates it if already set.
|
org.onosproject.net.Port.Type |
type()
Returns the Enum value representing the type of port.
|
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, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subjectpublic static final String CONFIG_KEY
OpticalPortConfig.public static final String TYPE
public static final String NAME
public static final String PORT
public static final String STATIC_PORT
public static final String STATIC_LAMBDA
public static final String SPEED
public boolean isValid()
isValid in class org.onosproject.net.config.Config<org.onosproject.net.ConnectPoint>public org.onosproject.net.Port.Type type()
public String name()
public String numberName()
public String staticPort()
public Optional<Long> staticLambda()
public Optional<Integer> speed()
public OpticalPortConfig portType(org.onosproject.net.Port.Type type)
type - the port typepublic OpticalPortConfig portName(String name)
name - the port's namepublic OpticalPortConfig portNumberName(Long name)
name - the port number, to be used as namepublic OpticalPortConfig staticPort(String name)
name - the output port's namepublic OpticalPortConfig staticLambda(Long index)
index - the output lambdapublic OpticalPortConfig speed(Integer bw)
bw - the port bandwidth