Skip to content

Commit 07de433

Browse files
Add mpls resource (#385)
1 parent 995c9a0 commit 07de433

File tree

12 files changed

+2151
-0
lines changed

12 files changed

+2151
-0
lines changed

docs/data-sources/mpls.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "iosxe_mpls Data Source - terraform-provider-iosxe"
4+
subcategory: "MPLS"
5+
description: |-
6+
This data source can read the MPLS configuration.
7+
---
8+
9+
# iosxe_mpls (Data Source)
10+
11+
This data source can read the MPLS configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "iosxe_mpls" "example" {
17+
}
18+
```
19+
20+
<!-- schema generated by tfplugindocs -->
21+
## Schema
22+
23+
### Optional
24+
25+
- `device` (String) A device name from the provider configuration.
26+
27+
### Read-Only
28+
29+
- `id` (String) The path of the retrieved object.
30+
- `label_mode_all_vrfs_protocol_all_afs_per_ce` (Boolean) Per CE label
31+
- `label_mode_all_vrfs_protocol_all_afs_per_prefix` (Boolean) Per prefix label (default)
32+
- `label_mode_all_vrfs_protocol_all_afs_per_vrf` (Boolean) Per VRF label for entire VRF
33+
- `label_mode_all_vrfs_protocol_all_afs_vrf_conn_aggr` (Boolean) Per VRF label for connected and BGP aggregates in VRF
34+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_per_ce` (Boolean) Per CE label
35+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_per_prefix` (Boolean) Per prefix label (default)
36+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_per_vrf` (Boolean) Per VRF label for entire VRF
37+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_vrf_conn_aggr` (Boolean) Per VRF label for connected and BGP aggregates in VRF
38+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_per_ce` (Boolean) Per CE label
39+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_per_prefix` (Boolean) Per prefix label (default)
40+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_per_vrf` (Boolean) Per VRF label for entire VRF
41+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_vrf_conn_aggr` (Boolean) Per VRF label for connected and BGP aggregates in VRF
42+
- `label_protocol` (String) Set platform default label distribution protocol

docs/resources/mpls.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "iosxe_mpls Resource - terraform-provider-iosxe"
4+
subcategory: "MPLS"
5+
description: |-
6+
This resource can manage the MPLS configuration.
7+
---
8+
9+
# iosxe_mpls (Resource)
10+
11+
This resource can manage the MPLS configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "iosxe_mpls" "example" {
17+
label_mode_all_vrfs_protocol_all_afs_per_vrf = true
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Optional
25+
26+
- `delete_mode` (String) Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is `all`.
27+
- Choices: `all`, `attributes`
28+
- `device` (String) A device name from the provider configuration.
29+
- `label_mode_all_vrfs_protocol_all_afs_per_ce` (Boolean) Per CE label
30+
- `label_mode_all_vrfs_protocol_all_afs_per_prefix` (Boolean) Per prefix label (default)
31+
- `label_mode_all_vrfs_protocol_all_afs_per_vrf` (Boolean) Per VRF label for entire VRF
32+
- `label_mode_all_vrfs_protocol_all_afs_vrf_conn_aggr` (Boolean) Per VRF label for connected and BGP aggregates in VRF
33+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_per_ce` (Boolean) Per CE label
34+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_per_prefix` (Boolean) Per prefix label (default)
35+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_per_vrf` (Boolean) Per VRF label for entire VRF
36+
- `label_mode_all_vrfs_protocol_bgp_vpnv4_vrf_conn_aggr` (Boolean) Per VRF label for connected and BGP aggregates in VRF
37+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_per_ce` (Boolean) Per CE label
38+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_per_prefix` (Boolean) Per prefix label (default)
39+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_per_vrf` (Boolean) Per VRF label for entire VRF
40+
- `label_mode_all_vrfs_protocol_bgp_vpnv6_vrf_conn_aggr` (Boolean) Per VRF label for connected and BGP aggregates in VRF
41+
- `label_protocol` (String) Set platform default label distribution protocol
42+
- Choices: `ldp`, `tdp`
43+
44+
### Read-Only
45+
46+
- `id` (String) The path of the object.
47+
48+
## Import
49+
50+
Import is supported using the following syntax:
51+
52+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
53+
54+
```shell
55+
terraform import iosxe_mpls.example ""
56+
```
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
data "iosxe_mpls" "example" {
2+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import iosxe_mpls.example ""
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
resource "iosxe_mpls" "example" {
2+
label_mode_all_vrfs_protocol_all_afs_per_vrf = true
3+
}

gen/definitions/mpls.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: MPLS
3+
path: Cisco-IOS-XE-native:native/mpls
4+
doc_category: MPLS
5+
test_tags: [IOSXE1715]
6+
attributes:
7+
- yang_name: Cisco-IOS-XE-mpls:label/protocol
8+
example: ldp
9+
exclude_test: true
10+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/all-afs/label-mode-choice/per-vrf/per-vrf
11+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/all-afs/per-vrf
12+
tf_name: label_mode_all_vrfs_protocol_all_afs_per_vrf
13+
example: true
14+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/all-afs/label-mode-choice/per-prefix/per-prefix
15+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/all-afs/per-prefix
16+
tf_name: label_mode_all_vrfs_protocol_all_afs_per_prefix
17+
example: true
18+
exclude_test: true
19+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/all-afs/label-mode-choice/per-ce/per-ce
20+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/all-afs/per-ce
21+
tf_name: label_mode_all_vrfs_protocol_all_afs_per_ce
22+
example: true
23+
exclude_test: true
24+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/all-afs/label-mode-choice/vrf-conn-aggr/vrf-conn-aggr
25+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/all-afs/vrf-conn-aggr
26+
tf_name: label_mode_all_vrfs_protocol_all_afs_vrf_conn_aggr
27+
example: true
28+
exclude_test: true
29+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv4/label-mode-choice/per-vrf/per-vrf
30+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv4/per-vrf
31+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv4_per_vrf
32+
example: true
33+
exclude_test: true
34+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv4/label-mode-choice/per-prefix/per-prefix
35+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv4/per-prefix
36+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv4_per_prefix
37+
example: true
38+
exclude_test: true
39+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv4/label-mode-choice/per-ce/per-ce
40+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv4/per-ce
41+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv4_per_ce
42+
example: true
43+
exclude_test: true
44+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv4/label-mode-choice/vrf-conn-aggr/vrf-conn-aggr
45+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv4/vrf-conn-aggr
46+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv4_vrf_conn_aggr
47+
example: true
48+
exclude_test: true
49+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv6/label-mode-choice/per-vrf/per-vrf
50+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv6/per-vrf
51+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv6_per_vrf
52+
example: true
53+
exclude_test: true
54+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv6/label-mode-choice/per-prefix/per-prefix
55+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv6/per-prefix
56+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv6_per_prefix
57+
example: true
58+
exclude_test: true
59+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv6/label-mode-choice/per-ce/per-ce
60+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv6/per-ce
61+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv6_per_ce
62+
example: true
63+
exclude_test: true
64+
- yang_name: Cisco-IOS-XE-mpls:label/mode/mode-choice/all-vrfs/all-vrfs/protocol/bgp-vpnv6/label-mode-choice/vrf-conn-aggr/vrf-conn-aggr
65+
xpath: Cisco-IOS-XE-mpls:label/mode/all-vrfs/protocol/bgp-vpnv6/vrf-conn-aggr
66+
tf_name: label_mode_all_vrfs_protocol_bgp_vpnv6_vrf_conn_aggr
67+
example: true
68+
exclude_test: true

internal/provider/data_source_iosxe_mpls.go

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

0 commit comments

Comments
 (0)