<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi All,<br>
<div class="moz-forward-container"> <br>
There is a DELETE action defined at collection level for Gluster
Bricks with signature -<br>
<br>
<font color="#3333ff"><i><span class="kwd">@DELETE<br>
public</span></i><i><span class="pln"> </span></i><i><span
class="typ">Response</span></i><i><span class="pln"> remove</span></i><i><span
class="pun">(</span></i><i><span class="typ">GlusterBricks</span></i><i><span
class="pln"> bricks</span></i></font><span class="pun"><font
color="#3333ff"><i>);</i></font><br>
<br>
Recently we had needed a commit action to remove migrated
bricks. <br>
After multiple rounds of discussion on introducing a commit
action to remove migrated bricks we introduced a DELETE action
[1] which accepts a boolean parameter isForce.<br>
If the parameter is set to <i>true</i>, forced deletion of
bricks happens without any data migration.<br>
And if the parameter is not set or set to <i>false,</i> the
deletion is meant for a brick on which migration has already
taken place.<br>
<br>
To achieve the above functionality we introduced another DELETE
action with new signature as below and </span><span class="pun"><span
class="pun"><span class="pun">also marked the first action as
deprecated</span></span> -<br>
<br>
</span><span class="pun"><font color="#3333ff"><i><span
class="kwd">@DELETE<br>
public</span></i><i><span class="pln"> </span></i><i><span
class="typ">Response</span></i><i><span class="pln">
remove</span></i><i><span class="pun">(</span></i><i><span
class="typ">Action</span></i><i><span class="pln"> action</span></i></font><span
class="pun"><font color="#3333ff"><i>);</i></font><br>
<br>
The problem arises now as the new api works fine for all
possible scenarios with below input structure -<br>
<font color="#3333ff"><i><br>
</i><i><action></i><i><br>
</i><i> <force>true/false</force></i><i><br>
</i><i> <bricks></i><i><br>
</i><i> <brick></i><i><br>
</i><i> <name></i><i>brick1-name</name></i><i><br>
</i></font></span></span><span class="pun"><span class="pun"><font
color="#3333ff"><i><span class="pun"><span class="pun">
<name>brick2-name</name></span></span></i><i><br>
</i><i> </brick></i><i><br>
</i><i> </bricks></i><i><br>
</i><i></action></i></font><br>
<br>
BUT after these change backward compatibility is broken and
the old api does not work.<br>
If we try invoking old DELETE with bricks as input parameter
as below, it still invokes the new api and gives an error
saying "<font color="#ff0000">Invalid parameter</font>".<br>
<font color="#3333ff"><i><br>
</i></font></span></span><font color="#3333ff"><i><span
class="pun"><span class="pun"><span class="pun"><span
class="pun"><bricks><br>
<brick id="brick1-id"/><br>
</span></span></span></span></i></font><span class="pun"><span
class="pun"><font color="#3333ff"><i><span class="pun"><span
class="pun"><span class="pun"><span class="pun"><span
class="pun"><span class="pun"> <brick
id="brick2-id"/></span></span></span></span><br>
</bricks></span></span></i></font><br>
<br>
Kindly suggest a solution around the same.<br>
<br>
<b>PS:</b> Both the actions are defined at collection level (<font
color="#3333ff"><i>/api/clusters/<cluster-id>/glustervolumes/<volume-id>/bricks</i></font>)<br>
<br>
[1]: <a moz-do-not-send="true"
href="http://gerrit.ovirt.org/#/c/21043/">http://gerrit.ovirt.org/#/c/21043/</a><br>
<br>
Thanks and Regards,<br>
Shubhendu<br>
<br>
<br>
</span></span> <br>
</div>
<br>
</body>
</html>