pub struct DeviceClassSpec {
pub config: Option<Vec<DeviceClassConfiguration>>,
pub extended_resource_name: Option<String>,
pub selectors: Option<Vec<DeviceSelector>>,
}Expand description
DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
Fields§
§config: Option<Vec<DeviceClassConfiguration>>Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
They are passed to the driver, but are not considered while allocating the claim.
extended_resource_name: Option<String>ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod’s extended resource requests. It has the same format as the name of a pod’s extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod’s extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked.
This is a beta field.
selectors: Option<Vec<DeviceSelector>>Each selector must be satisfied by a device which is claimed via this class.
Trait Implementations§
Source§impl Clone for DeviceClassSpec
impl Clone for DeviceClassSpec
Source§fn clone(&self) -> DeviceClassSpec
fn clone(&self) -> DeviceClassSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceClassSpec
impl Debug for DeviceClassSpec
Source§impl DeepMerge for DeviceClassSpec
impl DeepMerge for DeviceClassSpec
Source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
other into self.Source§impl Default for DeviceClassSpec
impl Default for DeviceClassSpec
Source§fn default() -> DeviceClassSpec
fn default() -> DeviceClassSpec
Source§impl<'de> Deserialize<'de> for DeviceClassSpec
impl<'de> Deserialize<'de> for DeviceClassSpec
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for DeviceClassSpec
impl PartialEq for DeviceClassSpec
Source§fn eq(&self, other: &DeviceClassSpec) -> bool
fn eq(&self, other: &DeviceClassSpec) -> bool
self and other values to be equal, and is used by ==.