<div dir="ltr">
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">Hi everyone,</font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><br></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">I’ve been thinking a bit about how to separate Redfish logic from DBus in bmcweb.</font></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;min-height:14px"><font face="arial, sans-serif"><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">As a motivating example, imagine a Redfish aggregator that has some chassis that is located outside of its local instance.<span class="gmail-Apple-converted-space"> </span>Once the aggregator finds the external chassis, it needs to add it to the chassis collection.</font></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;min-height:14px"><font face="arial, sans-serif"><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">However, looking at the current implementation of the ChassisCollection.(located here: <a href="https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/chassis.hpp#L246"><span class="gmail-s1" style="color:rgb(220,161,13)">https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/chassis.hpp#L246</span></a>) It isn’t clear to me how to add this in.</font></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;min-height:14px"><font face="arial, sans-serif"><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">The current implementation does some setup on the response payload, and then makes a DBus call to look through the entity manager.<span class="gmail-Apple-converted-space"> </span>The collection it sends as a response is entirely defined by the result from the entity manager. I basically see three ways that this could be solved.</font></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;min-height:14px"><font face="arial, sans-serif"><br></font></p>
<ol class="gmail-ol1">
<li class="gmail-li1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">Move the aggregator logic down to the entity manager</font></li>
<li class="gmail-li1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">Refactor the Chassis Collection to have its own data model separate from the entity manager.</font></li>
<li class="gmail-li1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">Create some service that works on top of the bmcweb implementation of Redfish.</font></li>
</ol>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;min-height:14px"><font face="arial, sans-serif"><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">I think this comes up to a fundamental design decision, how modular/flexible should the Redfish implementation be?<span class="gmail-Apple-converted-space"> </span>Right now bmcweb provides a very sane default implementation, and is tied very closely to the current hardware it is running on.<span class="gmail-Apple-converted-space"> </span>Whereas I am envisioning a Redfish implementation that is a bit more abstracted from any particular hardware.</font></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;min-height:14px"><font face="arial, sans-serif"><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">It’s taken me awhile to get up to speed with Redfish, Open BMC, and Google’s infrastructure; but I’m starting to get a more concrete design for an aggregator.<span class="gmail-Apple-converted-space"> </span>However, I’m unsure about whether this should be framed as a new layer on top of the existing implementation, or as a refactor of that implementation?</font></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;min-height:14px"><font face="arial, sans-serif"><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">I can see some pros and cons between the two, but I’m interested in how everyone feels about this.</font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif"><br></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">Regards,</font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif">Richard</font></p></div>