-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor preferred color group policy object resource and data source
- Loading branch information
Showing
14 changed files
with
283 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
examples/resources/sdwan_preferred_color_group_policy_object/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
resource "sdwan_preferred_color_group_policy_object" "example" { | ||
name = "Example" | ||
entries = [ | ||
{ | ||
primary_color_preference = "blue bronze" | ||
primary_path_preference = "direct-path" | ||
secondary_color_preference = "3g" | ||
secondary_path_preference = "multi-hop-path" | ||
tertiary_color_preference = "custom1" | ||
tertiary_path_preference = "all-paths" | ||
} | ||
] | ||
name = "Example" | ||
primary_color_preference = "blue bronze" | ||
primary_path_preference = "direct-path" | ||
secondary_color_preference = "3g" | ||
secondary_path_preference = "multi-hop-path" | ||
tertiary_color_preference = "custom1" | ||
tertiary_path_preference = "all-paths" | ||
} |
55 changes: 55 additions & 0 deletions
55
gen/definitions/generic/preferred_color_group_policy_object.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
name: Preferred Color Group Policy Object | ||
rest_endpoint: /template/policy/list/preferredcolorgroup/ | ||
has_version: true | ||
id_attribute: listId | ||
doc_category: Policy Objects | ||
attributes: | ||
- model_name: type | ||
value: preferredColorGroup | ||
- model_name: name | ||
tf_name: name | ||
type: String | ||
mandatory: true | ||
description: The name of the policy object | ||
example: Example | ||
- model_name: colorPreference | ||
data_path: [entries.0, primaryPreference] | ||
tf_name: primary_color_preference | ||
type: String | ||
mandatory: true | ||
description: Color or space separated list of colors | ||
example: blue bronze | ||
- model_name: pathPreference | ||
data_path: [entries.0, primaryPreference] | ||
tf_name: primary_path_preference | ||
type: String | ||
enum_values: [direct-path, multi-hop-path, all-paths] | ||
description: Path preference | ||
example: direct-path | ||
- model_name: colorPreference | ||
data_path: [entries.0, secondaryPreference] | ||
tf_name: secondary_color_preference | ||
type: String | ||
description: Color or space separated list of colors | ||
example: 3g | ||
- model_name: pathPreference | ||
data_path: [entries.0, secondaryPreference] | ||
tf_name: secondary_path_preference | ||
type: String | ||
enum_values: [direct-path, multi-hop-path, all-paths] | ||
description: Path preference | ||
example: multi-hop-path | ||
- model_name: colorPreference | ||
data_path: [entries.0, tertiaryPreference] | ||
tf_name: tertiary_color_preference | ||
type: String | ||
description: Color or space separated list of colors | ||
example: custom1 | ||
- model_name: pathPreference | ||
data_path: [entries.0, tertiaryPreference] | ||
tf_name: tertiary_path_preference | ||
type: String | ||
enum_values: [direct-path, multi-hop-path, all-paths] | ||
description: Path preference | ||
example: all-paths |
This file was deleted.
Oops, something went wrong.
60 changes: 26 additions & 34 deletions
60
internal/provider/data_source_sdwan_preferred_color_group_policy_object.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
30 changes: 15 additions & 15 deletions
30
internal/provider/data_source_sdwan_preferred_color_group_policy_object_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.