Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config support added for BFD & Flow exporter map & updated CHANGELOG … #149

Merged
merged 2 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
- Add `iosxr_rd_set` resource and data source
- Add `contact` and `location` attributes to `iosxr_snmp_server` resource and data source
- Add `police_conform_action_transmit`, `police_conform_action_drop`, `police_exceed_action_transmit`, `police_exceed_action_drop`, `police_violate_action_transmit`, `police_violate_action_drop` attributes to `iosxr_policy_map_qos` resource and data source
- Add `iosxr_bfd` resource and data source
- Add `iosxr_flow_exporter_map` resource and data source



## 0.2.1

Expand Down
75 changes: 75 additions & 0 deletions docs/data-sources/bfd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "iosxr_bfd Data Source - terraform-provider-iosxr"
subcategory: "System"
description: |-
This data source can read the BFD configuration.
---

# iosxr_bfd (Data Source)

This data source can read the BFD configuration.

## Example Usage

```terraform
data "iosxr_bfd" "example" {
}
```

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

### Optional

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

### Read-Only

- `bundle_coexistence_bob_blb_inherit` (Boolean) Use inheritence mechanism
- `bundle_coexistence_bob_blb_logical` (Boolean) Use BFD logical Bundle natively
- `dampening_bundle_member_initial_wait` (Number) Initial delay before bringing up session
- `dampening_bundle_member_l3_only_mode` (Boolean) Apply immediate dampening and only when failure is L3 specific
- `dampening_bundle_member_maximum_wait` (Number) Maximum delay before bringing up session
- `dampening_bundle_member_secondary_wait` (Number) Secondary delay before bringing up session
- `dampening_disable` (Boolean) Disable BFD dampening
- `dampening_extensions_down_monitoring` (Boolean) Enable DOWN state session monitoring extensions
- `dampening_initial_wait` (Number) Initial delay before bringing up session
- `dampening_maximum_wait` (Number) Maximum delay before bringing up session
- `dampening_secondary_wait` (Number) Secondary delay before bringing up session
- `dampening_threshold` (Number) Stability threshold to enable dampening
- `echo_disable` (Boolean) Disable BFD echo mode
- `echo_ipv4_bundle_per_member_minimum_interval_preferred_minimum_interval` (Number) The preferred minimum interval (in ms) for the BFD session
- `echo_ipv4_source` (String) BFD echo source IP address
- `echo_latency_detect_count` (Number) Count of consecutive bad latency packets to take session down
- `echo_latency_detect_percentage` (Number) Percentage of detection time to consider as bad latency
- `echo_startup_validate_force` (Boolean) Ignore remote 'Required Min Echo RX Interval' setting
- `id` (String) The path of the retrieved object.
- `interfaces` (Attributes List) Configure BFD on an interface (see [below for nested schema](#nestedatt--interfaces))
- `ipv6_checksum_disable` (Boolean) Disable BFD checksum
- `multihop_ttl_drop_threshold` (Number) TTL Drop Threshold
- `multipath_locations` (Attributes List) Specify a location (see [below for nested schema](#nestedatt--multipath_locations))
- `trap_singlehop_pre_mapped` (Boolean) Configure BFD trap pre-mapped

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

Read-Only:

- `disable` (Boolean) Disable BFD for this interface
- `echo_disable` (Boolean) Disable BFD echo mode for this interface
- `echo_ipv4_source` (String) BFD echo source IP address
- `interface_name` (String) Configure BFD on an interface
- `ipv6_checksum_disable` (Boolean) Disable BFD ipv6 checksum mode for this interface
- `local_address` (String) Local address to be used by BFD for this interface
- `multiplier` (Number) BFD multiplier for this interface
- `rx_interval` (Number) BFD RX Interval for this interface in microseconds
- `tx_interval` (Number) BFD TX Interval for this interface in microseconds


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

Read-Only:

- `location_name` (String) Specify a location
53 changes: 53 additions & 0 deletions docs/data-sources/flow_exporter_map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "iosxr_flow_exporter_map Data Source - terraform-provider-iosxr"
subcategory: "Flow"
description: |-
This data source can read the Flow Exporter Map configuration.
---

# iosxr_flow_exporter_map (Data Source)

This data source can read the Flow Exporter Map configuration.

## Example Usage

```terraform
data "iosxr_flow_exporter_map" "example" {
}
```

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

### Optional

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

### Read-Only

- `exporter_maps` (Attributes List) Exporter map name - maximum 32 characters (see [below for nested schema](#nestedatt--exporter_maps))
- `id` (String) The path of the retrieved object.

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

Read-Only:

- `destination_ipv4_address` (String) Destination IPv4 address
- `destination_ipv6_address` (String) Destination IPv6 address
- `destination_vrf` (String) Configure VRF to be used for reaching export destination
- `dfbit_set` (Boolean) Set Export Packet Do Not Fragment Flag
- `dscp` (Number) Specify DSCP value for ipv4 export packets or traffic-class for ipv6 export packets
- `exporter_map_name` (String) Exporter map name - maximum 32 characters
- `packet_length` (Number) Export Packet maximum L3 length, should conform to outgoing interface mtu
- `source` (String) Source interface
- `transport_udp` (Number) Use UDP as transport protocol
- `version_export_format` (String) Specify export format
- `version_options_class_table_timeout` (Number) Specify export timeout
- `version_options_interface_table_timeout` (Number) Specify export timeout
- `version_options_sampler_table_timeout` (Number) Specify export timeout
- `version_options_vrf_table_timeout` (Number) Specify export timeout
- `version_template_data_timeout` (Number) Specify custom timeout for the template
- `version_template_options_timeout` (Number) Specify custom timeout for the template
- `version_template_timeout` (Number) Specify custom timeout for the template
4 changes: 4 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ description: |-
- Add `iosxr_rd_set` resource and data source
- Add `contact` and `location` attributes to `iosxr_snmp_server` resource and data source
- Add `police_conform_action_transmit`, `police_conform_action_drop`, `police_exceed_action_transmit`, `police_exceed_action_drop`, `police_violate_action_transmit`, `police_violate_action_drop` attributes to `iosxr_policy_map_qos` resource and data source
- Add `iosxr_bfd` resource and data source
- Add `iosxr_flow_exporter_map` resource and data source



## 0.2.1

Expand Down
141 changes: 141 additions & 0 deletions docs/resources/bfd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "iosxr_bfd Resource - terraform-provider-iosxr"
subcategory: "System"
description: |-
This resource can manage the BFD configuration.
---

# iosxr_bfd (Resource)

This resource can manage the BFD configuration.

## Example Usage

```terraform
resource "iosxr_bfd" "example" {
echo_disable = true
echo_latency_detect_percentage = 200
echo_latency_detect_count = 10
echo_startup_validate_force = true
echo_ipv4_source = "10.1.1.1"
echo_ipv4_bundle_per_member_minimum_interval_preferred_minimum_interval = 200
trap_singlehop_pre_mapped = true
multipath_locations = [
{
location_name = "0/0/CPU0"
}
]
multihop_ttl_drop_threshold = 200
dampening_initial_wait = 3600
dampening_secondary_wait = 3200
dampening_maximum_wait = 3100
dampening_threshold = 60000
dampening_extensions_down_monitoring = true
dampening_disable = true
dampening_bundle_member_l3_only_mode = true
dampening_bundle_member_initial_wait = 5184
dampening_bundle_member_secondary_wait = 6184
dampening_bundle_member_maximum_wait = 7184
bundle_coexistence_bob_blb_inherit = false
bundle_coexistence_bob_blb_logical = true
interfaces = [
{
interface_name = "GigabitEthernet0/0/0/0"
echo_disable = true
echo_ipv4_source = "12.1.1.1"
ipv6_checksum_disable = true
disable = true
local_address = "33.33.31.1"
tx_interval = 3200
rx_interval = 4200
multiplier = 40
}
]
ipv6_checksum_disable = true
}
```

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

### Optional

- `bundle_coexistence_bob_blb_inherit` (Boolean) Use inheritence mechanism
- `bundle_coexistence_bob_blb_logical` (Boolean) Use BFD logical Bundle natively
- `dampening_bundle_member_initial_wait` (Number) Initial delay before bringing up session
- Range: `1`-`518400000`
- `dampening_bundle_member_l3_only_mode` (Boolean) Apply immediate dampening and only when failure is L3 specific
- `dampening_bundle_member_maximum_wait` (Number) Maximum delay before bringing up session
- Range: `1`-`518400000`
- `dampening_bundle_member_secondary_wait` (Number) Secondary delay before bringing up session
- Range: `1`-`518400000`
- `dampening_disable` (Boolean) Disable BFD dampening
- `dampening_extensions_down_monitoring` (Boolean) Enable DOWN state session monitoring extensions
- `dampening_initial_wait` (Number) Initial delay before bringing up session
- Range: `1`-`3600000`
- `dampening_maximum_wait` (Number) Maximum delay before bringing up session
- Range: `1`-`3600000`
- `dampening_secondary_wait` (Number) Secondary delay before bringing up session
- Range: `1`-`3600000`
- `dampening_threshold` (Number) Stability threshold to enable dampening
- Range: `60000`-`3600000`
- `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.
- `echo_disable` (Boolean) Disable BFD echo mode
- `echo_ipv4_bundle_per_member_minimum_interval_preferred_minimum_interval` (Number) The preferred minimum interval (in ms) for the BFD session
- Range: `15`-`2000`
- `echo_ipv4_source` (String) BFD echo source IP address
- `echo_latency_detect_count` (Number) Count of consecutive bad latency packets to take session down
- Range: `1`-`10`
- `echo_latency_detect_percentage` (Number) Percentage of detection time to consider as bad latency
- Range: `100`-`250`
- `echo_startup_validate_force` (Boolean) Ignore remote 'Required Min Echo RX Interval' setting
- `interfaces` (Attributes List) Configure BFD on an interface (see [below for nested schema](#nestedatt--interfaces))
- `ipv6_checksum_disable` (Boolean) Disable BFD checksum
- `multihop_ttl_drop_threshold` (Number) TTL Drop Threshold
- Range: `0`-`254`
- `multipath_locations` (Attributes List) Specify a location (see [below for nested schema](#nestedatt--multipath_locations))
- `trap_singlehop_pre_mapped` (Boolean) Configure BFD trap pre-mapped

### Read-Only

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

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

Required:

- `interface_name` (String) Configure BFD on an interface

Optional:

- `disable` (Boolean) Disable BFD for this interface
- `echo_disable` (Boolean) Disable BFD echo mode for this interface
- `echo_ipv4_source` (String) BFD echo source IP address
- `ipv6_checksum_disable` (Boolean) Disable BFD ipv6 checksum mode for this interface
- `local_address` (String) Local address to be used by BFD for this interface
- `multiplier` (Number) BFD multiplier for this interface
- Range: `2`-`50`
- `rx_interval` (Number) BFD RX Interval for this interface in microseconds
- Range: `3000`-`30000000`
- `tx_interval` (Number) BFD TX Interval for this interface in microseconds
- Range: `3000`-`30000000`


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

Required:

- `location_name` (String) Specify a location

## Import

Import is supported using the following syntax:

```shell
terraform import iosxr_bfd.example "Cisco-IOS-XR-um-bfd-sbfd-cfg:/bfd"
```
96 changes: 96 additions & 0 deletions docs/resources/flow_exporter_map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "iosxr_flow_exporter_map Resource - terraform-provider-iosxr"
subcategory: "Flow"
description: |-
This resource can manage the Flow Exporter Map configuration.
---

# iosxr_flow_exporter_map (Resource)

This resource can manage the Flow Exporter Map configuration.

## Example Usage

```terraform
resource "iosxr_flow_exporter_map" "example" {
exporter_maps = [
{
exporter_map_name = "TEST"
destination_ipv4_address = "10.1.1.1"
destination_ipv6_address = "1::1"
destination_vrf = "28"
source = "10.1.1.4"
dscp = 62
packet_length = 512
transport_udp = 1033
dfbit_set = true
version_export_format = "true"
version_template_data_timeout = 1024
version_template_options_timeout = 3033
version_template_timeout = 2222
version_options_interface_table_timeout = 6048
version_options_sampler_table_timeout = 4096
version_options_class_table_timeout = 255
version_options_vrf_table_timeout = 122
}
]
}
```

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

### Optional

- `device` (String) A device name from the provider configuration.
- `exporter_maps` (Attributes List) Exporter map name - maximum 32 characters (see [below for nested schema](#nestedatt--exporter_maps))

### Read-Only

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

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

Required:

- `exporter_map_name` (String) Exporter map name - maximum 32 characters
- `version_export_format` (String) Specify export format
- Choices: `ipfix`, `protobuf`, `sflow`, `v9`

Optional:

- `destination_ipv4_address` (String) Destination IPv4 address
- `destination_ipv6_address` (String) Destination IPv6 address
- `destination_vrf` (String) Configure VRF to be used for reaching export destination
- `dfbit_set` (Boolean) Set Export Packet Do Not Fragment Flag
- `dscp` (Number) Specify DSCP value for ipv4 export packets or traffic-class for ipv6 export packets
- Range: `0`-`63`
- `packet_length` (Number) Export Packet maximum L3 length, should conform to outgoing interface mtu
- Range: `512`-`9000`
- `source` (String) Source interface
- `transport_udp` (Number) Use UDP as transport protocol
- Range: `1024`-`65535`
- `version_options_class_table_timeout` (Number) Specify export timeout
- Range: `1`-`604800`
- `version_options_interface_table_timeout` (Number) Specify export timeout
- Range: `1`-`604800`
- `version_options_sampler_table_timeout` (Number) Specify export timeout
- Range: `1`-`604800`
- `version_options_vrf_table_timeout` (Number) Specify export timeout
- Range: `1`-`604800`
- `version_template_data_timeout` (Number) Specify custom timeout for the template
- Range: `1`-`604800`
- `version_template_options_timeout` (Number) Specify custom timeout for the template
- Range: `1`-`604800`
- `version_template_timeout` (Number) Specify custom timeout for the template
- Range: `1`-`604800`

## Import

Import is supported using the following syntax:

```shell
terraform import iosxr_flow_exporter_map.example "Cisco-IOS-XR-um-flow-cfg:/flow/exporter-maps"
```
2 changes: 2 additions & 0 deletions examples/data-sources/iosxr_bfd/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data "iosxr_bfd" "example" {
}
2 changes: 2 additions & 0 deletions examples/data-sources/iosxr_flow_exporter_map/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data "iosxr_flow_exporter_map" "example" {
}
1 change: 1 addition & 0 deletions examples/resources/iosxr_bfd/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import iosxr_bfd.example "Cisco-IOS-XR-um-bfd-sbfd-cfg:/bfd"
Loading
Loading