Skip to content

Commit

Permalink
Fix vpn interface feature template attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Nov 22, 2023
1 parent 12dde0e commit a90dca9
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 172 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.2.11 (unreleased)

- Fix idempotency issue with various resource and boolean values
- Remove redundant `per_tunnel_qos` and `per_tunnel_qos_aggregator` attributes from `sdwan_cisco_vpn_interface_feature_template` resource and data source

## 0.2.10

Expand Down
4 changes: 0 additions & 4 deletions docs/data-sources/cisco_vpn_interface_feature_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ data "sdwan_cisco_vpn_interface_feature_template" "example" {
- `nat_pool_range_start_variable` (String) Variable name
- `nat_type` (String) NAT type
- `nat_type_variable` (String) Variable name
- `per_tunnel_qos` (Boolean) Per-tunnel Qos
- `per_tunnel_qos_aggregator` (Boolean) Per-tunnel QoS Aggregator
- `per_tunnel_qos_aggregator_variable` (String) Variable name
- `per_tunnel_qos_variable` (String) Variable name
- `poe` (Boolean) Configure interface as Power-over-Ethernet source
- `poe_variable` (String) Variable name
- `propagate_sgt` (Boolean) Enable/Disable CTS SGT propagation on an interface.
Expand Down
5 changes: 5 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ description: |-

# Changelog

## 0.2.11 (unreleased)

- Fix idempotency issue with various resource and boolean values
- Remove redundant `per_tunnel_qos` and `per_tunnel_qos_aggregator` attributes from `sdwan_cisco_vpn_interface_feature_template` resource and data source

## 0.2.10

- Fix issue with `sdwan_cisco_ospf_feature_template` resource when not configuring route policies
Expand Down
8 changes: 0 additions & 8 deletions docs/resources/cisco_vpn_interface_feature_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ resource "sdwan_cisco_vpn_interface_feature_template" "example" {
}
]
tunnel_interface_border = false
per_tunnel_qos = false
per_tunnel_qos_aggregator = false
tunnel_qos_mode = "spoke"
tunnel_bandwidth = 50
tunnel_interface_groups = [5]
Expand Down Expand Up @@ -352,12 +350,6 @@ resource "sdwan_cisco_vpn_interface_feature_template" "example" {
- Choices: `interface`, `pool`, `loopback`
- Default value: `interface`
- `nat_type_variable` (String) Variable name
- `per_tunnel_qos` (Boolean) Per-tunnel Qos
- Default value: `false`
- `per_tunnel_qos_aggregator` (Boolean) Per-tunnel QoS Aggregator
- Default value: `false`
- `per_tunnel_qos_aggregator_variable` (String) Variable name
- `per_tunnel_qos_variable` (String) Variable name
- `poe` (Boolean) Configure interface as Power-over-Ethernet source
- Default value: `false`
- `poe_variable` (String) Variable name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ resource "sdwan_cisco_vpn_interface_feature_template" "example" {
}
]
tunnel_interface_border = false
per_tunnel_qos = false
per_tunnel_qos_aggregator = false
tunnel_qos_mode = "spoke"
tunnel_bandwidth = 50
tunnel_interface_groups = [5]
Expand Down
3 changes: 3 additions & 0 deletions gen/definitions/feature_templates/cisco_ospf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ attributes:
example: true
- model_name: always
tf_name: default_information_originate_always
exclude_ignore: true
example: true
- model_name: metric
tf_name: default_information_originate_metric
exclude_ignore: true
example: 100
- model_name: metric-type
tf_name: default_information_originate_metric_type
exclude_ignore: true
example: type1
- model_name: external
tf_name: distance_external
Expand Down
12 changes: 8 additions & 4 deletions gen/definitions/feature_templates/cisco_vpn_interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,9 @@ attributes:
tf_name: tunnel_interface_border
exclude_ignore: true
example: false
- model_name: per-tunnel-qos
example: false
- model_name: per-tunnel-qos-aggregator
example: false
- model_name: mode
tf_name: tunnel_qos_mode
exclude_ignore: true
example: spoke
- model_name: tunnels-bandwidth
tf_name: tunnel_bandwidth
Expand Down Expand Up @@ -358,24 +355,31 @@ attributes:
example: false
- model_name: period
tf_name: qos_adaptive_period
exclude_ignore: true
example: 15
- model_name: bandwidth-down
tf_name: qos_adaptive_bandwidth_downstream
exclude_ignore: true
example: 10000
- model_name: dmin
tf_name: qos_adaptive_min_downstream
exclude_ignore: true
example: 100
- model_name: dmax
tf_name: qos_adaptive_max_downstream
exclude_ignore: true
example: 100000
- model_name: bandwidth-up
tf_name: qos_adaptive_bandwidth_upstream
exclude_ignore: true
example: 10000
- model_name: umin
tf_name: qos_adaptive_min_upstream
exclude_ignore: true
example: 100
- model_name: umax
tf_name: qos_adaptive_max_upstream
exclude_ignore: true
example: 100000
- model_name: shaping-rate
example: 1000
Expand Down
2 changes: 1 addition & 1 deletion gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func parseFeatureTemplateAttribute(attr *YamlConfigAttribute, model gjson.Result
variable = true
}
}
if !ignore && r.Get("objectType").String() != "tree" {
if !ignore && r.Get("objectType").String() != "tree" && !attr.ExcludeIgnore {
attr.Mandatory = true
}
if variable && r.Get("objectType").String() != "tree" && !attr.NodeOnlyContainer {
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.

6 changes: 0 additions & 6 deletions internal/provider/model_sdwan_cisco_ospf_feature_template.go

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

Loading

0 comments on commit a90dca9

Please sign in to comment.