Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the configlet code to use ConfigletData #259

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apstra/design/configlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (o Configlet) ResourceAttributes() map[string]resourceSchema.Attribute {
}
}

func (o *Configlet) Request(ctx context.Context, diags *diag.Diagnostics) *apstra.ConfigletRequest {
func (o *Configlet) Request(ctx context.Context, diags *diag.Diagnostics) *apstra.ConfigletData {
var d diag.Diagnostics

// We only use the Datacenter Reference Design
Expand All @@ -99,7 +99,7 @@ func (o *Configlet) Request(ctx context.Context, diags *diag.Diagnostics) *apstr
return nil
}

return &apstra.ConfigletRequest{
return &apstra.ConfigletData{
DisplayName: o.Name.ValueString(),
RefArchs: refArchs,
Generators: generators,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/IBM/netaddr v1.5.0
github.com/Juniper/apstra-go-sdk v0.0.0-20230804015905-9e789ed51c47
github.com/Juniper/apstra-go-sdk v0.0.0-20230806151824-b9ff51f7c6e9
github.com/chrismarget-j/go-licenses v0.0.0-20230424163011-d60082a506e0
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/terraform-plugin-docs v0.13.0
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/IBM/netaddr v1.5.0 h1:IJlFZe1+nFs09TeMB/HOP4+xBnX2iM/xgiDOgZgTJq0=
github.com/IBM/netaddr v1.5.0/go.mod h1:DDBPeYgbFzoXHjSz9Jwk7K8wmWV4+a/Kv0LqRnb8we4=
github.com/Juniper/apstra-go-sdk v0.0.0-20230804015905-9e789ed51c47 h1:rZmaCdY69aASEOnNm2QpOr8frX5CfLCzMys61I0BrMk=
github.com/Juniper/apstra-go-sdk v0.0.0-20230804015905-9e789ed51c47/go.mod h1:/bOt1ftHy9phf3PPgxMH5d/41S3N9xpxzeOj8JMLh2E=
github.com/Juniper/apstra-go-sdk v0.0.0-20230802183107-9ab5c1f1cc78 h1:peEAGiVd9iVGWTvz3lWx5HrBpWy+CCMDGGzJ13N/29Q=
github.com/Juniper/apstra-go-sdk v0.0.0-20230802183107-9ab5c1f1cc78/go.mod h1:/bOt1ftHy9phf3PPgxMH5d/41S3N9xpxzeOj8JMLh2E=
github.com/Juniper/apstra-go-sdk v0.0.0-20230806151824-b9ff51f7c6e9 h1:s7DALDCl/A3P10NO4EuQgPXi0tCEnyVjeGhmiSrvkFc=
github.com/Juniper/apstra-go-sdk v0.0.0-20230806151824-b9ff51f7c6e9/go.mod h1:/bOt1ftHy9phf3PPgxMH5d/41S3N9xpxzeOj8JMLh2E=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
Expand Down