ks-api-enhancement

This commit is contained in:
huyujie 2019-07-29 15:07:07 +08:00
parent ac222d4999
commit f703337276
3 changed files with 7 additions and 2 deletions

View File

@ -251,6 +251,7 @@ func (s *SnapshotService) CreateVolumeFromSnapshot(i *CreateVolumeFromSnapshotIn
type CreateVolumeFromSnapshotInput struct {
Snapshot *string `json:"snapshot" name:"snapshot" location:"params"` // Required
VolumeName *string `json:"volume_name" name:"volume_name" location:"params"`
Zone *string `json:"zone" name:"zone" location:"params"`
}
func (v *CreateVolumeFromSnapshotInput) Validate() error {

View File

@ -1012,6 +1012,7 @@ type Instance struct {
InstanceType *string `json:"instance_type" name:"instance_type"`
KeyPairIDs []*string `json:"keypair_ids" name:"keypair_ids"`
MemoryCurrent *int `json:"memory_current" name:"memory_current"`
Repl *string `json:"repl" name:"repl"`
SecurityGroup *SecurityGroup `json:"security_group" name:"security_group"`
// Status's available values: pending, running, stopped, suspended, terminated, ceased
Status *string `json:"status" name:"status"`
@ -1024,6 +1025,7 @@ type Instance struct {
VolumeIDs []*string `json:"volume_ids" name:"volume_ids"`
Volumes []*Volume `json:"volumes" name:"volumes"`
VxNets []*NICVxNet `json:"vxnets" name:"vxnets"`
ZoneID *string `json:"zone_id" name:"zone_id"`
}
func (v *Instance) Validate() error {
@ -3016,7 +3018,8 @@ type Volume struct {
VolumeID *string `json:"volume_id" name:"volume_id"`
VolumeName *string `json:"volume_name" name:"volume_name"`
// VolumeType's available values: 0, 1, 2, 3
VolumeType *int `json:"volume_type" name:"volume_type"`
VolumeType *int `json:"volume_type" name:"volume_type"`
ZoneID *string `json:"zone_id" name:"zone_id"`
}
func (v *Volume) Validate() error {

View File

@ -212,7 +212,8 @@ type CreateVolumesInput struct {
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, 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"`
Zone *string `json:"zone" name:"zone" location:"params"`
}
func (v *CreateVolumesInput) Validate() error {