pub struct DeviceClassSpec {
pub selectors: Vec<DeviceSelector>,
pub config: Vec<DeviceClassConfiguration>,
pub extended_resource_name: Option<String>,
}Expand description
DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
Fields§
§selectors: Vec<DeviceSelector>Each selector must be satisfied by a device which is claimed via this class.
+optional +listType=atomic +k8s:optional +k8s:maxItems=32
config: 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.
+optional +listType=atomic +k8s:optional +k8s:maxItems=32
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 an alpha field. +optional +featureGate=DRAExtendedResource +k8s:optional +k8s:format=k8s-extended-resource-name
Implementations§
Source§impl DeviceClassSpec
impl DeviceClassSpec
Sourcepub fn extended_resource_name(&self) -> &str
pub fn extended_resource_name(&self) -> &str
Returns the value of extended_resource_name, or the default value if extended_resource_name is unset.
Trait Implementations§
Source§impl Clone for DeviceClassSpec
impl Clone for DeviceClassSpec
Source§fn clone(&self) -> DeviceClassSpec
fn clone(&self) -> DeviceClassSpec
1.0.0 · 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 Default for DeviceClassSpec
impl Default for DeviceClassSpec
Source§impl Message for DeviceClassSpec
impl Message for DeviceClassSpec
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.