[Airship-discuss] Redfish Golibrary Findings

Prakash.Ramchandran at Dell.com Prakash.Ramchandran at Dell.com
Fri Sep 13 18:13:04 UTC 2019


Kanwal,

Glad to see you active on this Redfish issue.
In have been following Jira ticket and did comment that we plan to use http for remote direct based on my previous and your follow up analysis.

Good to see you code and will review this and absorb it into what our team was working to update by Monday. ( Note It's MIT license and will need exception from OSF)
https://github.com/nordix-airship/go-redfish

I had browse through oneAPI and that's why I was asking why not swagger and you answer was it's based on Swagger and we discussed that on Thursday.

Dell team started with
Redfish Virtual Machine Emulation (AIR-81) - Based on Redfish v1 and python sushy-client & sushy-tools
This tested as a Fedora VM by JT William and for using vBMC we were tying to locate a base directory as atishipctl/tools
However it was debated that we don't need VM but only should use a Docker container as in isoboot so this we deferred and will try find a location for that in validates next week.


Dell team had submitted earlier for testing based on https://airship.atlassian.net/browse/AIR-88

https://review.opendev.org/#/c/681327/

At that time the specs drawn by me were as follows for hierarchy of plugins and we were still trying to work out on go language library for Redfish, which we still will stick it to gofish once things steeled on it's shortcomings ans License issues.

airshipctl

remoteboot -none/interface [pxe/ipxe/virtualmedia] -proto [http/tftp/file]

deploy  - interafce (Redfish/IPMI/iDRAC)

action (register,getContext,bootorder,restart, gracefull-stop, force-stop)

source -none/image [endpoint:port]

target  bmhost -oob/ib [endpoint/MachineSpecs/node-nnnnnn/ip-addr]


This was just initial thoughts and we were still trying to merge these ideas with community airshipctl cli and looking at google docs as where to place them.
We were debating the way to organize the code and our thinking was we need fake unit testing included as part of action to ensure we can complete development unit by unit before taking on vBMC or real BMC.

Hope this helps and we can sort this out through email or call next week, meanwhile I review the go-redfish you have posted.

Thanks
Prakash


Message: 1
Date: Tue, 10 Sep 2019 12:31:29 +0300
From: Kanwar Saad <kanwar.sbl at gmail.com<mailto:kanwar.sbl at gmail.com>>
To: airship-discuss at lists.airshipit.org<mailto:airship-discuss at lists.airshipit.org>
Subject: Re: [Airship-discuss] Redfish Golibrary Findings
Message-ID:
        <CAFiv+i14VJL0K1xtx8u2gyz_Umh+XB0qjn_Z5ZCFsXOfdq5ULw at mail.gmail.com<mailto:CAFiv+i14VJL0K1xtx8u2gyz_Umh+XB0qjn_Z5ZCFsXOfdq5ULw at mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Hi all,

No one replied on this thread. So before the next meeting, I took the
liberty of creating my own go client library for redfish.  I have
implemented, all the basic functions which sushy-emulator supports. Rest of
the operations can be added on a need basis. I guess this can serve our
purpose for now. I have to add authentication support and then I will add
helper utility to do common operations easily using current primitive
functions.

Please try it out and give feedback.
https://github.com/nordix-airship/go-redfish

Br,
Kanwar Saad
Ericsson



On Thu, Sep 5, 2019 at 3:33 PM Kanwar Saad <kanwar.sbl at gmail.com<mailto:kanwar.sbl at gmail.com>> wrote:

> Hi,
>
> I spent some time on generating go client code for redfish spec using
> openapi generator. But it is failing to generate code for that. I guess
> code generator do not cover all scenarios of openapi. The redfish openapi
> specification is huge(around 1200 documents) and it is failing for few
> hundred. I dont want to spend time investigating that because that is
> another rabbit hole. In that case we are left with these options.
>
> *Gofish:*
> - only contains functions for getting redfish resources but not setting.
> - The resources we want like virtualmedia is not even supported for
> reading.
> - It is not very well maintained.
> - Extending It is not feasible since they create all datastructures by
> hand and then we have to create Marshall/Unmarshall functions for each
> datastructure.
>
> *GoRackHD:*
> - It is made to work with Dell's RackHD.
> - Last commit was done in 2016.
> - They have used a similar approach which I was trying. They created their
> own subset of swagger specification and generate client code using that
> swagger spec. The spec is old and do not support virtualmedia actions which
> we want.
> - Extending this is complicated since we dont know whether that will be
> compatible with RackHD(or we need to make a fork continue ourself).
> Secondly, it uses old swagger spec than openapi and conversion to openapi
> is not straightforward.
>
> *Use Containerized Tool:*
>
> One option is to use a well tested, well maintained redfish client in any
> language in a container just like isogen. this option also requires writing
> wrappers around that library inside contianer.
>
> *Create our own redfish go client :*
>
> 1. We can use a similar approach as of goRackHD. We can create our own
> openapi spec for redfish only for the resources which we need in the start
> and extend later. And generate client code using that. This might also
> require maintaining the openapi spec parallel to the redfish standard spec
> but since the redfish spec is not changing too fast so we can live with it.
>
> 2. Second option is to create a really lightweight utility functions which
> will just perform the operations which we want using standard http library.
> Since we might not need too much redfish functions so it could be a viable
> option. If we want to rely heavily on redfish for validations(i have not
> seen what kind of validations you want so its vague for me), then this
> option might not work very well.
>
>
> Br,
> Kanwar Saad
> Ericsson
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.airshipit.org/pipermail/airship-discuss/attachments/20190913/aba299db/attachment.html>


More information about the Airship-discuss mailing list