Skip to content

Commit

Permalink
Add pim anycast rp peer resource
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed May 19, 2022
1 parent fe9dc6f commit 1d38f5a
Show file tree
Hide file tree
Showing 20 changed files with 706 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.3.13 (unreleased)

- Add nxos_pim_anycast_rp resource and data source
- Add nxos_pim_anycast_rp_peer resource and data source

## 0.3.12

Expand Down
43 changes: 43 additions & 0 deletions docs/data-sources/pim_anycast_rp_peer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_pim_anycast_rp_peer Data Source - terraform-provider-nxos"
subcategory: "PIM"
description: |-
This data source can read the PIM Anycast RP peer configuration.
API Documentation: pimAcastRPPeer https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:AcastRPPeer/
---

# nxos_pim_anycast_rp_peer (Data Source)

This data source can read the PIM Anycast RP peer configuration.

- API Documentation: [pimAcastRPPeer](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:AcastRPPeer/)

## Example Usage

```terraform
data "nxos_pim_anycast_rp_peer" "example" {
vrf_name = "default"
address = "10.1.1.1/32"
rp_set_address = "20.1.1.1/32"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `address` (String) Anycast RP address.
- `rp_set_address` (String) RP set address.
- `vrf_name` (String) VRF name.

### Optional

- `device` (String) A device name from the provider configuration.

### Read-Only

- `id` (String) The distinguished name of the object.


1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: |-
## 0.3.13 (unreleased)

- Add nxos_pim_anycast_rp resource and data source
- Add nxos_pim_anycast_rp_peer resource and data source

## 0.3.12

Expand Down
1 change: 1 addition & 0 deletions docs/guides/supported_objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ For the following DME objects a corresponding Terraform resource and data source
| [nwRtVrfMbr](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/nw:RtVrfMbr/) | [nxos_physical_interface_vrf](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/physical_interface_vrf) | [nxos_physical_interface_vrf](https://registry.terraform.io/providers/netascode/nxos/latest/docs/data-sources/physical_interface_vrf) |
| [pimEntity](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:Entity/) | [nxos_pim](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim) | [nxos_pim](https://registry.terraform.io/providers/netascode/nxos/latest/docs/data-sources/pim) |
| [pimAcastRPFuncP](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:AcastRPFuncP/) | [nxos_pim_anycast_rp](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_anycast_rp) | [nxos_pim_anycast_rp](https://registry.terraform.io/providers/netascode/nxos/latest/docs/data-sources/pim_anycast_rp) |
| [pimAcastRPPeer](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:AcastRPPeer/) | [nxos_pim_anycast_rp_peer](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_anycast_rp_peer) | [nxos_pim_anycast_rp_peer](https://registry.terraform.io/providers/netascode/nxos/latest/docs/data-sources/pim_anycast_rp_peer) |
| [pimInst](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:Inst/) | [nxos_pim_instance](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_instance) | [nxos_pim_instance](https://registry.terraform.io/providers/netascode/nxos/latest/docs/data-sources/pim_instance) |
| [pimIf](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:If/) | [nxos_pim_interface](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_interface) | [nxos_pim_interface](https://registry.terraform.io/providers/netascode/nxos/latest/docs/data-sources/pim_interface) |
| [pimSSMPatP](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:SSMPatP/) | [nxos_pim_ssm_policy](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_ssm_policy) | [nxos_pim_ssm_policy](https://registry.terraform.io/providers/netascode/nxos/latest/docs/data-sources/pim_ssm_policy) |
Expand Down
6 changes: 6 additions & 0 deletions docs/resources/pim_anycast_rp.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-
API Documentation: pimAcastRPFuncP https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:AcastRPFuncP/
Parent resources
nxospimvrf https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_vrf
Child resources
nxospimanycastrppeer https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_anycast_rp_peer
---

# nxos_pim_anycast_rp (Resource)
Expand All @@ -19,6 +21,10 @@ This resource can manage the PIM Anycast RP configuration.

- [nxos_pim_vrf](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_vrf)

### Child resources

- [nxos_pim_anycast_rp_peer](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_anycast_rp_peer)

## Example Usage

```terraform
Expand Down
55 changes: 55 additions & 0 deletions docs/resources/pim_anycast_rp_peer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_pim_anycast_rp_peer Resource - terraform-provider-nxos"
subcategory: "PIM"
description: |-
This resource can manage the PIM Anycast RP peer configuration.
API Documentation: pimAcastRPPeer https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:AcastRPPeer/
Parent resources
nxospimanycast_rp https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_anycast_rp
---

