Merge pull request #119 from yunify/add-new-instance-volume-type
add-new-instance-volume-type
This commit is contained in:
commit
ecebf151dc
|
@ -572,7 +572,7 @@ type RunInstancesInput struct {
|
||||||
Gpu *int `json:"gpu" name:"gpu" default:"0" location:"params"`
|
Gpu *int `json:"gpu" name:"gpu" default:"0" location:"params"`
|
||||||
Hostname *string `json:"hostname" name:"hostname" location:"params"`
|
Hostname *string `json:"hostname" name:"hostname" location:"params"`
|
||||||
ImageID *string `json:"image_id" name:"image_id" location:"params"` // Required
|
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"`
|
InstanceClass *int `json:"instance_class" name:"instance_class" location:"params"`
|
||||||
InstanceName *string `json:"instance_name" name:"instance_name" location:"params"`
|
InstanceName *string `json:"instance_name" name:"instance_name" location:"params"`
|
||||||
InstanceType *string `json:"instance_type" name:"instance_type" 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 {
|
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)
|
instanceClassParameterValue := fmt.Sprint(*v.InstanceClass)
|
||||||
|
|
||||||
instanceClassIsValid := false
|
instanceClassIsValid := false
|
||||||
|
|
|
@ -134,7 +134,7 @@ type CreateVolumesInput struct {
|
||||||
Count *int `json:"count" name:"count" default:"1" location:"params"`
|
Count *int `json:"count" name:"count" default:"1" location:"params"`
|
||||||
Size *int `json:"size" name:"size" location:"params"` // Required
|
Size *int `json:"size" name:"size" location:"params"` // Required
|
||||||
VolumeName *string `json:"volume_name" name:"volume_name" location:"params"`
|
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"`
|
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 {
|
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)
|
volumeTypeParameterValue := fmt.Sprint(*v.VolumeType)
|
||||||
|
|
||||||
volumeTypeIsValid := false
|
volumeTypeIsValid := false
|
||||||
|
@ -262,7 +262,7 @@ type DescribeVolumesInput struct {
|
||||||
Tags []*string `json:"tags" name:"tags" location:"params"`
|
Tags []*string `json:"tags" name:"tags" location:"params"`
|
||||||
// Verbose's available values: 0, 1
|
// Verbose's available values: 0, 1
|
||||||
Verbose *int `json:"verbose" name:"verbose" default:"0" location:"params"`
|
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"`
|
VolumeType *int `json:"volume_type" name:"volume_type" location:"params"`
|
||||||
Volumes []*string `json:"volumes" name:"volumes" location:"params"`
|
Volumes []*string `json:"volumes" name:"volumes" location:"params"`
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ func (v *DescribeVolumesInput) Validate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if v.VolumeType != nil {
|
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)
|
volumeTypeParameterValue := fmt.Sprint(*v.VolumeType)
|
||||||
|
|
||||||
volumeTypeIsValid := false
|
volumeTypeIsValid := false
|
||||||
|
|
Loading…
Reference in New Issue