<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>&lt;action&gt;</i><i><br>
            </i><i>&nbsp;&nbsp;&nbsp; &lt;force&gt;true/false&lt;/force&gt;</i><i><br>
            </i><i>&nbsp;&nbsp;&nbsp; &lt;bricks&gt;</i><i><br>
            </i><i>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;brick&gt;</i><i><br>
            </i><i>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;name&gt;</i><i>brick1-name&lt;/name&gt;</i><i><br>
            </i></font></span></span><span class="pun"><span class="pun"><font
            color="#3333ff"><i><span class="pun"><span class="pun">&nbsp;&nbsp;&nbsp;
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;name&gt;brick2-name&lt;/name&gt;</span></span></i><i><br>
            </i><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/brick&gt;</i><i><br>
            </i><i>&nbsp;&nbsp;&nbsp; &lt;/bricks&gt;</i><i><br>
            </i><i>&lt;/action&gt;</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">&lt;bricks&gt;<br>
                  &nbsp;&nbsp;&nbsp; &lt;brick id="brick1-id"/&gt;<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">&nbsp;&nbsp;&nbsp; &lt;brick
                          id="brick2-id"/&gt;</span></span></span></span><br>
                  &lt;/bricks&gt;</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/&lt;cluster-id&gt;/glustervolumes/&lt;volume-id&gt;/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>