Skip to content

Commit

Permalink
Add support for prefix list description (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
swarudka authored Mar 6, 2024
1 parent f70ae80 commit 5768470
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 6 deletions.
10 changes: 10 additions & 0 deletions docs/data-sources/prefix_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@ data "iosxe_prefix_list" "example" {
### Read-Only

- `id` (String) The path of the retrieved object.
- `prefix_list_description` (Attributes List) Describe about prefix-list entry (see [below for nested schema](#nestedatt--prefix_list_description))
- `prefixes` (Attributes List) Build prefix-lists with name ans seq.no (see [below for nested schema](#nestedatt--prefixes))

<a id="nestedatt--prefix_list_description"></a>
### Nested Schema for `prefix_list_description`

Read-Only:

- `description` (String) Prefix-list specific description
- `name` (String)


<a id="nestedatt--prefixes"></a>
### Nested Schema for `prefixes`

Expand Down
19 changes: 19 additions & 0 deletions docs/resources/prefix_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ resource "iosxe_prefix_list" "example" {
le = 32
}
]
prefix_list_description = [
{
name = "PREFIX_LIST_11"
description = "DIST_OF_THE_LIST"
}
]
}
```

Expand All @@ -33,12 +39,25 @@ resource "iosxe_prefix_list" "example" {
### Optional

- `device` (String) A device name from the provider configuration.
- `prefix_list_description` (Attributes List) Describe about prefix-list entry (see [below for nested schema](#nestedatt--prefix_list_description))
- `prefixes` (Attributes List) Build prefix-lists with name ans seq.no (see [below for nested schema](#nestedatt--prefixes))

### Read-Only

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

<a id="nestedatt--prefix_list_description"></a>
### Nested Schema for `prefix_list_description`

Required:

- `name` (String)

Optional:

- `description` (String) Prefix-list specific description


<a id="nestedatt--prefixes"></a>
### Nested Schema for `prefixes`

Expand Down
6 changes: 6 additions & 0 deletions examples/resources/iosxe_prefix_list/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@ resource "iosxe_prefix_list" "example" {
le = 32
}
]
prefix_list_description = [
{
name = "PREFIX_LIST_11"
description = "DIST_OF_THE_LIST"
}
]
}
8 changes: 8 additions & 0 deletions gen/definitions/prefix_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ attributes:
example: 24
- yang_name: le
example: 32
- yang_name: prefix-list-description
type: List
attributes:
- yang_name: name
example: PREFIX_LIST_11
id: true
- yang_name: description
example: DIST_OF_THE_LIST
16 changes: 16 additions & 0 deletions internal/provider/data_source_iosxe_prefix_list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions internal/provider/data_source_iosxe_prefix_list_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 104 additions & 6 deletions internal/provider/model_iosxe_prefix_list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions internal/provider/resource_iosxe_prefix_list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions internal/provider/resource_iosxe_prefix_list_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5768470

Please sign in to comment.