<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi Ed,</tt><br>
</p>
<p><tt>I am putting my points here, I found some functionalities
missing in current bmcweb code.</tt><br>
</p>
<p><tt>1.</tt><br>
</p>
<tt>As part of redfish specification we need to support multi
property update and if one of the property update is successful</tt><tt><br>
</tt><tt>then bmcweb need to send the 200 OK as well as the extended
error info for the property where the implementation encounters
the error.</tt><tt><br>
</tt><br>
<tt>Now in bmcweb we do the asio call one after other and pass the
asynResp var in each property update and the</tt><br>
<tt>response code gets filled by each update call which seems to me
is buggy.</tt>
<p><tt>Eg: In any resource doPatch() if I do multiple asio calls
for property update</tt></p>
<tt> doPatch</tt><tt><br>
</tt><tt> { </tt><tt> asio1(asynRep);</tt><tt><br>
</tt><tt> asio2(asynRep);</tt><tt><br>
</tt><tt> asio3(asynResp);</tt><tt><br>
</tt><tt> }</tt><tt><br>
</tt><tt><br>
</tt><tt>Suppose in the above eg my third asio call gets
failed(asio3) due to D-Bus call failure,</tt><tt><br>
</tt><tt>In that case asyncrep would have the internal server
error(5XX), as per the spec the status code</tt><tt><br>
</tt><tt>should have been 200 if one of the property update is
successful.</tt><tt><br>
</tt><br>
<tt>My proposal is to introduce a var in the "crow::res" structure,
which will be true if any property update is successful,</tt><br>
<tt>and in the destructor of asyncRep(shared pointer around res)
where we are calling the res.end(), we can check this var value,</tt><br>
<tt>if it is true then we can update the status code to 200 OK.</tt><br>
<br>
<tt>What is your view?</tt><br>
<tt></tt>
<p><tt>2.<br>
</tt></p>
<tt>Currently in bmcweb we are not mapping the dbus error to the
actual error code, any dbus failure leads to "Internal Server
error" which is 5XX.</tt><br>
<tt>Do we have some plan to map the D-bus error code to correct http
code?</tt><br>
<tt><br>
</tt><br>
<tt>Regards</tt><br>
<tt>Ratan Gupta</tt><span id="output" class="style-scope
gr-linked-text"><tt> </tt> </span><br>
<span id="output" class="style-scope gr-linked-text"></span>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>