From daeb301453672d802c7bc754f87efab4a9e6f802 Mon Sep 17 00:00:00 2001 From: xiangqian Date: Wed, 23 Oct 2019 17:21:49 -0700 Subject: [PATCH] more comment updates --- ...storage.k8s.io_volumesnapshotcontents.yaml | 24 ++++++++--------- ...apshot.storage.k8s.io_volumesnapshots.yaml | 16 ++++++------ pkg/apis/volumesnapshot/v1beta1/types.go | 26 +++++++++---------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml b/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml index 7c6defeba..f7f3b15df 100644 --- a/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml +++ b/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml @@ -68,12 +68,12 @@ spec: This field is immutable after creation. Required. properties: snapshotHandle: - description: snapshotHandle specifies the CSI name of a pre-existing + description: snapshotHandle specifies the "snapshot_id" of a pre-existing snapshot on the underlying storage system. This field is immutable. type: string volumeHandle: - description: volumeHandle specifies the CSI name of the volume from - which a snapshot should be dynamically taken from. This field + description: volumeHandle specifies the "volume_id" of the volume + from which a snapshot should be dynamically taken from. This field is immutable. type: string type: object @@ -133,9 +133,9 @@ spec: case, this field will be filled in with the "creation_time" value returned from CSI "CreateSnapshotRequest" gRPC call. For pre-existing snapshot, this field will be filled with the "creation_time" value - returned from CSI "ListSnapshots" gRPC call if the CSI driver supports. - The format of this field is a Unix nanoseconds time encoded as an - int64. On Unix, the command `date +%s%N` returns the current time + returned from the CSI "ListSnapshots" gRPC call if the driver supports + it. The format of this field is a Unix nanoseconds time encoded as + an int64. On Unix, the command `date +%s%N` returns the current time in nanoseconds since 1970-01-01 00:00:00 UTC. format: int64 type: integer @@ -158,8 +158,8 @@ spec: to restore a volume. In dynamic snapshot creation case, this field will be filled in with the "ready_to_use" value returned from CSI "CreateSnapshotRequest" gRPC call. For pre-existing snapshot, this - field will be filled with the "read_to_use" value returned from CSI - "ListSnapshots" gRPC call if the CSI driver supports. If not specified, + field will be filled with the "ready_to_use" value returned from the + CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it means the readiness of a snapshot is unknown. type: boolean restoreSize: @@ -167,10 +167,10 @@ spec: in bytes. In dynamic snapshot creation case, this field will be filled in with the "size_bytes" value returned from CSI "CreateSnapshotRequest" gRPC call. For pre-existing snapshot, this field will be filled with - the "size_bytes" value returned from CSI "ListSnapshots" gRPC call - if the CSI driver supports. When restoring a volume from this snapshot, - the size of the volume MUST NOT be smaller than the restoreSize if - it is specified. Otherwise the restoration will fail. If not specified, + the "size_bytes" value returned from the CSI "ListSnapshots" gRPC + call if the driver supports it. When restoring a volume from this + snapshot, the size of the volume MUST NOT be smaller than the restoreSize + if it is specified. Otherwise the restoration will fail. If not specified, it indicates that the size is unknown. format: int64 minimum: 0 diff --git a/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml b/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml index 94a2d96cc..317abe73b 100644 --- a/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml +++ b/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml @@ -89,10 +89,10 @@ spec: storage system. In dynamic snapshot creation case, it will be filled in upon snapshot creation with the "creation_time" field returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, - it will be set to the "size_byte" value returned from CSI "ListSnapshots" - gRPC call if there exists a matching CSI driver that supports it after - binding. If not specified, it indicates that the creation time of - the snapshot is unknown. + it will be set to the "size_bytes" value returned from the CSI "ListSnapshots" + gRPC call if the driver exists and supports it after binding. If not + specified, it indicates that the creation time of the snapshot is + unknown. format: date-time type: string error: @@ -118,10 +118,10 @@ spec: will be set to true after underlying storage system has successfully finished all out-of-bound procedures to make a snapshot ready to be used to restore a volume. For a pre-existing snapshot, readyToUse - will be set to the "read_to_use" field returned from CSI "ListSnapshots" - gRPC call if there exists a matching CSI driver that supports it after - binding. Otherwise, this field will be set to "True". If not specified, - it indicates that the readiness of a snapshot is unknown. + will be set to the "ready_to_use" field returned from the CSI "ListSnapshots" + gRPC call if the driver exists and supports it after binding. Otherwise, + this field will be set to "True". If not specified, it indicates that + the readiness of a snapshot is unknown. type: boolean restoreSize: description: restoreSize, if specified, represents the complete size diff --git a/pkg/apis/volumesnapshot/v1beta1/types.go b/pkg/apis/volumesnapshot/v1beta1/types.go index b86cc4157..e6688bc7d 100644 --- a/pkg/apis/volumesnapshot/v1beta1/types.go +++ b/pkg/apis/volumesnapshot/v1beta1/types.go @@ -119,9 +119,9 @@ type VolumeSnapshotStatus struct { // snapshot was successfully cut on the underlying storage system. // In dynamic snapshot creation case, it will be filled in upon snapshot creation // with the "creation_time" field returned from CSI "CreateSnapshot" gRPC call. - // For a pre-existing snapshot, it will be set to the "size_byte" value returned - // from CSI "ListSnapshots" gRPC call if there exists a matching CSI driver that - // supports it after binding. + // For a pre-existing snapshot, it will be set to the "size_bytes" value returned + // from the CSI "ListSnapshots" gRPC call if the driver exists and supports it + // after binding. // If not specified, it indicates that the creation time of the snapshot is unknown. // +optional CreationTime *metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"` @@ -130,9 +130,9 @@ type VolumeSnapshotStatus struct { // In dynamic snapshot creation case, readyToUse will be set to true after underlying storage // system has successfully finished all out-of-bound procedures to make a snapshot ready to // be used to restore a volume. - // For a pre-existing snapshot, readyToUse will be set to the "read_to_use" field - // returned from CSI "ListSnapshots" gRPC call if there exists a matching CSI driver - // that supports it after binding. + // For a pre-existing snapshot, readyToUse will be set to the "ready_to_use" field + // returned from the CSI "ListSnapshots" gRPC call if the driver exists and + // supports it after binding. // Otherwise, this field will be set to "True". // If not specified, it indicates that the readiness of a snapshot is unknown. // +optional @@ -295,14 +295,14 @@ type VolumeSnapshotContentSpec struct { // TODO(xiangqian): Add a webhook to ensure that VolumeSnapshotContentSource members // will be immutable once specified. type VolumeSnapshotContentSource struct { - // volumeHandle specifies the CSI name of the volume from which a snapshot + // volumeHandle specifies the "volume_id" of the volume from which a snapshot // should be dynamically taken from. // This field is immutable. // +optional VolumeHandle *string `json:"volumeHandle,omitempty" protobuf:"bytes,1,opt,name=volumeHandle"` - // snapshotHandle specifies the CSI name of a pre-existing snapshot on the - // underlying storage system. + // snapshotHandle specifies the "snapshot_id" of a pre-existing snapshot on + // the underlying storage system. // This field is immutable. // +optional SnapshotHandle *string `json:"snapshotHandle,omitempty" protobuf:"bytes,2,opt,name=snapshotHandle"` @@ -321,7 +321,7 @@ type VolumeSnapshotContentStatus struct { // In dynamic snapshot creation case, this field will be filled in with the // "creation_time" value returned from CSI "CreateSnapshotRequest" gRPC call. // For pre-existing snapshot, this field will be filled with the "creation_time" - // value returned from CSI "ListSnapshots" gRPC call if the CSI driver supports. + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. // The format of this field is a Unix nanoseconds time encoded as an int64. // On Unix, the command `date +%s%N` returns the current time in nanoseconds // since 1970-01-01 00:00:00 UTC. @@ -332,7 +332,7 @@ type VolumeSnapshotContentStatus struct { // In dynamic snapshot creation case, this field will be filled in with the // "size_bytes" value returned from CSI "CreateSnapshotRequest" gRPC call. // For pre-existing snapshot, this field will be filled with the "size_bytes" - // value returned from CSI "ListSnapshots" gRPC call if the CSI driver supports. + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. // When restoring a volume from this snapshot, the size of the volume MUST NOT // be smaller than the restoreSize if it is specified. // Otherwise the restoration will fail. @@ -344,8 +344,8 @@ type VolumeSnapshotContentStatus struct { // readyToUse indicates if a snapshot is ready to be used to restore a volume. // In dynamic snapshot creation case, this field will be filled in with the // "ready_to_use" value returned from CSI "CreateSnapshotRequest" gRPC call. - // For pre-existing snapshot, this field will be filled with the "read_to_use" - // value returned from CSI "ListSnapshots" gRPC call if the CSI driver supports. + // For pre-existing snapshot, this field will be filled with the "ready_to_use" + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. // If not specified, it means the readiness of a snapshot is unknown. // +optional. ReadyToUse *bool `json:"readyToUse,omitempty" protobuf:"varint,4,opt,name=readyToUse"`