Class Device
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.resource.v1beta2.Device
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<DeviceBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class Device extends Object implements io.fabric8.kubernetes.api.builder.Editable<DeviceBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Device()No args constructor for use in serializationDevice(Boolean allNodes, Map<String,DeviceAttribute> attributes, Map<String,DeviceCapacity> capacity, List<DeviceCounterConsumption> consumesCounters, String name, String nodeName, io.fabric8.kubernetes.api.model.NodeSelector nodeSelector, List<DeviceTaint> taints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeviceBuilderedit()Map<String,Object>getAdditionalProperties()BooleangetAllNodes()AllNodes indicates that all nodes have access to the device.Map<String,DeviceAttribute>getAttributes()Attributes defines the set of attributes for this device.Map<String,DeviceCapacity>getCapacity()Capacity defines the set of capacities for this device.List<DeviceCounterConsumption>getConsumesCounters()ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.StringgetName()Name is unique identifier among all devices managed by the driver in the pool.StringgetNodeName()NodeName identifies the node where the device is available.io.fabric8.kubernetes.api.model.NodeSelectorgetNodeSelector()Device represents one individual hardware instance that can be selected based on its attributes.List<DeviceTaint>getTaints()If specified, these are the driver-defined taints.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAllNodes(Boolean allNodes)AllNodes indicates that all nodes have access to the device.voidsetAttributes(Map<String,DeviceAttribute> attributes)Attributes defines the set of attributes for this device.voidsetCapacity(Map<String,DeviceCapacity> capacity)Capacity defines the set of capacities for this device.voidsetConsumesCounters(List<DeviceCounterConsumption> consumesCounters)ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.voidsetName(String name)Name is unique identifier among all devices managed by the driver in the pool.voidsetNodeName(String nodeName)NodeName identifies the node where the device is available.voidsetNodeSelector(io.fabric8.kubernetes.api.model.NodeSelector nodeSelector)Device represents one individual hardware instance that can be selected based on its attributes.voidsetTaints(List<DeviceTaint> taints)If specified, these are the driver-defined taints.DeviceBuildertoBuilder()
-
-
-
Constructor Detail
-
Device
public Device()
No args constructor for use in serialization
-
Device
public Device(Boolean allNodes, Map<String,DeviceAttribute> attributes, Map<String,DeviceCapacity> capacity, List<DeviceCounterConsumption> consumesCounters, String name, String nodeName, io.fabric8.kubernetes.api.model.NodeSelector nodeSelector, List<DeviceTaint> taints)
-
-
Method Detail
-
getAllNodes
public Boolean getAllNodes()
AllNodes indicates that all nodes have access to the device.Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.
-
setAllNodes
public void setAllNodes(Boolean allNodes)
AllNodes indicates that all nodes have access to the device.Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.
-
getAttributes
public Map<String,DeviceAttribute> getAttributes()
Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.The maximum number of attributes and capacities combined is 32.
-
setAttributes
public void setAttributes(Map<String,DeviceAttribute> attributes)
Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.The maximum number of attributes and capacities combined is 32.
-
getCapacity
public Map<String,DeviceCapacity> getCapacity()
Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.The maximum number of attributes and capacities combined is 32.
-
setCapacity
public void setCapacity(Map<String,DeviceCapacity> capacity)
Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.The maximum number of attributes and capacities combined is 32.
-
getConsumesCounters
public List<DeviceCounterConsumption> getConsumesCounters()
ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.There can only be a single entry per counterSet.
The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).
-
setConsumesCounters
public void setConsumesCounters(List<DeviceCounterConsumption> consumesCounters)
ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.There can only be a single entry per counterSet.
The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).
-
getName
public String getName()
Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.
-
setName
public void setName(String name)
Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.
-
getNodeName
public String getNodeName()
NodeName identifies the node where the device is available.Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.
-
setNodeName
public void setNodeName(String nodeName)
NodeName identifies the node where the device is available.Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.
-
getNodeSelector
public io.fabric8.kubernetes.api.model.NodeSelector getNodeSelector()
Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.
-
setNodeSelector
public void setNodeSelector(io.fabric8.kubernetes.api.model.NodeSelector nodeSelector)
Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.
-
getTaints
public List<DeviceTaint> getTaints()
If specified, these are the driver-defined taints.The maximum number of taints is 4.
This is an alpha field and requires enabling the DRADeviceTaints feature gate.
-
setTaints
public void setTaints(List<DeviceTaint> taints)
If specified, these are the driver-defined taints.The maximum number of taints is 4.
This is an alpha field and requires enabling the DRADeviceTaints feature gate.
-
edit
public DeviceBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<DeviceBuilder>
-
toBuilder
public DeviceBuilder toBuilder()
-
-