HewlettPackard / oneview-golang

Golang bindings for OneView api's

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistency in uplink set struct

madhav-bharadwaj opened this issue · comments

Scenario/Intent

Adding support for resource uplink sets in terraform.

Environment Details

  • Golang binding for HPE OneView Version: 1.0.0
  • **OneView Appliance Version:**4.10
  • OneView Client API Version: 800
  • Golang Version: 1.11.2
  • Platform: ubuntu

Steps to Reproduce

Run uplink sets resource in terraform. (newly created, not in master yet. But can be found in the branch uplink_sets)

Expected Result

Build successfully

Actual Result

Build fails as the uplink set struct has the below inconsistency:

  1. The type of the attribute description should be string but is defined as utils.Nstring

Another issue found as per the API doc:

  1. the struct ExpectedNeighbor should be part of the PortConfigInfos struct.

I think we are using Nstring for the attributes which can be null. As per my knowledge, description can be null. So can you please validate it again.

For the second issue, you are right. It has to be in the portConfigInfos struct.

One more thing, FcMode attribute should be mapped as fcMode

@soodpr @madhav-bharadwaj
Hi Madhav/Priyanka,

  1. Description can be null, hence keeping it as utils.Nstring
  2. ExpectedNeighbor is already part of PortConfigInfos
  3. FcMode attribute in the structure in golang is already mapped to fcMode in Json.

I think this issue is good to be closed.

@soodpr @madhav-bharadwaj
Hi Madhav/Priyanka,

1. `Description` can be null, hence keeping it as utils.Nstring

2. `ExpectedNeighbor` is already part of  `PortConfigInfos`

3. `FcMode` attribute in the structure in golang is already mapped to `fcMode` in Json.

I think this issue is good to be closed.

Yes, i think we can close this issue as you describe that everything is well covered now. Lets wait for @madhav-bharadwaj to confirm as well.

@soodpr @madhav-bharadwaj
Hi Madhav/Priyanka,

1. `Description` can be null, hence keeping it as utils.Nstring

2. `ExpectedNeighbor` is already part of  `PortConfigInfos`

3. `FcMode` attribute in the structure in golang is already mapped to `fcMode` in Json.

I think this issue is good to be closed.

Hey @AsisBagga, you can go ahead and close it as you've confirmed that the issue is addressed.

Issue has already been addressed hence closing this.