Skip to content

Commit

Permalink
Added test and maturity param
Browse files Browse the repository at this point in the history
  • Loading branch information
SunithaGudisagarIBM1 committed Jan 29, 2024
1 parent 64a1fb1 commit 777ac43
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
27 changes: 18 additions & 9 deletions common/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ import (
"github.com/go-openapi/strfmt"
)

// VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual
// server instances, along with subnets, volumes, load balancers, and more.
//
// API Version: 2023-12-05
const (
YYYYMMDD = "2006-01-02"
)

// VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual
// server instances, along with subnets, volumes, load balancers, and more.
//
Expand Down Expand Up @@ -121,8 +129,9 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) {
}
}

now := time.Now().UTC()
if options.Version == nil {
options.Version = core.StringPtr("2023-09-20")
options.Version = core.StringPtr(now.Format(YYYYMMDD))
}

service = &VpcV1{
Expand Down Expand Up @@ -16672,7 +16681,7 @@ func (vpc *VpcV1) ListSecurityGroupsWithContext(ctx context.Context, listSecurit
builder.AddHeader(headerName, headerValue)
}
builder.AddHeader("Accept", "application/json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
if listSecurityGroupsOptions.Start != nil {
Expand Down Expand Up @@ -16753,7 +16762,7 @@ func (vpc *VpcV1) CreateSecurityGroupWithContext(ctx context.Context, createSecu
}
builder.AddHeader("Accept", "application/json")
builder.AddHeader("Content-Type", "application/json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

Expand Down Expand Up @@ -16886,7 +16895,7 @@ func (vpc *VpcV1) GetSecurityGroupWithContext(ctx context.Context, getSecurityGr
builder.AddHeader(headerName, headerValue)
}
builder.AddHeader("Accept", "application/json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

Expand Down Expand Up @@ -16952,7 +16961,7 @@ func (vpc *VpcV1) UpdateSecurityGroupWithContext(ctx context.Context, updateSecu
}
builder.AddHeader("Accept", "application/json")
builder.AddHeader("Content-Type", "application/merge-patch+json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

Expand Down Expand Up @@ -17022,7 +17031,7 @@ func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSec
builder.AddHeader(headerName, headerValue)
}
builder.AddHeader("Accept", "application/json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

Expand Down Expand Up @@ -17091,7 +17100,7 @@ func (vpc *VpcV1) CreateSecurityGroupRuleWithContext(ctx context.Context, create
}
builder.AddHeader("Accept", "application/json")
builder.AddHeader("Content-Type", "application/json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

Expand Down Expand Up @@ -17213,7 +17222,7 @@ func (vpc *VpcV1) GetSecurityGroupRuleWithContext(ctx context.Context, getSecuri
builder.AddHeader(headerName, headerValue)
}
builder.AddHeader("Accept", "application/json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

Expand Down Expand Up @@ -17280,7 +17289,7 @@ func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, update
}
builder.AddHeader("Accept", "application/json")
builder.AddHeader("Content-Type", "application/merge-patch+json")

builder.AddQuery("maturity", "development")
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

Expand Down
4 changes: 3 additions & 1 deletion ibm/service/vpc/data_source_ibm_is_security_group_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ func dataSourceIBMIsSecurityGroupRulesRead(d *schema.ResourceData, meta interfac
l["href"] = *rulex.Href
l["id"] = *rulex.ID
l["ip_version"] = *rulex.IPVersion
l["code"] = *rulex.Code
if rulex.Code != nil {
l["code"] = *rulex.Code
}
l["protocol"] = *rulex.Protocol
l["type"] = *rulex.Type
// remote
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func testAccCheckIBMISsecurityGroupRuleConfig(vpcname, name string) string {
group = ibm_is_security_group.testacc_security_group.id
direction = "inbound"
remote = "127.0.0.1"
local = "192.168.3.4"
tcp {
}
}
Expand Down

0 comments on commit 777ac43

Please sign in to comment.