Skip to content

Commit

Permalink
Adjust policy object feature profile resource and data source to hand…
Browse files Browse the repository at this point in the history
…le singleton pattern
  • Loading branch information
danischm committed Sep 6, 2024
1 parent 4528943 commit a8aaf84
Show file tree
Hide file tree
Showing 39 changed files with 274 additions and 271 deletions.
5 changes: 1 addition & 4 deletions docs/data-sources/policy_object_feature_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ data "sdwan_policy_object_feature_profile" "example" {
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The id of the object

### Read-Only

- `description` (String) Description
- `id` (String) The id of the object
- `name` (String) The name of the policy object feature profile
4 changes: 2 additions & 2 deletions docs/resources/policy_object_feature_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "sdwan_policy_object_feature_profile Resource - terraform-provider-sdwan"
subcategory: "Feature Profiles"
description: |-
This resource can manage a Policy Object Feature Profile .
SD-WAN manager supports only a single policy object feature profile to be configured. This resource will therefore either create a new one if none exists or update the existing one.
---

# sdwan_policy_object_feature_profile (Resource)

This resource can manage a Policy Object Feature Profile .
SD-WAN manager supports only a single policy object feature profile to be configured. This resource will therefore either create a new one if none exists or update the existing one.

## Example Usage

Expand Down
1 change: 1 addition & 0 deletions gen/definitions/generic/policy_object_feature_profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Policy Object Feature Profile
rest_endpoint: /v1/feature-profile/sdwan/policy-object/
id_attribute: id
res_description: SD-WAN manager supports only a single policy object feature profile to be configured. This resource will therefore either create a new one if none exists or update the existing one.
doc_category: Feature Profiles
test_tags: [SDWAN_2012]
attributes:
Expand Down
14 changes: 7 additions & 7 deletions gen/definitions/profile_parcels/policy_object_class_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object Class Map
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/class
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
skip_minimum_test: true
parcel_type: policy_object
attributes:
Expand All @@ -12,14 +12,14 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: queue
id: true
mandatory: true
example: 0
- model_name: queue
id: true
mandatory: true
example: 0

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
14 changes: 7 additions & 7 deletions gen/definitions/profile_parcels/policy_object_color_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object Color List
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/color
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
skip_minimum_test: true
parcel_type: policy_object
attributes:
Expand All @@ -12,14 +12,14 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: color
id: true
mandatory: true
example: blue
- model_name: color
id: true
mandatory: true
example: blue

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object Data IPv4 Prefix List
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/data-prefix
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
skip_minimum_test: true
parcel_type: policy_object
attributes:
Expand All @@ -12,17 +12,17 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: ipv4Address
id: true
mandatory: true
example: 10.0.0.0
- model_name: ipv4PrefixLength
mandatory: true
example: 8
- model_name: ipv4Address
id: true
mandatory: true
example: 10.0.0.0
- model_name: ipv4PrefixLength
mandatory: true
example: 8

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object Data IPv6 Prefix List
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/data-ipv6-prefix
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
skip_minimum_test: true
parcel_type: policy_object
attributes:
Expand All @@ -12,17 +12,17 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: ipv6Address
id: true
mandatory: true
example: 2001:db8:85a3::8a2e:370:7334
- model_name: ipv6PrefixLength
mandatory: true
example: 64
- model_name: ipv6Address
id: true
mandatory: true
example: 2001:db8:85a3::8a2e:370:7334
- model_name: ipv6PrefixLength
mandatory: true
example: 64

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object Expanded Community List
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/expanded-community
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
skip_minimum_test: true
parcel_type: policy_object
attributes:
Expand All @@ -12,12 +12,12 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: expandedCommunityList
tf_name: expanded_community_lists
id: true
mandatory: true
example: abcd

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object Extended Community List
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/ext-community
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
skip_minimum_test: true
parcel_type: policy_object
attributes:
Expand All @@ -12,15 +12,15 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: extCommunity
tf_name: extended_community
id: true
mandatory: true
example: "soo 10.0.0.1:30"
- model_name: extCommunity
tf_name: extended_community
id: true
mandatory: true
example: "soo 10.0.0.1:30"

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
38 changes: 19 additions & 19 deletions gen/definitions/profile_parcels/policy_object_ipv4_prefix_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object IPv4 Prefix List
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/prefix
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
parcel_type: policy_object
attributes:
- tf_name: feature_profile_id
Expand All @@ -11,26 +11,26 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: ipv4Address
id: true
mandatory: true
example: 10.0.0.0
minimum_test_value: '"10.0.0.0"'
- model_name: ipv4PrefixLength
id: true
mandatory: true
example: 8
minimum_test_value: '8'
- model_name: leRangePrefixLength
tf_name: le
example: 24
- model_name: geRangePrefixLength
tf_name: ge
example: 16
- model_name: ipv4Address
id: true
mandatory: true
example: 10.0.0.0
minimum_test_value: '"10.0.0.0"'
- model_name: ipv4PrefixLength
id: true
mandatory: true
example: 8
minimum_test_value: "8"
- model_name: leRangePrefixLength
tf_name: le
example: 24
- model_name: geRangePrefixLength
tf_name: ge
example: 16

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
38 changes: 19 additions & 19 deletions gen/definitions/profile_parcels/policy_object_ipv6_prefix_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object IPv6 Prefix List
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/ipv6-prefix
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
parcel_type: policy_object
attributes:
- tf_name: feature_profile_id
Expand All @@ -11,26 +11,26 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: ipv6Address
id: true
mandatory: true
example: 2001:db8:85a3::8a2e:370:7334
minimum_test_value: '"2001:db8:85a3::8a2e:370:7334"'
- model_name: ipv6PrefixLength
id: true
mandatory: true
example: 64
minimum_test_value: '64'
- model_name: leRangePrefixLength
tf_name: le
example: 100
- model_name: geRangePrefixLength
tf_name: ge
example: 70
- model_name: ipv6Address
id: true
mandatory: true
example: 2001:db8:85a3::8a2e:370:7334
minimum_test_value: '"2001:db8:85a3::8a2e:370:7334"'
- model_name: ipv6PrefixLength
id: true
mandatory: true
example: 64
minimum_test_value: "64"
- model_name: leRangePrefixLength
tf_name: le
example: 100
- model_name: geRangePrefixLength
tf_name: ge
example: 70

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
26 changes: 13 additions & 13 deletions gen/definitions/profile_parcels/policy_object_mirror.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Policy Object Mirror
rest_endpoint: /v1/feature-profile/sdwan/policy-object/%v/mirror
minimum_version: 20.12.0
test_tags: [SDWAN_2012, TF_VAR_policy_object_feature_template_id]
test_tags: [SDWAN_2012]
skip_minimum_test: true
parcel_type: policy_object
attributes:
Expand All @@ -12,20 +12,20 @@ attributes:
mandatory: true
description: Feature Profile ID
example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
test_value: var.policy_object_feature_template_id
test_value: data.sdwan_policy_object_feature_profile.test.id
- model_name: entries
mandatory: true
attributes:
- model_name: remoteDestIp
tf_name: remote_destination_ip
id: true
mandatory: true
example: 10.0.0.1
- model_name: sourceIp
tf_name: source_ip
id: true
mandatory: true
example: 10.0.0.2
- model_name: remoteDestIp
tf_name: remote_destination_ip
id: true
mandatory: true
example: 10.0.0.1
- model_name: sourceIp
tf_name: source_ip
id: true
mandatory: true
example: 10.0.0.2

test_prerequisites: |
variable "policy_object_feature_template_id" {}
data "sdwan_policy_object_feature_profile" "test" {}
Loading

0 comments on commit a8aaf84

Please sign in to comment.