pub struct CreateVolumeRequest {
pub name: String,
pub capacity_range: Option<CapacityRange>,
pub volume_capabilities: Vec<VolumeCapability>,
pub parameters: BTreeMap<String, String>,
pub secrets: BTreeMap<String, String>,
pub volume_content_source: Option<VolumeContentSource>,
pub accessibility_requirements: Option<TopologyRequirement>,
}Fields§
§name: StringThe suggested name for the storage space. This field is REQUIRED. It serves two purposes:
- Idempotency - This name is generated by the CO to achieve
idempotency. The Plugin SHOULD ensure that multiple
CreateVolumecalls for the same name do not result in more than one piece of storage provisioned corresponding to that name. If a Plugin is unable to enforce idempotency, the CO’s error recovery logic could result in multiple (unused) volumes being provisioned. In the case of error, the CO MUST handle the gRPC error codes per the recovery behavior defined in the “CreateVolume Errors” section below. The CO is responsible for cleaning up volumes it provisioned that it no longer needs. If the CO is uncertain whether a volume was provisioned or not when aCreateVolumecall fails, the CO MAY callCreateVolumeagain, with the same name, to ensure the volume exists and to retrieve the volume’svolume_id(unless otherwise prohibited by “CreateVolume Errors”). - Suggested name - Some storage systems allow callers to specify an identifier by which to refer to the newly provisioned storage. If a storage system supports this, it can optionally use this name as the identifier for the new volume. Any Unicode string that conforms to the length limit is allowed except those containing the following banned characters: U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F. (These are control characters other than commonly used whitespace.)
capacity_range: Option<CapacityRange>This field is OPTIONAL. This allows the CO to specify the capacity requirement of the volume to be provisioned. If not specified, the Plugin MAY choose an implementation-defined capacity range. If specified it MUST always be honored, even when creating volumes from a source; which MAY force some backends to internally extend the volume after creating it.
volume_capabilities: Vec<VolumeCapability>The capabilities that the provisioned volume MUST have. SP MUST provision a volume that will satisfy ALL of the capabilities specified in this list. Otherwise SP MUST return the appropriate gRPC error code. The Plugin MUST assume that the CO MAY use the provisioned volume with ANY of the capabilities specified in this list. For example, a CO MAY specify two volume capabilities: one with access mode SINGLE_NODE_WRITER and another with access mode MULTI_NODE_READER_ONLY. In this case, the SP MUST verify that the provisioned volume can be used in either mode. This also enables the CO to do early validation: If ANY of the specified volume capabilities are not supported by the SP, the call MUST return the appropriate gRPC error code. This field is REQUIRED.
parameters: BTreeMap<String, String>Plugin specific parameters passed in as opaque key-value pairs. This field is OPTIONAL. The Plugin is responsible for parsing and validating these parameters. COs will treat these as opaque.
secrets: BTreeMap<String, String>Secrets required by plugin to complete volume creation request.
This field is OPTIONAL. Refer to the Secrets Requirements
section on how to use this field.
volume_content_source: Option<VolumeContentSource>If specified, the new volume will be pre-populated with data from this source. This field is OPTIONAL.
accessibility_requirements: Option<TopologyRequirement>Specifies where (regions, zones, racks, etc.) the provisioned volume MUST be accessible from. An SP SHALL advertise the requirements for topological accessibility information in documentation. COs SHALL only specify topological accessibility information supported by the SP. This field is OPTIONAL. This field SHALL NOT be specified unless the SP has the VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability. If this field is not specified and the SP has the VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY choose where the provisioned volume is accessible from.
Trait Implementations§
Source§impl Clone for CreateVolumeRequest
impl Clone for CreateVolumeRequest
Source§fn clone(&self) -> CreateVolumeRequest
fn clone(&self) -> CreateVolumeRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateVolumeRequest
impl Debug for CreateVolumeRequest
Source§impl Default for CreateVolumeRequest
impl Default for CreateVolumeRequest
Source§impl Message for CreateVolumeRequest
impl Message for CreateVolumeRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for CreateVolumeRequest
impl PartialEq for CreateVolumeRequest
impl StructuralPartialEq for CreateVolumeRequest
Auto Trait Implementations§
impl Freeze for CreateVolumeRequest
impl RefUnwindSafe for CreateVolumeRequest
impl Send for CreateVolumeRequest
impl Sync for CreateVolumeRequest
impl Unpin for CreateVolumeRequest
impl UnwindSafe for CreateVolumeRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request