Skip to content

Commit

Permalink
update. golang sdk增加指定VM副本数参数
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkiiiiiice committed Oct 18, 2024
1 parent 7fa0a27 commit 38333c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ type RunInstancesInput struct {
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"`
RepCount *string `json:"rep_count" name:"rep_count" location:"params"`
}

func (v *RunInstancesInput) Validate() error {
Expand Down Expand Up @@ -645,8 +646,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
Expand Down

0 comments on commit 38333c0

Please sign in to comment.