stmcginnis / gofish

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

Added VirtualMediaConfig struct and new method #122

Closed mikeletux closed 3 years ago

mikeletux commented 3 years ago

Hello Sean,

Sorry I had to open another pull request. I've reset the two commits I had in my repo that implemented the old solution.

As we agreed, I've created a new exportable (public) struct called VirtualMediaConfig that can be passed to the new method InsertMediaConfig. Unfortunately Go doesn't support method overloading so another name had to be used. I think that method name should be ok. Tests were implemented as well.

Also I've kept what I did in the previous implementation regarding EjectMedia and avoiding sending no body at all, just sending an empty JSON object to avoid issues with different Redfish implementations.

Let me know 😄 Best regards!

/Miguel

stmcginnis commented 3 years ago

Works for me, thanks Miguel!