Skip to content

Commit

Permalink
[minor_change] Add encap attribute to the relation_l3ext_rs_dyn_path_…
Browse files Browse the repository at this point in the history
…att attribute of aci_l3out_floating_svi (CiscoDevNet#1027)
  • Loading branch information
shrsr authored Mar 17, 2023
1 parent 7b34321 commit 9ab46da
Show file tree
Hide file tree
Showing 12 changed files with 347 additions and 11 deletions.
9 changes: 7 additions & 2 deletions aci/resource_aci_l3extvirtuallifp.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ func resourceAciVirtualLogicalInterfaceProfile() *schema.Resource {
Optional: true,
Default: "",
},
"encap": {
Type: schema.TypeString,
Optional: true,
},
},
},
},
Expand Down Expand Up @@ -281,6 +285,7 @@ func getAndSetL3extRsDynPathAttFromLogicalInterfaceProfile(client *client.Client
obj["forged_transmit"] = l3extRsDynPathObj["forgedTransmit"]
obj["mac_change"] = l3extRsDynPathObj["macChange"]
obj["promiscuous_mode"] = l3extRsDynPathObj["promMode"]
obj["encap"] = l3extRsDynPathObj["encap"]
obj["enhanced_lag_policy_dn"] = getL3extRsVSwitchEnhancedLagPol(client, dn, l3extRsDynPathObj["tDn"])
l3extRsDynPaths = append(l3extRsDynPaths, obj)
}
Expand Down Expand Up @@ -391,7 +396,7 @@ func resourceAciVirtualLogicalInterfaceProfileCreate(ctx context.Context, d *sch
relationParamList := relationTol3extRsDynPathAtt.(*schema.Set).List()
for _, relationParam := range relationParamList {
paramMap := relationParam.(map[string]interface{})
err = aciClient.CreateRelationl3extRsDynPathAttFromLogicalInterfaceProfile(l3extVirtualLIfP.DistinguishedName, paramMap["tdn"].(string), paramMap["floating_address"].(string), paramMap["forged_transmit"].(string), paramMap["mac_change"].(string), paramMap["promiscuous_mode"].(string))
err = aciClient.CreateRelationl3extRsDynPathAttFromLogicalInterfaceProfile(l3extVirtualLIfP.DistinguishedName, paramMap["tdn"].(string), paramMap["floating_address"].(string), paramMap["forged_transmit"].(string), paramMap["mac_change"].(string), paramMap["promiscuous_mode"].(string), paramMap["encap"].(string))
if err != nil {
return diag.FromErr(err)
}
Expand Down Expand Up @@ -501,7 +506,7 @@ func resourceAciVirtualLogicalInterfaceProfileUpdate(ctx context.Context, d *sch
}
for _, relationParam := range newRelList {
paramMap := relationParam.(map[string]interface{})
err = aciClient.CreateRelationl3extRsDynPathAttFromLogicalInterfaceProfile(l3extVirtualLIfP.DistinguishedName, paramMap["tdn"].(string), paramMap["floating_address"].(string), paramMap["forged_transmit"].(string), paramMap["mac_change"].(string), paramMap["promiscuous_mode"].(string))
err = aciClient.CreateRelationl3extRsDynPathAttFromLogicalInterfaceProfile(l3extVirtualLIfP.DistinguishedName, paramMap["tdn"].(string), paramMap["floating_address"].(string), paramMap["forged_transmit"].(string), paramMap["mac_change"].(string), paramMap["promiscuous_mode"].(string), paramMap["encap"].(string))
if err != nil {
return diag.FromErr(err)
}
Expand Down
1 change: 1 addition & 0 deletions examples/l3out_floating_svi/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ resource "aci_l3out_floating_svi" "example2" {
relation_l3ext_rs_dyn_path_att {
tdn = aci_physical_domain.example.id
floating_address = "10.21.30.254/16"
encap = "vlan-1"
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-aci
go 1.18

require (
github.com/ciscoecosystem/aci-go-client/v2 v2.7.5
github.com/ciscoecosystem/aci-go-client/v2 v2.9.0
github.com/ghodss/yaml v1.0.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0
)
Expand Down
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/ciscoecosystem/aci-go-client/v2 v2.7.5 h1:pyl32ECE2W92R6s4dGzG3JZRL8+9bLw674I0JilcM9E=
github.com/ciscoecosystem/aci-go-client/v2 v2.7.5/go.mod h1:ZeJuaKr9gTRn5B1CwA3sVSVqnRjVMEcBc8LUX222wf0=
github.com/ciscoecosystem/aci-go-client/v2 v2.9.0 h1:dbQnWlK+oUc+mF0VX/pM9qmExqtvuL0gAns5TOegeF0=
github.com/ciscoecosystem/aci-go-client/v2 v2.9.0/go.mod h1:0uk5hiHANgXo+0h+Z8dFBriB7hHnI0PSGVUm7/20bt4=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down Expand Up @@ -343,6 +343,7 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9ab46da

Please sign in to comment.