Skip to content

Commit

Permalink
[Fix] Fix required param in AS group create
Browse files Browse the repository at this point in the history
  • Loading branch information
muneeb-jan committed Oct 8, 2024
1 parent 2b3f497 commit f3262f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions acceptance/openstack/autoscaling/v1/groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ func TestGroupsList(t *testing.T) {
}

func TestGroupLifecycle(t *testing.T) {
client, err := clients.NewAutoscalingV1Client()
th.AssertNoErr(t, err)

asGroupCreateName := tools.RandomString("as-group-create-", 3)
networkID := clients.EnvOS.GetEnv("NETWORK_ID")
Expand All @@ -37,6 +35,9 @@ func TestGroupLifecycle(t *testing.T) {
t.Skip("OS_NETWORK_ID or OS_VPC_ID env vars are missing but AS Group test requires")
}

client, err := clients.NewAutoscalingV1Client()
th.AssertNoErr(t, err)

secGroupID := openstack.CreateSecurityGroup(t)
t.Cleanup(func() {
openstack.DeleteSecurityGroup(t, secGroupID)
Expand Down
4 changes: 2 additions & 2 deletions openstack/autoscaling/v1/groups/create.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package groups

import (
"github.com/opentelekomcloud/gophertelekomcloud"
golangsdk "github.com/opentelekomcloud/gophertelekomcloud"
"github.com/opentelekomcloud/gophertelekomcloud/internal/build"
"github.com/opentelekomcloud/gophertelekomcloud/internal/extract"
)
Expand All @@ -10,7 +10,7 @@ type CreateOpts struct {
// Specifies the AS group name. The name contains only letters, digits, underscores (_), and hyphens (-), and cannot exceed 64 characters.
Name string `json:"scaling_group_name" required:"true"`
// Specifies the AS configuration ID, which can be obtained using the API for querying AS configurations.
ConfigurationID string `json:"scaling_configuration_id,omitempty"`
ConfigurationID string `json:"scaling_configuration_id" required:"true"`
// Specifies the expected number of instances. The default value is the minimum number of instances.
// The value ranges from the minimum number of instances to the maximum number of instances.
DesireInstanceNumber int `json:"desire_instance_number,omitempty"`
Expand Down

0 comments on commit f3262f2

Please sign in to comment.