From b22398f53cdf6db7f031be9390c17bf819d37696 Mon Sep 17 00:00:00 2001 From: huyujie Date: Tue, 12 Feb 2019 14:18:00 +0800 Subject: [PATCH] add-new-instance-volume-type --- service/instance.go | 4 ++-- service/volume.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/service/instance.go b/service/instance.go index c141e2a..af71038 100644 --- a/service/instance.go +++ b/service/instance.go @@ -572,7 +572,7 @@ type RunInstancesInput struct { Gpu *int `json:"gpu" name:"gpu" default:"0" location:"params"` Hostname *string `json:"hostname" name:"hostname" location:"params"` ImageID *string `json:"image_id" name:"image_id" location:"params"` // Required - // InstanceClass's available values: 0, 1 + // InstanceClass's available values: 0, 1, 2, 3, 4, 5, 6, 100, 101, 200, 201, 300, 301 InstanceClass *int `json:"instance_class" name:"instance_class" location:"params"` InstanceName *string `json:"instance_name" name:"instance_name" location:"params"` InstanceType *string `json:"instance_type" name:"instance_type" location:"params"` @@ -670,7 +670,7 @@ func (v *RunInstancesInput) Validate() error { } if v.InstanceClass != nil { - instanceClassValidValues := []string{"0", "1"} + instanceClassValidValues := []string{"0", "1", "2", "3", "4", "5", "6", "100", "101", "200", "201", "300", "301"} instanceClassParameterValue := fmt.Sprint(*v.InstanceClass) instanceClassIsValid := false diff --git a/service/volume.go b/service/volume.go index 3c48625..77521f2 100644 --- a/service/volume.go +++ b/service/volume.go @@ -134,7 +134,7 @@ type CreateVolumesInput struct { Count *int `json:"count" name:"count" default:"1" location:"params"` Size *int `json:"size" name:"size" location:"params"` // Required VolumeName *string `json:"volume_name" name:"volume_name" location:"params"` - // VolumeType's available values: 0, 1, 2, 3 + // VolumeType's available values: 0, 1, 2, 3, 4, 5, 10, 100, 200 VolumeType *int `json:"volume_type" name:"volume_type" default:"0" location:"params"` } @@ -148,7 +148,7 @@ func (v *CreateVolumesInput) Validate() error { } if v.VolumeType != nil { - volumeTypeValidValues := []string{"0", "1", "2", "3"} + volumeTypeValidValues := []string{"0", "1", "2", "3", "4", "5", "10", "100", "200"} volumeTypeParameterValue := fmt.Sprint(*v.VolumeType) volumeTypeIsValid := false @@ -262,7 +262,7 @@ type DescribeVolumesInput struct { Tags []*string `json:"tags" name:"tags" location:"params"` // Verbose's available values: 0, 1 Verbose *int `json:"verbose" name:"verbose" default:"0" location:"params"` - // VolumeType's available values: 0, 1, 2, 3, 5 + // VolumeType's available values: 0, 1, 2, 3, 4, 5, 10, 100, 200 VolumeType *int `json:"volume_type" name:"volume_type" location:"params"` Volumes []*string `json:"volumes" name:"volumes" location:"params"` } @@ -290,7 +290,7 @@ func (v *DescribeVolumesInput) Validate() error { } if v.VolumeType != nil { - volumeTypeValidValues := []string{"0", "1", "2", "3", "5"} + volumeTypeValidValues := []string{"0", "1", "2", "3", "4", "5", "10", "100", "200"} volumeTypeParameterValue := fmt.Sprint(*v.VolumeType) volumeTypeIsValid := false