From f70333727621e67da6e8b00b3d4c0b88013c15ff Mon Sep 17 00:00:00 2001 From: huyujie Date: Mon, 29 Jul 2019 15:07:07 +0800 Subject: [PATCH] ks-api-enhancement --- service/snapshot.go | 1 + service/types.go | 5 ++++- service/volume.go | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/service/snapshot.go b/service/snapshot.go index 7a8ad08..6466c34 100644 --- a/service/snapshot.go +++ b/service/snapshot.go @@ -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 { diff --git a/service/types.go b/service/types.go index 471f2e9..e44929f 100644 --- a/service/types.go +++ b/service/types.go @@ -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 { diff --git a/service/volume.go b/service/volume.go index 3db7a9c..21ca828 100644 --- a/service/volume.go +++ b/service/volume.go @@ -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 {