From b2c481e257a33615e04bac1046d8c0dc40ce5687 Mon Sep 17 00:00:00 2001 From: MarioMang Date: Sat, 11 Nov 2023 23:47:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update.=20=E5=A2=9E=E5=8A=A0=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E4=BA=91=E4=B8=BB=E6=8E=A5=E5=8F=A3=E6=9C=BAGPU?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/instance.go | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/service/instance.go b/service/instance.go index d1e0a2b..0735e09 100644 --- a/service/instance.go +++ b/service/instance.go @@ -595,10 +595,20 @@ type RunInstancesInput struct { UserdataFile *string `json:"userdata_file" name:"userdata_file" default:"/etc/rc.local" location:"params"` UserdataPath *string `json:"userdata_path" name:"userdata_path" default:"/etc/qingcloud/userdata" location:"params"` // UserdataType's available values: plain, exec, tar - UserdataType *string `json:"userdata_type" name:"userdata_type" location:"params"` - UserdataValue *string `json:"userdata_value" name:"userdata_value" location:"params"` - Volumes []*string `json:"volumes" name:"volumes" location:"params"` - VxNets []*string `json:"vxnets" name:"vxnets" location:"params"` + UserdataType *string `json:"userdata_type" name:"userdata_type" location:"params"` + UserdataValue *string `json:"userdata_value" name:"userdata_value" location:"params"` + Volumes []*string `json:"volumes" name:"volumes" location:"params"` + VxNets []*string `json:"vxnets" name:"vxnets" location:"params"` + OsDiskEncryption *int `json:"os_disk_encryption" name:"os_disk_encryption" location:"params"` + NicMqueue *int `json:"nic_mqueue" name:"nic_mqueue" location:"params"` + Platform *string `json:"platform" name:"platform" location:"params"` + FResetpwd *int `json:"f_resetpwd" name:"f_resetpwd" location:"params"` + ProcessorType *string `json:"processor_type" name:"processor_type" location:"params"` + DefaultUser *string `json:"default_user" name:"default_user" location:"params"` + DefaultPasswd *string `json:"default_passwd" name:"default_passwd" location:"params"` + Hypervisor *string `json:"hypervisor" name:"hypervisor" location:"params"` + GpuClass *string `json:"gpu_class" name:"gpu_class" location:"params"` + PlaceGroupID *string `json:"place_group_id" name:"place_group_id" location:"params"` } func (v *RunInstancesInput) Validate() error { @@ -645,8 +655,8 @@ func (v *RunInstancesInput) Validate() error { if v.CPUModel != nil { cpuModelValidValues := []string{"Westmere", "SandyBridge", "IvyBridge", "Haswell", "Broadwell", "EPYC", - "Skylake", "CascadeLake", "IceLake", "SapphireRapids", "Haswell-noTSX", - "EPYC-Rome"} + "Skylake", "CascadeLake", "IceLake", "SapphireRapids", "Haswell-noTSX", + "EPYC-Rome"} cpuModelParameterValue := fmt.Sprint(*v.CPUModel) cpuModelIsValid := false From 20c1ef5ed5b9d2febc47e6f8554dcb050c6585ea Mon Sep 17 00:00:00 2001 From: MarioMang Date: Fri, 15 Mar 2024 15:50:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix.=20=E4=BF=AE=E5=A4=8DResizeClusterInput?= =?UTF-8?q?=20=E4=B8=ADNodeRole=E4=B8=BA=E5=88=97=E8=A1=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/cluster.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/service/cluster.go b/service/cluster.go index 071b966..d55e918 100644 --- a/service/cluster.go +++ b/service/cluster.go @@ -982,12 +982,12 @@ func (s *ClusterService) ResizeCluster(i *ResizeClusterInput) (*ResizeClusterOut } type ResizeClusterInput struct { - Cluster *string `json:"cluster" name:"cluster" location:"params"` // Required - CPU *int `json:"cpu" name:"cpu" location:"params"` - Gpu *int `json:"gpu" name:"gpu" location:"params"` - Memory *int `json:"memory" name:"memory" location:"params"` - NodeRole *string `json:"node_role" name:"node_role" location:"params"` - StorageSize *int `json:"storage_size" name:"storage_size" location:"params"` + Cluster *string `json:"cluster" name:"cluster" location:"params"` // Required + CPU *int `json:"cpu" name:"cpu" location:"params"` + Gpu *int `json:"gpu" name:"gpu" location:"params"` + Memory *int `json:"memory" name:"memory" location:"params"` + NodeRole []*string `json:"node_role" name:"node_role" location:"params"` + StorageSize *int `json:"storage_size" name:"storage_size" location:"params"` } func (v *ResizeClusterInput) Validate() error {