<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 05/10/2012 05:54 PM, Doug Hellmann wrote:
    <blockquote
cite="mid:CADb+p3QjDaNP3OOHHyt8viG1YeuNUbsk6vvz8C1h=+w2-Ggtzg@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">On Thu, May 10, 2012 at 9:22 AM, Loic
        Dachary <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:loic@enovance.com" target="_blank">loic@enovance.com</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          > Another item that we need to discuss is extensibility of
          this API.<br>
          <br>
          Hi,<br>
          <br>
          Here is a proposal, which we could discuss further during the
          meeting.<br>
          <br>
          GET extension=XXXX&param1=foo&param2=bar<br>
          <br>
          The API looks up /usr/share/ceilometer/extensions/XXXX.py and
          loads it. The XXXX module defines a query function that takes
          the following arguments:<br>
        </blockquote>
        <div><br>
        </div>
        <div>Andrew Bogott is doing some work with a standardized plugin
          mechanism for Nova which will eventually be put in the common
          lib for all of the projects. We should look at his work and
          use it, rather than inventing something else. I think it will
          eventually use setuptools entrypoints, which eliminates the
          need to worry about search paths.</div>
      </div>
    </blockquote>
    I agree.<br>
    <blockquote
cite="mid:CADb+p3QjDaNP3OOHHyt8viG1YeuNUbsk6vvz8C1h=+w2-Ggtzg@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
        </div>
        <div>
          <div>Why would the extension be a query parameter, rather than
            a URL component? That is, why wouldn't the extension just
            add new endpoints that could be queried directly using their
            own API? Maybe I don't understand the types of extensions
            you are thinking of.</div>
          <div> </div>
        </div>
      </div>
    </blockquote>
    No specific reason, we can just forget about it. I'm grateful
    jaypipes suggested it during the last meeting, that will save us
    time.<br>
    <br>
    Cheers<br>
    <blockquote
cite="mid:CADb+p3QjDaNP3OOHHyt8viG1YeuNUbsk6vvz8C1h=+w2-Ggtzg@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <br>
          * QUERY_STRING (i.e.
          extension=XXXX&param1=foo&param2=bar )<br>
        </blockquote>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">* a handler
          to the storage<br>
          * a pointer to the configuration (assuming there is a
          /etc/ceilometer.ini file, for instance)<br>
          <br>
          The query function would return the result. For instance {
          'in': 20001, 'out': 489324 } if asked for aggregated network
          usage.<br>
          <br>
          Multiple extensions directories could be specified and
          searched, allowing a mixture of extensions provided in
          ceilometer and custom extensions to address specific needs or
          to mature an new extension.<br>
          <br>
          The primary benefit of defining extensions in this way is to
          avoid complex conventions for aggregations or other advanced
          operations. If the API was to impose a syntax or conventions
          to say "sum this field and this one and display the result
          ordered in this way and grouped by this field and this one",
          it would be redundant with the query language of the
          underlying data. For instance, if using mongodb, it would be
          difficult to expose all the features provided by <a
            moz-do-not-send="true"
            href="http://www.mongodb.org/display/DOCS/Aggregation"
            target="_blank">http://www.mongodb.org/display/DOCS/Aggregation</a>
          or <a moz-do-not-send="true"
            href="http://www.mongodb.org/display/DOCS/MapReduce"
            target="_blank">http://www.mongodb.org/display/DOCS/MapReduce</a><br>
          <br>
          Cheers<br>
          <span class="HOEnZb"><font color="#888888"><br>
              --<br>
              Loïc Dachary         Chief Research Officer<br>
              // eNovance labs   <a moz-do-not-send="true"
                href="http://labs.enovance.com" target="_blank">http://labs.enovance.com</a><br>
              // ✉ <a moz-do-not-send="true"
                href="mailto:loic@enovance.com">loic@enovance.com</a>  ☎
              <a moz-do-not-send="true"
                href="tel:%2B33%201%2049%2070%2099%2082"
                value="+33149709982">+33 1 49 70 99 82</a><br>
              <br>
              <br>
              _______________________________________________<br>
              Mailing list: <a moz-do-not-send="true"
                href="https://launchpad.net/%7Eopenstack"
                target="_blank">https://launchpad.net/~openstack</a><br>
              Post to     : <a moz-do-not-send="true"
                href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
              Unsubscribe : <a moz-do-not-send="true"
                href="https://launchpad.net/%7Eopenstack"
                target="_blank">https://launchpad.net/~openstack</a><br>
              More help   : <a moz-do-not-send="true"
                href="https://help.launchpad.net/ListHelp"
                target="_blank">https://help.launchpad.net/ListHelp</a><br>
            </font></span></blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="3000">-- 
Loïc Dachary         Chief Research Officer
// eNovance labs   <a class="moz-txt-link-freetext" href="http://labs.enovance.com">http://labs.enovance.com</a>
// ✉ <a class="moz-txt-link-abbreviated" href="mailto:loic@enovance.com">loic@enovance.com</a>  ☎ +33 1 49 70 99 82
</pre>
  </body>
</html>