-
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 cli device template resource and data source
- Loading branch information
Showing
15 changed files
with
196 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
resource "sdwan_cli_device_template" "test" { | ||
name = "cli_template_1" | ||
description = "Terraform integration test" | ||
resource "sdwan_cli_device_template" "example" { | ||
name = "Example" | ||
description = "My description" | ||
device_type = "vedge-ISR-4331" | ||
cli_type = "device" | ||
cli_configuration = <<-EOT | ||
system | ||
host-name {{test}}-ISR4331-1200-1 | ||
EOT | ||
cli_configuration = " system\n host-name R1-ISR4331-1200-1" | ||
} |
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,46 @@ | ||
--- | ||
name: CLI Device Template | ||
rest_endpoint: /template/device/ | ||
get_rest_endpoint: /template/device/object/ | ||
post_rest_endpoint: /template/device/cli/ | ||
has_version: true | ||
id_attribute: templateId | ||
doc_category: Device Templates | ||
attributes: | ||
- model_name: configType | ||
type: String | ||
value: file | ||
- model_name: factoryDefault | ||
Type: Bool | ||
value: false | ||
- model_name: templateName | ||
tf_name: name | ||
type: String | ||
mandatory: true | ||
description: The name of the device template | ||
example: Example | ||
- model_name: templateDescription | ||
tf_name: description | ||
type: String | ||
mandatory: true | ||
description: The description of the device template | ||
example: My description | ||
- model_name: deviceType | ||
tf_name: device_type | ||
type: String | ||
mandatory: true | ||
description: The device type (e.g., `vedge-ISR-4331`) | ||
example: vedge-ISR-4331 | ||
- model_name: cliType | ||
tf_name: cli_type | ||
type: String | ||
mandatory: true | ||
enum_values: [device, intend] | ||
description: CLI type | ||
example: device | ||
- model_name: templateConfiguration | ||
tf_name: cli_configuration | ||
type: String | ||
mandatory: true | ||
description: CLI configuration | ||
example: " system\\n host-name R1-ISR4331-1200-1" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 12 additions & 7 deletions
19
internal/provider/data_source_sdwan_cli_device_template.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 9 additions & 6 deletions
15
internal/provider/data_source_sdwan_cli_device_template_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.