Skip to content

Commit

Permalink
run go generate
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul van Empelen committed Jan 27, 2025
1 parent d72797e commit 31df7d9
Show file tree
Hide file tree
Showing 8 changed files with 393 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/data-sources/snmp_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ data "iosxr_snmp_server" "example" {

- `communities` (Attributes List) The UNENCRYPTED (cleartext) community string (see [below for nested schema](#nestedatt--communities))
- `contact` (String) Text for mib Object sysContact
- `contexts` (Attributes List) Context Name (see [below for nested schema](#nestedatt--contexts))
- `groups` (Attributes List) Name of the group (see [below for nested schema](#nestedatt--groups))
- `id` (String) The path of the retrieved object.
- `location` (String) Text for mib Object sysLocation
Expand Down Expand Up @@ -73,6 +74,7 @@ data "iosxr_snmp_server" "example" {
- `traps_snmp_linkup` (Boolean) Enable SNMPv2-MIB linkUp traps
- `traps_system` (Boolean) Enable SNMP SYSTEMMIB-MIB traps
- `users` (Attributes List) Name of the user (see [below for nested schema](#nestedatt--users))
- `vrfs` (Attributes List) VRF name (see [below for nested schema](#nestedatt--vrfs))

<a id="nestedatt--communities"></a>
### Nested Schema for `communities`
Expand All @@ -89,6 +91,14 @@ Read-Only:
- `view` (String) Restrict this community to a named view


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

Read-Only:

- `context_name` (String) Context Name


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

Expand Down Expand Up @@ -119,3 +129,12 @@ Read-Only:
- `v3_priv_aes_aes_128_encryption_aes` (String) Specifies an aes-128 ENCRYPTED authentication password
- `v3_priv_aes_aes_128_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_systemowner` (Boolean) System Owner permissions for MIB objects


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

Read-Only:

- `context` (String) SNMP Context Name
- `vrf_name` (String) VRF name
33 changes: 33 additions & 0 deletions docs/resources/snmp_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ resource "iosxr_snmp_server" "example" {
traps_isis_authentication_failure = "enable"
traps_bgp_cbgp2_updown = true
traps_bgp_bgp4_mib_updown = true
contexts = [
{
context_name = "CONT-NAME1"
}
]
vrfs = [
{
vrf_name = "VRF1"
context = "CONT-VRF-VRF1"
}
]
users = [
{
user_name = "USER1"
Expand Down Expand Up @@ -82,6 +93,7 @@ resource "iosxr_snmp_server" "example" {

- `communities` (Attributes List) The UNENCRYPTED (cleartext) community string (see [below for nested schema](#nestedatt--communities))
- `contact` (String) Text for mib Object sysContact
- `contexts` (Attributes List) Context Name (see [below for nested schema](#nestedatt--contexts))
- `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`.
- Choices: `all`, `attributes`
- `device` (String) A device name from the provider configuration.
Expand Down Expand Up @@ -167,6 +179,7 @@ resource "iosxr_snmp_server" "example" {
- `traps_snmp_linkup` (Boolean) Enable SNMPv2-MIB linkUp traps
- `traps_system` (Boolean) Enable SNMP SYSTEMMIB-MIB traps
- `users` (Attributes List) Name of the user (see [below for nested schema](#nestedatt--users))
- `vrfs` (Attributes List) VRF name (see [below for nested schema](#nestedatt--vrfs))

### Read-Only

Expand All @@ -190,6 +203,14 @@ Optional:
- `view` (String) Restrict this community to a named view


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

Required:

- `context_name` (String) Context Name


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

Expand Down Expand Up @@ -227,6 +248,18 @@ Optional:
- `v3_priv_aes_aes_128_encryption_default` (String) Specifies an default ENCRYPTED authentication password
- `v3_systemowner` (Boolean) System Owner permissions for MIB objects


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

Required:

- `vrf_name` (String) VRF name

Optional:

- `context` (String) SNMP Context Name

## Import

Import is supported using the following syntax:
Expand Down
11 changes: 11 additions & 0 deletions examples/resources/iosxr_snmp_server/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ resource "iosxr_snmp_server" "example" {
traps_isis_authentication_failure = "enable"
traps_bgp_cbgp2_updown = true
traps_bgp_bgp4_mib_updown = true
contexts = [
{
context_name = "CONT-NAME1"
}
]
vrfs = [
{
vrf_name = "VRF1"
context = "CONT-VRF-VRF1"
}
]
users = [
{
user_name = "USER1"
Expand Down
28 changes: 28 additions & 0 deletions internal/provider/data_source_iosxr_snmp_server.go

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

10 changes: 10 additions & 0 deletions internal/provider/data_source_iosxr_snmp_server_test.go

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

Loading

0 comments on commit 31df7d9

Please sign in to comment.