From c4ab8bb922290871bd69ce02edb549545bd54efb Mon Sep 17 00:00:00 2001 From: danischm Date: Thu, 11 Jan 2024 14:10:18 +0100 Subject: [PATCH] Fix api issue with network device group resource --- CHANGELOG.md | 4 ++++ README.md | 6 +++--- docs/guides/changelog.md | 4 ++++ docs/index.md | 6 +++--- gen/definitions/network_device_group.yaml | 2 +- internal/provider/model_ise_network_device_group.go | 6 +++--- templates/guides/changelog.md.tmpl | 4 ++++ templates/index.md.tmpl | 6 +++--- 8 files changed, 25 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d18a8..8ac6df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.9 (unreleased) + +- Fix issue with `ise_network_device_group` resource and ISE versions >= 3.2.0 Patch1. Due to a breaking change in the API, this resource is now only supported with ISE version >= 3.2.0 Patch1. + ## 0.1.8 - Fix default value of `ip_version` attribute of `ise_trustsec_security_group_acl` resource diff --git a/README.md b/README.md index 6815d88..7b25630 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ This provider uses both, the ERS and Open API. Instructions on how to enable API All resources and data sources have been tested with the following releases. -| Platform | Version | -| -------- | ------- | -| ISE | 3.2 | +| Platform | Version | +| -------- | ------------- | +| ISE | 3.2.0 Patch 4 | Documentation: diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 4683eb6..b6cf357 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.1.9 (unreleased) + +- Fix issue with `ise_network_device_group` resource and ISE versions >= 3.2.0 Patch1. Due to a breaking change in the API, this resource is now only supported with ISE version >= 3.2.0 Patch1. + ## 0.1.8 - Fix default value of `ip_version` attribute of `ise_trustsec_security_group_acl` resource diff --git a/docs/index.md b/docs/index.md index a0eb1b6..4b7e5e9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,9 +14,9 @@ This provider uses both, the ERS and Open API. Instructions on how to enable API All resources and data sources have been tested with the following releases. -| Platform | Version | -| -------- | ------- | -| ISE | 3.2 | +| Platform | Version | +| -------- | ------------- | +| ISE | 3.2.0 Patch 4 | ## Example Usage diff --git a/gen/definitions/network_device_group.yaml b/gen/definitions/network_device_group.yaml index 0c6c7f8..6dbf5e9 100644 --- a/gen/definitions/network_device_group.yaml +++ b/gen/definitions/network_device_group.yaml @@ -15,7 +15,7 @@ attributes: type: String description: Description example: My network device group - - model_name: ndgtype + - model_name: othername tf_name: root_group data_path: [NetworkDeviceGroup] type: String diff --git a/internal/provider/model_ise_network_device_group.go b/internal/provider/model_ise_network_device_group.go index 2ea756d..ed3fa1f 100644 --- a/internal/provider/model_ise_network_device_group.go +++ b/internal/provider/model_ise_network_device_group.go @@ -57,7 +57,7 @@ func (data NetworkDeviceGroup) toBody(ctx context.Context, state NetworkDeviceGr body, _ = sjson.Set(body, "NetworkDeviceGroup.description", data.Description.ValueString()) } if !data.RootGroup.IsNull() { - body, _ = sjson.Set(body, "NetworkDeviceGroup.ndgtype", data.RootGroup.ValueString()) + body, _ = sjson.Set(body, "NetworkDeviceGroup.othername", data.RootGroup.ValueString()) } return body } @@ -76,7 +76,7 @@ func (data *NetworkDeviceGroup) fromBody(ctx context.Context, res gjson.Result) } else { data.Description = types.StringNull() } - if value := res.Get("NetworkDeviceGroup.ndgtype"); value.Exists() { + if value := res.Get("NetworkDeviceGroup.othername"); value.Exists() { data.RootGroup = types.StringValue(value.String()) } else { data.RootGroup = types.StringNull() @@ -97,7 +97,7 @@ func (data *NetworkDeviceGroup) updateFromBody(ctx context.Context, res gjson.Re } else { data.Description = types.StringNull() } - if value := res.Get("NetworkDeviceGroup.ndgtype"); value.Exists() && !data.RootGroup.IsNull() { + if value := res.Get("NetworkDeviceGroup.othername"); value.Exists() && !data.RootGroup.IsNull() { data.RootGroup = types.StringValue(value.String()) } else { data.RootGroup = types.StringNull() diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 4683eb6..b6cf357 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.1.9 (unreleased) + +- Fix issue with `ise_network_device_group` resource and ISE versions >= 3.2.0 Patch1. Due to a breaking change in the API, this resource is now only supported with ISE version >= 3.2.0 Patch1. + ## 0.1.8 - Fix default value of `ip_version` attribute of `ise_trustsec_security_group_acl` resource diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl index c10d634..6e814c1 100644 --- a/templates/index.md.tmpl +++ b/templates/index.md.tmpl @@ -14,9 +14,9 @@ This provider uses both, the ERS and Open API. Instructions on how to enable API All resources and data sources have been tested with the following releases. -| Platform | Version | -| -------- | ------- | -| ISE | 3.2 | +| Platform | Version | +| -------- | ------------- | +| ISE | 3.2.0 Patch 4 | ## Example Usage