From 233b7171de396ad76e2faf4e0ddfb168f6e6c654 Mon Sep 17 00:00:00 2001 From: Xing Yang Date: Tue, 21 Aug 2018 19:33:27 -0700 Subject: [PATCH] Rename Size to RestoreSize --- pkg/apis/volumesnapshot/v1alpha1/types.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkg/apis/volumesnapshot/v1alpha1/types.go b/pkg/apis/volumesnapshot/v1alpha1/types.go index 067cfcfa..5c7b1e92 100644 --- a/pkg/apis/volumesnapshot/v1alpha1/types.go +++ b/pkg/apis/volumesnapshot/v1alpha1/types.go @@ -90,9 +90,11 @@ type VolumeSnapshotStatus struct { // +optional CreationTime *metav1.Time `json:"createdAt" protobuf:"bytes,1,opt,name=createdAt"` - // The size of the snapshot. When restoring volume from the snapshot, the volume size - // should be equal to or larger than its snapshot size. - Size *resource.Quantity `json:"size" protobuf:"bytes,2,opt,name=size"` + // When restoring volume from the snapshot, the volume size should be equal to or + // larger than the RestoreSize if it is specified. If RestoreSize is set to nil, it means + // that the storage plugin does not have this information avaialble. + // +optional + RestoreSize *resource.Quantity `json:"restoreSize" protobuf:"bytes,2,opt,name=restoreSize"` // Ready is set to true only if the snapshot is ready to use (e.g., finish uploading if // there is an uploading phase) and also VolumeSnapshot and its VolumeSnapshotContent @@ -235,7 +237,9 @@ type CSIVolumeSnapshotSource struct { // +optional CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,3,opt,name=creationTime"` - // The size of the snapshot. When restoring volume from the snapshot, the volume size - // should be equal or larger than its snapshot size. - Size *resource.Quantity `json:"size" protobuf:"bytes,4,opt,name=size"` + // When restoring volume from the snapshot, the volume size should be equal to or + // larger than the RestoreSize if it is specified. If RestoreSize is set to nil, it means + // that the storage plugin does not have this information avaialble. + // +optional + RestoreSize *resource.Quantity `json:"restoreSize" protobuf:"bytes,4,opt,name=restoreSize"` }