Skip to content

Commit 7c3d192

Browse files
Add name field in DeleteVolumeRequest
1 parent 2f0d5fb commit 7c3d192

File tree

2 files changed

+362
-212
lines changed

2 files changed

+362
-212
lines changed

csi.proto

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,34 @@ message VolumeMetadata {
270270
////////
271271
////////
272272
message DeleteVolumeRequest {
273+
message Reference {
274+
// The ID of the volume to be deprovisioned. This field is REQUIRED.
275+
VolumeID volume_id = 1;
276+
277+
// The metadata of the volume to be deprovisioned. This field is
278+
// OPTIONAL.
279+
VolumeMetadata volume_metadata = 2;
280+
}
281+
273282
// The API version assumed by the CO. This field is REQUIRED.
274283
Version version = 1;
275284

276-
// The ID of the volume to be deprovisioned. This field is REQUIRED.
277-
VolumeID volume_id = 2;
278-
279-
// The metadata of the volume to be deprovisioned. This field is
280-
// OPTIONAL.
281-
VolumeMetadata volume_metadata = 3;
285+
// Either `name` or `reference` SHALL be specified by the CO. A CO MAY specify
286+
// the `name` when the volume ID and metadata are unknown. For example, in the
287+
// case where a `CreateVolume` RPC fails and the CO is unsure of the completion
288+
// state of the request AND no longer needs the possibly-created volume.
289+
// Alternatively, a CO MAY specify the `reference` field (ID and metadata) when
290+
// such information is available to it.
291+
// This field is REQUIRED.
292+
oneof handle {
293+
// The CO-generated name of the volume to delete, same as in
294+
// `CreateVolumeRequest`.
295+
string name = 2;
296+
297+
// The plugin-generated reference to the volume, as returned in
298+
// `CreateVolumeResponse`.
299+
Reference reference = 3;
300+
}
282301
}
283302

284303
message DeleteVolumeResponse {

0 commit comments

Comments
 (0)