Class DeviceInjectionConfig
- java.lang.Object
-
- org.onosproject.net.config.Config<S>
-
- org.onosproject.net.config.BaseConfig<DeviceId>
-
- org.onosproject.net.config.inject.DeviceInjectionConfig
-
- All Implemented Interfaces:
CodecContext
@Beta public class DeviceInjectionConfig extends BaseConfig<DeviceId>
Config to inject a Device.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.onosproject.net.config.Config
Config.FieldPresence
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_KEY
Configuration key forDeviceInjectionConfig
.
-
Constructor Summary
Constructors Constructor Description DeviceInjectionConfig()
Create aDeviceInjectionConfig
.DeviceInjectionConfig(DeviceId did)
Create aDeviceInjectionConfig
for specified Device.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid()
Indicates whether or not the backing JSON node contains valid data.java.lang.String
ports()
java.lang.String
toString()
-
Methods inherited from class org.onosproject.net.config.BaseConfig
codec, decode, getService, mapper
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.codec.CodecContext
decode, encode
-
-
-
-
Field Detail
-
CONFIG_KEY
public static final java.lang.String CONFIG_KEY
Configuration key forDeviceInjectionConfig
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeviceInjectionConfig
public DeviceInjectionConfig()
Create aDeviceInjectionConfig
.Note: created instance needs to be initialized by #init(..) before using.
-
DeviceInjectionConfig
public DeviceInjectionConfig(DeviceId did)
Create aDeviceInjectionConfig
for specified Device.Note: created instance is not bound to NetworkConfigService, cannot use
Config.apply()
. Must be passed to the service using NetworkConfigService#applyConfig- Parameters:
did
- DeviceId
-
-
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.
-
ports
public java.lang.String ports()
-
-