<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi reedip,<br>
    <br>
    <div class="moz-cite-prefix">On 2016/03/18 12:06, reedip banerjee
      wrote:<br>
    </div>
    <blockquote
cite="mid:CANBHkEYRGzaDdGj3nfJbdGPURsbtP1Ax-4P8gogCo=ScR5kL4Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">Dear All Neutron Developers and Reviewers,
        <div><br>
        </div>
        <div>I have a query/concern related to the parsing of options in
          python-neutronclient.</div>
        <div>I would like to bring this up, as it "may" also impact the
          transition of the CLIs to the openstack client as well.</div>
        <div><br>
        </div>
        <div>NeutronClient is pretty special in its behavior, and has
          one pretty powerful feature of parsing extra options. This
          feature states that, if the CLI does not support an option but
          the API does, and the user passes a value for this option,
          then the "unsupported" CLI option is parsed , and forwarded to
          the Neutron Server for processing.</div>
        <div><br>
        </div>
        <div>Example:</div>
        <div>Currently "neutron net-create" does not support
          --router:external. If you see the output of "neutron
          net-create -h" you would not find "--router-external".
          However, this option is supported in the API since Juno [2].
          So therefore , if a user executes the following CLI <br>
        </div>
        <div><i>" neutron net-create TestNetwork --router-external" </i></div>
        <div><br>
        </div>
        <div>then [1] would be observed as an output.</div>
        <div><br>
        </div>
        <div>Now the query/concern comes next....</div>
        <div>Any option which is not supported by the CLI is open to the
          above parsing.</div>
        <div>Therefore , for net-create and net-update, all the
          following are possible:</div>
        <div><br>
        </div>
        <div><i>neutron net-create --router:external=True TESTNetwork
            --(A)<br>
          </i></div>
        <div><i>neutron net-create --router:external TESTNetwork  --(B)</i><i><br>
          </i></div>
        <div><i>neutron net-create </i><i>TESTNetwork </i><i>--router:external </i><i>--(C)</i></div>
        <div><i>neutron net-create </i><i>TESTNetwork </i><i>--router:external=True </i><i>--(D)</i><i><br>
          </i></div>
        <div><i>neutron net-create </i><i>TESTNetwork </i><i>--router:external
            True </i><i>--(E)</i><i><br>
          </i></div>
        <div>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif">However, user is not aware of the --router:external option because it is not visible in the HELP section ( this is true for other CLI options as well).</p>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif">In order to demonstrate these options to the User, we have to update add_known_arguments function to display them. And once they are known to the CLI, the parsing changes, and some of the options from (A) to (E) may not be supported ( Please see [3] for an ongoing, though now dormant, discussion ). </p>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif">Note that this discussion is not limited only to net-create, but possibly other CLIs as well which do not completely expose the Options which the API can support.I am , however, taking the<i> net-create</i> example as a case-study.</p>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif">I would like to know how we can move forward in this regards:</p>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif">-- Should NeutronClient continue to support all options from (A) to (E), but deprecate some of them in Openstack Client?
</p>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif">-- Should we deprecate them in NeutronClient itself, so that the users are comfortable with the options when the migration to Openstack Client occurs?</p>
        </div>
      </div>
    </blockquote>
    <br>
    IMO, we shouldn't support various methods to manage resources
    because I don't believe community keep maintaining all of them
    forever. It will collapse someday. We will have periods(two cycle?)
    for deprecation and then we should remove them from NeutronClient
    itself.<br>
    <br>
    Thanks,<br>
    Hirofumi<br>
    <br>
    <blockquote
cite="mid:CANBHkEYRGzaDdGj3nfJbdGPURsbtP1Ax-4P8gogCo=ScR5kL4Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif">-- Any other suggestions....</p>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif"><span style="font-family:arial,sans-serif;color:rgb(34,34,34)">[1]: <a moz-do-not-send="true" href="http://paste.openstack.org/show/491032/">http://paste.openstack.org/show/491032/</a></span></p>
          <p style="white-space:pre-wrap;color:rgb(0,0,0);font-family:sans-serif"><span style="font-family:arial,sans-serif;color:rgb(34,34,34)">[2]: <a moz-do-not-send="true" href="http://docs.openstack.org/juno/install-guide/install/apt/content/neutron_initial-external-network.html">http://docs.openstack.org/juno/install-guide/install/apt/content/neutron_initial-external-network.html</a></span></p>
        </div>
        <div>
          <div>[3]: <a moz-do-not-send="true"
              href="https://review.openstack.org/#/c/137279/">https://review.openstack.org/#/c/137279/</a></div>
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>Thanks and Regards,<br>
                    Reedip Banerjee</div>
                  <div>IRC: reedip</div>
                  <div><br>
                  </div>
                  <div><br>
                    <br>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>