Skip to content

Resolve Issue #443 #482

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

Merged
merged 3 commits into from
Aug 7, 2025
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Manual resource - Modals toBody is manually configured to support sub interfaces.
name: Service LAN VPN Interface Ethernet
rest_endpoint: /v1/feature-profile/sdwan/service/%v/lan/vpn/%s/interface/ethernet
minimum_version: 20.12.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Manual resource - Modals toBody is manually configured to support sub interfaces.
name: Transport WAN VPN Interface Ethernet
rest_endpoint: /v1/feature-profile/sdwan/transport/%v/wan/vpn/%s/interface/ethernet
minimum_version: 20.12.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"fmt"
"net/url"
"strconv"
"strings"

"github.com/CiscoDevNet/terraform-provider-sdwan/internal/provider/helpers"
"github.com/hashicorp/terraform-plugin-framework/types"
Expand Down Expand Up @@ -232,7 +233,6 @@ func (data ServiceLANVPNInterfaceEthernet) getPath() string {

// End of section. //template:end getPath

// Section below is generated&owned by "gen/generator.go". //template:begin toBody
func (data ServiceLANVPNInterfaceEthernet) toBody(ctx context.Context) string {
body := ""
body, _ = sjson.Set(body, "name", data.Name.ValueString())
Expand Down Expand Up @@ -1143,7 +1143,7 @@ func (data ServiceLANVPNInterfaceEthernet) toBody(ctx context.Context) string {
body, _ = sjson.Set(body, path+"advanced.intrfMtu.value", data.InterfaceMtuVariable.ValueString())
}
} else if data.InterfaceMtu.IsNull() {
if true {
if !strings.Contains(data.InterfaceName.ValueString(), ".") {
body, _ = sjson.Set(body, path+"advanced.intrfMtu.optionType", "default")
body, _ = sjson.Set(body, path+"advanced.intrfMtu.value", 1500)
}
Expand Down Expand Up @@ -1326,8 +1326,6 @@ func (data ServiceLANVPNInterfaceEthernet) toBody(ctx context.Context) string {
return body
}

// End of section. //template:end toBody

// Section below is generated&owned by "gen/generator.go". //template:begin fromBody
func (data *ServiceLANVPNInterfaceEthernet) fromBody(ctx context.Context, res gjson.Result) {
data.Name = types.StringValue(res.Get("payload.name").String())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"context"
"fmt"
"net/url"
"strings"

"github.com/CiscoDevNet/terraform-provider-sdwan/internal/provider/helpers"
"github.com/hashicorp/terraform-plugin-framework/types"
Expand Down Expand Up @@ -298,7 +299,6 @@ func (data TransportWANVPNInterfaceEthernet) getPath() string {

// End of section. //template:end getPath

// Section below is generated&owned by "gen/generator.go". //template:begin toBody
func (data TransportWANVPNInterfaceEthernet) toBody(ctx context.Context) string {
body := ""
body, _ = sjson.Set(body, "name", data.Name.ValueString())
Expand Down Expand Up @@ -1791,7 +1791,7 @@ func (data TransportWANVPNInterfaceEthernet) toBody(ctx context.Context) string
body, _ = sjson.Set(body, path+"advanced.intrfMtu.value", data.InterfaceMtuVariable.ValueString())
}
} else if data.InterfaceMtu.IsNull() {
if true {
if !strings.Contains(data.InterfaceName.ValueString(), ".") {
body, _ = sjson.Set(body, path+"advanced.intrfMtu.optionType", "default")
body, _ = sjson.Set(body, path+"advanced.intrfMtu.value", 1500)
}
Expand Down Expand Up @@ -1991,8 +1991,6 @@ func (data TransportWANVPNInterfaceEthernet) toBody(ctx context.Context) string
return body
}

// End of section. //template:end toBody

// Section below is generated&owned by "gen/generator.go". //template:begin fromBody
func (data *TransportWANVPNInterfaceEthernet) fromBody(ctx context.Context, res gjson.Result) {
data.Name = types.StringValue(res.Get("payload.name").String())
Expand Down