Skip to content

Commit dfeebff

Browse files
committed
First take
1 parent 7f7db99 commit dfeebff

File tree

400 files changed

+129113
-29914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+129113
-29914
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ website/node_modules
2424
*.iml
2525
*.test
2626
*.iml
27+
.env
2728

2829
website/vendor
2930

docs/data-sources/restconf.md renamed to docs/data-sources/yang.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
3-
page_title: "iosxe_restconf Data Source - terraform-provider-iosxe"
3+
page_title: "iosxe_yang Data Source - terraform-provider-iosxe"
44
subcategory: "General"
55
description: |-
6-
This data source can retrieve one or more attributes via RESTCONF.
6+
This data source can retrieve one or more attributes via YANG paths.
77
---
88

9-
# iosxe_restconf (Data Source)
9+
# iosxe_yang (Data Source)
1010

11-
This data source can retrieve one or more attributes via RESTCONF.
11+
This data source can retrieve one or more attributes via YANG paths.
1212

1313
## Example Usage
1414

1515
```terraform
16-
data "iosxe_restconf" "example" {
16+
data "iosxe_yang" "example" {
1717
path = "Cisco-IOS-XE-native:native/banner/login"
1818
}
1919
```
@@ -23,7 +23,7 @@ data "iosxe_restconf" "example" {
2323

2424
### Required
2525

26-
- `path` (String) A RESTCONF path, e.g. `openconfig-interfaces:interfaces`.
26+
- `path` (String) A YANG path, e.g. `openconfig-interfaces:interfaces`.
2727

2828
### Optional
2929

docs/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ provider "iosxe" {
5151
### Optional
5252

5353
- `devices` (Attributes List) This can be used to manage a list of devices from a single provider. All devices must use the same credentials. Each resource and data source has an optional attribute named `device`, which can then select a device by its name from this list. (see [below for nested schema](#nestedatt--devices))
54+
- `host` (String) Hostname or IP address of the Cisco IOS-XE device. Optionally a port can be added with `:port`. Default port is `443` for RESTCONF and `830` for NETCONF. This can also be set as the IOSXE_HOST environment variable.
5455
- `insecure` (Boolean) Allow insecure HTTPS client. This can also be set as the IOSXE_INSECURE environment variable. Defaults to `true`.
5556
- `lock_release_timeout` (Number) Number of seconds to wait for the device database lock to be released. This can also be set as the IOSXE_LOCK_RELEASE_TIMEOUT environment variable. Defaults to `120`.
5657
- `password` (String, Sensitive) Password for the IOS-XE device. This can also be set as the IOSXE_PASSWORD environment variable.
58+
- `protocol` (String) Protocol to use for device communication. Either `restconf` (HTTPS) or `netconf` (SSH). This can also be set as the IOSXE_PROTOCOL environment variable. Defaults to `restconf`.
5759
- `retries` (Number) Number of retries for REST API calls. This can also be set as the IOSXE_RETRIES environment variable. Defaults to `10`.
5860
- `selected_devices` (List of String) This can be used to select a list of devices to manage from the `devices` list. Selected devices will be managed while other devices will be skipped and their state will be frozen. This can be used to deploy changes to a subset of devices. Defaults to all devices.
59-
- `url` (String) URL of the Cisco IOS-XE device. Optionally a port can be added with `:12345`. The default port is `443`. This can also be set as the IOSXE_URL environment variable.
61+
- `url` (String, Deprecated) URL of the Cisco IOS-XE device for RESTCONF protocol. Optionally a port can be added with `:12345`. The default port is `443`. This can also be set as the IOSXE_URL environment variable. **Deprecated: Use `host` instead for protocol-agnostic configuration.**
6062
- `username` (String) Username for the IOS-XE device. This can also be set as the IOSXE_USERNAME environment variable.
6163

6264
<a id="nestedatt--devices"></a>
@@ -65,8 +67,9 @@ provider "iosxe" {
6567
Required:
6668

6769
- `name` (String) Device name.
68-
- `url` (String) URL of the Cisco IOS-XE device.
6970

7071
Optional:
7172

72-
- `managed` (Boolean) Enable or disable device management. This can be used to temporarily skip a device due to maintainance for example. Defaults to `true`.
73+
- `host` (String) Hostname or IP address of the Cisco IOS-XE device. Optionally a port can be added with `:port`.
74+
- `managed` (Boolean) Enable or disable device management. This can be used to temporarily skip a device due to maintainance for example. Defaults to `true`.
75+
- `url` (String, Deprecated) URL of the Cisco IOS-XE device for RESTCONF protocol. **Deprecated: Use `host` instead.**

docs/resources/restconf.md renamed to docs/resources/yang.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
3-
page_title: "iosxe_restconf Resource - terraform-provider-iosxe"
3+
page_title: "iosxe_yang Resource - terraform-provider-iosxe"
44
subcategory: "General"
55
description: |-
6-
Manages IOS-XE objects via RESTCONF calls. This resource can only manage a single object. It is able to read the state and therefore reconcile configuration drift.
6+
Manages IOS-XE objects via YANG paths. This resource can only manage a single object. It is able to read the state and therefore reconcile configuration drift.
77
---
88

9-
# iosxe_restconf (Resource)
9+
# iosxe_yang (Resource)
1010

11-
Manages IOS-XE objects via RESTCONF calls. This resource can only manage a single object. It is able to read the state and therefore reconcile configuration drift.
11+
Manages IOS-XE objects via YANG paths. This resource can only manage a single object. It is able to read the state and therefore reconcile configuration drift.
1212

1313
## Example Usage
1414

1515
```terraform
16-
resource "iosxe_restconf" "simple" {
16+
resource "iosxe_yang" "simple" {
1717
path = "Cisco-IOS-XE-native:native/banner/login"
1818
attributes = {
1919
banner = "My Banner"
2020
}
2121
}
2222
23-
resource "iosxe_restconf" "nested_list" {
23+
resource "iosxe_yang" "nested_list" {
2424
path = "Cisco-IOS-XE-native:native/ip"
2525
attributes = {
2626
source-route = "true"
@@ -42,7 +42,7 @@ resource "iosxe_restconf" "nested_list" {
4242

4343
### Required
4444

45-
- `path` (String) A RESTCONF path, e.g. `openconfig-interfaces:interfaces`.
45+
- `path` (String) A YANG path, e.g. `openconfig-interfaces:interfaces`.
4646

4747
### Optional
4848

@@ -75,5 +75,5 @@ Import is supported using the following syntax:
7575
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
7676

7777
```shell
78-
terraform import iosxe_restconf.example "Cisco-IOS-XE-native:native/banner/login"
78+
terraform import iosxe_yang.example "Cisco-IOS-XE-native:native/banner/login"
7979
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
data "iosxe_restconf" "example" {
1+
data "iosxe_yang" "example" {
22
path = "Cisco-IOS-XE-native:native/banner/login"
33
}

examples/resources/iosxe_restconf/import.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import iosxe_yang.example "Cisco-IOS-XE-native:native/banner/login"

examples/resources/iosxe_restconf/resource.tf renamed to examples/resources/iosxe_yang/resource.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
resource "iosxe_restconf" "simple" {
1+
resource "iosxe_yang" "simple" {
22
path = "Cisco-IOS-XE-native:native/banner/login"
33
attributes = {
44
banner = "My Banner"
55
}
66
}
77

8-
resource "iosxe_restconf" "nested_list" {
8+
resource "iosxe_yang" "nested_list" {
99
path = "Cisco-IOS-XE-native:native/ip"
1010
attributes = {
1111
source-route = "true"

gen/doc_category.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ func main() {
8484
}
8585
}
8686

87-
// update iosxe_restconf resource and data source
87+
// update iosxe_yang resource and data source
8888
for _, path := range docPaths {
89-
filename := path + "restconf.md"
89+
filename := path + "yang.md"
9090
content, err := os.ReadFile(filename)
9191
if err != nil {
9292
log.Fatalf("Error opening documentation: %v", err)

gen/templates/data_source.go

Lines changed: 21 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)