# nxos_pim_anycast_rp_peer (Resource)

This resource can manage the PIM Anycast RP peer configuration.

- API Documentation: [pimAcastRPPeer](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Layer%203/pim:AcastRPPeer/)

### Parent resources

- [nxos_pim_anycast_rp](https://registry.terraform.io/providers/netascode/nxos/latest/docs/resources/pim_anycast_rp)

## Example Usage

```terraform
resource "nxos_pim_anycast_rp_peer" "example" {
vrf_name = "default"
address = "10.1.1.1/32"
rp_set_address = "20.1.1.1/32"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `address` (String) Anycast RP address.
- `rp_set_address` (String) RP set address.
- `vrf_name` (String) VRF name.

### Optional

- `device` (String) A device name from the provider configuration.

### Read-Only

- `id` (String) The distinguished name of the object.

## Import

Import is supported using the following syntax:

```shell
terraform import nxos_pim_anycast_rp_peer.example "sys/pim/inst/dom-[default]/acastrpfunc/peer-[10.1.1.1/32]-peer-[20.1.1.1/32]"
```
5 changes: 5 additions & 0 deletions examples/data-sources/nxos_pim_anycast_rp_peer/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data "nxos_pim_anycast_rp_peer" "example" {
vrf_name = "default"
address = "10.1.1.1/32"
rp_set_address = "20.1.1.1/32"
}
1 change: 1 addition & 0 deletions examples/resources/nxos_pim_anycast_rp_peer/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import nxos_pim_anycast_rp_peer.example "sys/pim/inst/dom-[default]/acastrpfunc/peer-[10.1.1.1/32]-peer-[20.1.1.1/32]"
5 changes: 5 additions & 0 deletions examples/resources/nxos_pim_anycast_rp_peer/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "nxos_pim_anycast_rp_peer" "example" {
vrf_name = "default"
address = "10.1.1.1/32"
rp_set_address = "20.1.1.1/32"
}
2 changes: 2 additions & 0 deletions gen/definitions/pim_anycast_rp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ doc_path: Layer%203/pim:AcastRPFuncP/
doc_category: PIM
parents:
- PIM VRF
children:
- PIM Anycast RP Peer
attributes:
- nxos_name: name
tf_name: vrf_name
Expand Down
52 changes: 52 additions & 0 deletions gen/definitions/pim_anycast_rp_peer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: PIM Anycast RP Peer
class_name: pimAcastRPPeer
dn: sys/pim/inst/dom-[%s]/acastrpfunc/peer-[%s]-peer-[%s]
ds_description: This data source can read the PIM Anycast RP peer configuration.
res_description: This resource can manage the PIM Anycast RP peer configuration.
doc_path: Layer%203/pim:AcastRPPeer/
doc_category: PIM
parents:
- PIM Anycast RP
attributes:
- nxos_name: name
tf_name: vrf_name
type: String
id: true
reference_only: true
description: 'VRF name.'
example: default
- nxos_name: addr
tf_name: address
type: String
id: true
description: 'Anycast RP address.'
example: 10.1.1.1/32
- nxos_name: rpSetAddr
tf_name: rp_set_address
type: String
id: true
description: 'RP set address.'
example: 20.1.1.1/32
test_prerequisites:
- dn: sys/fm/pim
class_name: fmPim
no_delete: true
attributes:
- name: adminSt
value: enabled
- dn: sys/pim
class_name: pimEntity
dependencies: [0]
- dn: sys/pim/inst
class_name: pimInst
dependencies: [1]
- dn: sys/pim/inst/dom-[default]
class_name: pimDom
attributes:
- name: name
value: default
dependencies: [2]
- dn: sys/pim/inst/dom-[default]/acastrpfunc
class_name: pimAcastRPFuncP
dependencies: [3]
92 changes: 92 additions & 0 deletions internal/provider/data_source_nxos_pim_anycast_rp_peer.go

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

Loading

0 comments on commit 1d38f5a

Please sign in to comment.