Skip to content

Commit

Permalink
clarify origin of volume_context
Browse files Browse the repository at this point in the history
The "volume context as returned by CO in CreateVolumeRequest" is
misleading in several ways:
- the volume context is return *to* the CO by the SP
- it is returned in the CreateVolumeResponse
  • Loading branch information
pohly committed Jan 6, 2020
1 parent 4731db0 commit 51bf9be
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 36 deletions.
28 changes: 16 additions & 12 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,10 @@ message ControllerPublishVolumeRequest {
// `Secrets Requirements` section on how to use this field.
map<string, string> secrets = 5 [(csi_secret) = true];

// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 6;
}

Expand Down Expand Up @@ -731,9 +732,10 @@ message ValidateVolumeCapabilitiesRequest {
// The ID of the volume to check. This field is REQUIRED.
string volume_id = 1;

// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 2;

// The capabilities that the CO wants to check for the volume. This
Expand Down Expand Up @@ -1119,9 +1121,10 @@ message NodeStageVolumeRequest {
// section on how to use this field.
map<string, string> secrets = 5 [(csi_secret) = true];

// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 6;
}

Expand Down Expand Up @@ -1189,9 +1192,10 @@ message NodePublishVolumeRequest {
// section on how to use this field.
map<string, string> secrets = 7 [(csi_secret) = true];

// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 8;
}

Expand Down
28 changes: 16 additions & 12 deletions lib/go/csi/csi.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 16 additions & 12 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1207,9 +1207,10 @@ message ControllerPublishVolumeRequest {
// `Secrets Requirements` section on how to use this field.
map<string, string> secrets = 5 [(csi_secret) = true];
// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 6;
}
Expand Down Expand Up @@ -1312,9 +1313,10 @@ message ValidateVolumeCapabilitiesRequest {
// The ID of the volume to check. This field is REQUIRED.
string volume_id = 1;
// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 2;
// The capabilities that the CO wants to check for the volume. This
Expand Down Expand Up @@ -1958,9 +1960,10 @@ message NodeStageVolumeRequest {
// section on how to use this field.
map<string, string> secrets = 5 [(csi_secret) = true];
// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 6;
}
Expand Down Expand Up @@ -2107,9 +2110,10 @@ message NodePublishVolumeRequest {
// section on how to use this field.
map<string, string> secrets = 7 [(csi_secret) = true];
// Volume context as returned by CO in CreateVolumeRequest. This field
// is OPTIONAL and MUST match the volume_context of the volume
// identified by `volume_id`.
// Volume context as returned by SP in
// CreateVolumeResponse.Volume.volume_context.
// This field is OPTIONAL and MUST match the volume_context of the
// volume identified by `volume_id`.
map<string, string> volume_context = 8;
}
Expand Down

0 comments on commit 51bf9be

Please sign in to comment.