From 73975f60c302c11014d01ca3d9f15ea7e4cba280 Mon Sep 17 00:00:00 2001 From: Chris Archibald Date: Mon, 19 Aug 2024 15:09:04 -0700 Subject: [PATCH 1/2] fixes --- CHANGELOG.md | 3 +++ docs/resources/networking_ip_route_resource.md | 2 +- internal/interfaces/networking_ip_route.go | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e6b02f6..14633137 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ BUG FIXES: * **netapp-ontap_cluster_data_source: fix on nodes to show multiple elements ([#264](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/264)) +DOC FIXES: +* **netapp-ontap_networking_ip_interface_resource**: Include min version for metrics ([[#265](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/265)]) + ## 1.1.3 BUG FIXES: diff --git a/docs/resources/networking_ip_route_resource.md b/docs/resources/networking_ip_route_resource.md index bd7acdcd..1cccf88a 100644 --- a/docs/resources/networking_ip_route_resource.md +++ b/docs/resources/networking_ip_route_resource.md @@ -49,7 +49,7 @@ resource "netapp-ontap_networking_ip_route_resource" "networking_ip_route" { ### Optional - `destination` (Attributes) destination IP address information (see [below for nested schema](#nestedatt--destination)) -- `metric` (Number) Indicates a preference order between several routes to the same destination. +- `metric` (Number) Requires 9.11.1. Indicates a preference order between several routes to the same destination. - `svm_name` (String) IPInterface vserver name ### Read-Only diff --git a/internal/interfaces/networking_ip_route.go b/internal/interfaces/networking_ip_route.go index 80d1a67f..40e7e688 100644 --- a/internal/interfaces/networking_ip_route.go +++ b/internal/interfaces/networking_ip_route.go @@ -14,7 +14,7 @@ type IPRouteGetDataModelONTAP struct { Destination DestinationDataSourceModel `mapstructure:"destination,omitempty"` UUID string `mapstructure:"uuid"` Gateway string `mapstructure:"gateway"` - Metric int64 `mapstructure:"metric,omitempty"` + internal/interfaces/networking_ip_route.go int64 `mapstructure:"metric,omitempty"` SVMName svm `mapstructure:"svm"` } @@ -113,7 +113,7 @@ func GetListIPRoutes(errorHandler *utils.ErrorHandler, r restclient.RestClient, } var fields = []string{"destination", "gateway"} - if version.Generation == 9 && version.Major > 11 { + if version.Generation == 9 && version.Major > 10 { fields = append(fields, "metric") } query.Fields(fields) From 78e017a2eb9af87de4e3700b833d663ab7df96f4 Mon Sep 17 00:00:00 2001 From: Chris Archibald Date: Tue, 20 Aug 2024 09:47:50 -0700 Subject: [PATCH 2/2] looks like a cp a random file name on to a variable --- internal/interfaces/networking_ip_route.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/interfaces/networking_ip_route.go b/internal/interfaces/networking_ip_route.go index 40e7e688..ebaecd12 100644 --- a/internal/interfaces/networking_ip_route.go +++ b/internal/interfaces/networking_ip_route.go @@ -14,7 +14,7 @@ type IPRouteGetDataModelONTAP struct { Destination DestinationDataSourceModel `mapstructure:"destination,omitempty"` UUID string `mapstructure:"uuid"` Gateway string `mapstructure:"gateway"` - internal/interfaces/networking_ip_route.go int64 `mapstructure:"metric,omitempty"` + Metric int64 `mapstructure:"metric,omitempty"` SVMName svm `mapstructure:"svm"` }