This is a multi-part message in MIME format.
--------------050509030900000404030401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi All,
There is a DELETE action defined at collection level for Gluster Bricks
with signature -
/@DELETE
public////Response//remove//(//GlusterBricks//bricks//);/
Recently we had needed a commit action to remove migrated bricks.
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.
If the parameter is set to /true/, forced deletion of bricks happens
without any data migration.
And if the parameter is not set or set to /false,/ the deletion is meant
for a brick on which migration has already taken place.
To achieve the above functionality we introduced another DELETE action
with new signature as below and also marked the first action as deprecated -
/@DELETE
public////Response//remove//(//Action//action//);/
The problem arises now as the new api works fine for all possible
scenarios with below input structure -
/
//<action>//
// <force>true/false</force>//
// <bricks>//
// <brick>//
// <name>//brick1-name</name>//
// <name>brick2-name</name>//
// </brick>//
// </bricks>//
//</action>/
BUT after these change backward compatibility is broken and the old api
does not work.
If we try invoking old DELETE with bricks as input parameter as below,
it still invokes the new api and gives an error saying "Invalid parameter".
/
//<bricks>
<brick id="brick1-id"/>
// <brick id="brick2-id"/>
</bricks>/
Kindly suggest a solution around the same.
*PS:* Both the actions are defined at collection level
(//api/clusters/<cluster-id>/glustervolumes/<volume-id>/bricks/)
[1]:
http://gerrit.ovirt.org/#/c/21043/
Thanks and Regards,
Shubhendu
--------------050509030900000404030401
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi All,<br>
<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
href="http://gerrit.ovirt.org/#/c/21043/">http://gerrit.ovir...
<br>
Thanks and Regards,<br>
Shubhendu<br>
<br>
<br>
</span></span>
</body>
</html>
--------------050509030900000404030401--