Fix restore size type in snapshot content

Change the restore size to int64 for snapshot content. Also add the code
to update the restore size for snapshot content.
This commit is contained in:
Jing Xu
2018-09-17 16:23:36 -07:00
parent 631b9dc996
commit daaee085e5
5 changed files with 43 additions and 19 deletions

View File

@@ -743,7 +743,7 @@ func newTestController(kubeClient kubernetes.Interface, clientset clientset.Inte
}
// newContent returns a new content with given attributes
func newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToSnapshotUID, boundToSnapshotName string, size *resource.Quantity, creationTime *int64) *crdv1.VolumeSnapshotContent {
func newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToSnapshotUID, boundToSnapshotName string, size *int64, creationTime *int64) *crdv1.VolumeSnapshotContent {
content := crdv1.VolumeSnapshotContent{
ObjectMeta: metav1.ObjectMeta{
Name: name,
@@ -780,7 +780,7 @@ func newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToS
return &content
}
func newContentArray(name, className, snapshotHandle, volumeUID, volumeName, boundToSnapshotUID, boundToSnapshotName string, size *resource.Quantity, creationTime *int64) []*crdv1.VolumeSnapshotContent {
func newContentArray(name, className, snapshotHandle, volumeUID, volumeName, boundToSnapshotUID, boundToSnapshotName string, size *int64, creationTime *int64) []*crdv1.VolumeSnapshotContent {
return []*crdv1.VolumeSnapshotContent{
newContent(name, className, snapshotHandle, volumeUID, volumeName, boundToSnapshotUID, boundToSnapshotName, size, creationTime),
}