From 650c061898dd99cc64db64449169e9fd8f1b9d3b Mon Sep 17 00:00:00 2001 From: nabhajit-ray Date: Fri, 6 Jan 2023 20:10:56 +0530 Subject: [PATCH 1/2] fix the issue #509 --- CHANGELOG.md | 5 +++++ oneview/resource_server_profile_template.go | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f09c516..8f801dea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html #### Major Changes 1. Removed Image Streamer support. + +### Bug fixes & Enhancements: + +- [#509](https://github.com/HewlettPackard/terraform-provider-oneview/issues/509) ilo settings updated not being commited into state + ### Oneview Features supported - Appliance SNMPv1 Trap Destinations - Appliance SNMPv3 Trap Destinations diff --git a/oneview/resource_server_profile_template.go b/oneview/resource_server_profile_template.go index 4025219e..202ee712 100644 --- a/oneview/resource_server_profile_template.go +++ b/oneview/resource_server_profile_template.go @@ -2047,10 +2047,10 @@ func resourceServerProfileTemplateRead(d *schema.ResourceData, meta interface{}) if lp, ok := w["loginPriv"]; ok { la["login_priv"] = lp } - if hbcp, ok := w["hostBiosConfigPriv"]; ok { + if hbcp, ok := w["hostBIOSConfigPriv"]; ok { la["host_bios_config_priv"] = hbcp } - if hncp, ok := w["hostNicConfigPriv"]; ok { + if hncp, ok := w["hostNICConfigPriv"]; ok { la["host_nic_config_priv"] = hncp } if hscp, ok := w["hostStorageConfigPriv"]; ok { From 514b89a75efc4748002b4c6dd9fca21698621841 Mon Sep 17 00:00:00 2001 From: nabhajit-ray Date: Tue, 10 Jan 2023 19:55:39 +0530 Subject: [PATCH 2/2] fix the issue #507 --- CHANGELOG.md | 48 +++++++++++++++++++ .../resource_logical_interconnect_group.go | 15 ++++-- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aae596a..b206738b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,54 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +# [v8.1.0-13] +### Notes +- This release supports API4600 minimally where we can use OneView v8.10 with this SDK. +#### Major Changes + +1. Removed Image Streamer support. + +### Bug fixes & Enhancements: + +- [#507](https://github.com/HewlettPackard/terraform-provider-oneview/issues/507) Updates for OneView 6.6 LTS release? + +### Oneview Features supported +- Appliance SNMPv1 Trap Destinations +- Appliance SNMPv3 Trap Destinations +- Appliance SSH Access +- Appliance Time and Locale Configuration +- Connection Template +- Ethernet Network +- Enclosure +- Enclosure Group +- FC Network +- FCOE Network +- Firmware Drivers +- Hypervisor Manager +- Hypervisor Cluster Profile +- Id Pools Ipv4 Range +- Id Pools IPv4 Subnets +- Labels +- Interconnects +- Interconnect Types +- Logical Enclosure +- Logical Interconnects +- Logical Interconnect Groups +- Network Set +- Rack Manager +- Scope +- Server Certificate +- Server Hardware +- Server Hardware Type +- Server Profile +- Server Profile Template +- Storage Pool +- Storage Volume +- Storage Volume Attachments +- Storage Volume Template +- Storage System +- Uplink Set + # [v8.0.0-13] ### Notes - This release supports API4600 minimally where we can use OneView v8.00 with this SDK. diff --git a/oneview/resource_logical_interconnect_group.go b/oneview/resource_logical_interconnect_group.go index b0fcb351..862535c0 100644 --- a/oneview/resource_logical_interconnect_group.go +++ b/oneview/resource_logical_interconnect_group.go @@ -52,7 +52,8 @@ func resourceLogicalInterconnectGroup() *schema.Resource { }, "redundancy_type": { Type: schema.TypeString, - Required: true, + Optional: true, + Default: nil, }, "enclosure_indexes": { Type: schema.TypeSet, @@ -1720,7 +1721,11 @@ func resourceLogicalInterconnectGroupCreate(d *schema.ResourceData, meta interfa portFlapSettingStructure.Description = utils.Nstring(portFlapSettingRawData["description"].(string)) portFlapSettingStructure.State = portFlapSettingRawData["state"].(string) portFlapSettingStructure.Status = portFlapSettingRawData["status"].(string) - lig.PortFlapProtection = &portFlapSettingStructure + // if all of the values in the struct are empty, leave lig.PortFlapProtection nil + if portFlapSettingStructure != (ov.PortFlapProtection{}) { + lig.PortFlapProtection = &portFlapSettingStructure + } + } if val, ok := d.GetOk("quality_of_service"); ok { @@ -1868,7 +1873,6 @@ func resourceLogicalInterconnectGroupCreate(d *schema.ResourceData, meta interfa } lig.QosConfiguration = &ovQos } - ligError := config.ovClient.CreateLogicalInterconnectGroup(lig) d.SetId(d.Get("name").(string)) if ligError != nil { @@ -3044,7 +3048,10 @@ func resourceLogicalInterconnectGroupUpdate(d *schema.ResourceData, meta interfa PortFlapSetting.State = rawlval["state"].(string) PortFlapSetting.Status = rawlval["status"].(string) } - lig.PortFlapProtection = &PortFlapSetting + + if PortFlapSetting != (ov.PortFlapProtection{}) { + lig.PortFlapProtection = &PortFlapSetting + } if val, ok := d.GetOk("quality_of_service"); ok { rawQoss := val.([]interface{}) ovQos := ov.QosConfiguration{}