<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Kanwal,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Glad to see you active on this Redfish issue.<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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)<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><a href="https://github.com/nordix-airship/go-redfish" target="_BLANK">https://github.com/nordix-airship/go-redfish</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Dell team started with <o:p></o:p></span></p>
<p class="MsoNormal">Redfish Virtual Machine Emulation (AIR-81) – Based on Redfish v1 and python sushy-client & sushy-tools<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt">This tested as a Fedora VM by JT William and for using vBMC we were tying to locate a base directory as
</span>atishipctl/tools<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Dell team had submitted earlier for testing based on
</span><a href="https://airship.atlassian.net/browse/AIR-88" target="_BLANK">https://airship.atlassian.net/browse/AIR-88</a>  <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><a href="https://review.opendev.org/#/c/681327/">https://review.opendev.org/#/c/681327/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">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.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">airshipctl<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">remoteboot -none/interface [pxe/ipxe/virtualmedia] -proto [http/tftp/file]<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">deploy  - interafce (Redfish/IPMI/iDRAC)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">action (register,getContext,bootorder,restart, gracefull-stop, force-stop)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">source -none/image [endpoint:port]<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">target  bmhost -oob/ib [endpoint/MachineSpecs/node-nnnnnn/ip-addr]<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Hope this helps and we can sort this out through email or call next week, meanwhile I review the go-redfish you have posted.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Prakash<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Message: 1 <br>
Date: Tue, 10 Sep 2019 12:31:29 +0300 <br>
From: Kanwar Saad <<a href="mailto:kanwar.sbl@gmail.com">kanwar.sbl@gmail.com</a>>
<br>
To: <a href="mailto:airship-discuss@lists.airshipit.org">airship-discuss@lists.airshipit.org</a>
<br>
Subject: Re: [Airship-discuss] Redfish Golibrary Findings <br>
Message-ID: <br>
        <<a href="mailto:CAFiv+i14VJL0K1xtx8u2gyz_Umh+XB0qjn_Z5ZCFsXOfdq5ULw@mail.gmail.com">CAFiv+i14VJL0K1xtx8u2gyz_Umh+XB0qjn_Z5ZCFsXOfdq5ULw@mail.gmail.com</a>>
<br>
Content-Type: text/plain; charset="utf-8" <br>
<br>
Hi all, <br>
<br>
No one replied on this thread. So before the next meeting, I took the <br>
liberty of creating my own go client library for redfish.  I have <br>
implemented, all the basic functions which sushy-emulator supports. Rest of <br>
the operations can be added on a need basis. I guess this can serve our <br>
purpose for now. I have to add authentication support and then I will add <br>
helper utility to do common operations easily using current primitive <br>
functions. <br>
<br>
Please try it out and give feedback. <br>
<a href="https://github.com/nordix-airship/go-redfish" target="_BLANK">https://github.com/nordix-airship/go-redfish</a>
<br>
<br>
Br, <br>
Kanwar Saad <br>
Ericsson <br>
<br>
<br>
<br>
On Thu, Sep 5, 2019 at 3:33 PM Kanwar Saad <<a href="mailto:kanwar.sbl@gmail.com">kanwar.sbl@gmail.com</a>> wrote:
<br>
<br>
> Hi, <br>
> <br>
> I spent some time on generating go client code for redfish spec using <br>
> openapi generator. But it is failing to generate code for that. I guess <br>
> code generator do not cover all scenarios of openapi. The redfish openapi <br>
> specification is huge(around 1200 documents) and it is failing for few <br>
> hundred. I dont want to spend time investigating that because that is <br>
> another rabbit hole. In that case we are left with these options. <br>
> <br>
> *Gofish:* <br>
> - only contains functions for getting redfish resources but not setting. <br>
> - The resources we want like virtualmedia is not even supported for <br>
> reading. <br>
> - It is not very well maintained. <br>
> - Extending It is not feasible since they create all datastructures by <br>
> hand and then we have to create Marshall/Unmarshall functions for each <br>
> datastructure. <br>
> <br>
> *GoRackHD:* <br>
> - It is made to work with Dell's RackHD. <br>
> - Last commit was done in 2016. <br>
> - They have used a similar approach which I was trying. They created their <br>
> own subset of swagger specification and generate client code using that <br>
> swagger spec. The spec is old and do not support virtualmedia actions which <br>
> we want. <br>
> - Extending this is complicated since we dont know whether that will be <br>
> compatible with RackHD(or we need to make a fork continue ourself). <br>
> Secondly, it uses old swagger spec than openapi and conversion to openapi <br>
> is not straightforward. <br>
> <br>
> *Use Containerized Tool:* <br>
> <br>
> One option is to use a well tested, well maintained redfish client in any <br>
> language in a container just like isogen. this option also requires writing <br>
> wrappers around that library inside contianer. <br>
> <br>
> *Create our own redfish go client :* <br>
> <br>
> 1. We can use a similar approach as of goRackHD. We can create our own <br>
> openapi spec for redfish only for the resources which we need in the start <br>
> and extend later. And generate client code using that. This might also <br>
> require maintaining the openapi spec parallel to the redfish standard spec <br>
> but since the redfish spec is not changing too fast so we can live with it. <br>
> <br>
> 2. Second option is to create a really lightweight utility functions which <br>
> will just perform the operations which we want using standard http library. <br>
> Since we might not need too much redfish functions so it could be a viable <br>
> option. If we want to rely heavily on redfish for validations(i have not <br>
> seen what kind of validations you want so its vague for me), then this <br>
> option might not work very well. <br>
> <br>
> <br>
> Br, <br>
> Kanwar Saad <br>
> Ericsson <br>
><o:p></o:p></span></p>
</div>
</body>
</html>