stmcginnis / gofish

Gofish is a Golang client library for DMTF Redfish and SNIA Swordfish interaction.
BSD 3-Clause "New" or "Revised" License
204 stars 109 forks source link

Swtich NetworkAdapter fields from common.LinksCollection to common.Link #329

Closed smiller248 closed 2 months ago

smiller248 commented 2 months ago

This changes a number of properties of the NetworkAdapter resource type (NetworkPorts, Ports, Processors, etc.) to be parsed as common.Link instead of common.LinksCollection. Meaning that each of these properties will now be parsed a single link to a collection resource rather than as an array of links.

(For NetworkDeviceFunctions and NetworkPorts, the flip from common.LinksCollection to common.Link reverses the change that occurred in https://github.com/stmcginnis/gofish/commit/646d2abd848f96887a93d47e5d148294664e6572. The other properties were newly added to gofish.)

This is necessary forNewtworkAdapter to parse correctly. Please correct me if I'm somehow confused here, but the spec for the latest NetworkAdapter schema (https://redfish.dmtf.org/schemas/v1/NetworkAdapter.v1_10_0.json) states that all of these fields are single links, not arrays. (I think there may have been some confusion due toControllerLinks having child properties with the same names that are in fact arrays, not single links, e.g. there is ControllerLinks.NetworkPorts which is an array).