Skip to content

Commit

Permalink
more comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiangqian committed Oct 24, 2019
1 parent ba6ec14 commit daeb301
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
24 changes: 12 additions & 12 deletions config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -158,19 +158,19 @@ 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:
description: restoreSize represents the complete size of the snapshot
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
Expand Down
16 changes: 8 additions & 8 deletions config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
26 changes: 13 additions & 13 deletions pkg/apis/volumesnapshot/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -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
Expand Down Expand Up @@ -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"`
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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"`
Expand Down

0 comments on commit daeb301

Please sign in to comment.