[openstack-dev] Fw:Extending API via Plugins

Serg Melikyan smelikyan at mirantis.com
Wed Mar 30 17:32:00 UTC 2016


Hi wangzhh,

I think this look reasonable, but I would prefer to have a proper spec for
this feature. I generally like to have extendable API in Murano.

On Thu, Mar 24, 2016 at 8:49 PM, 王正浩 <wangzhh at awcloud.com> wrote:

> I'm sorry that I forgot to tell you murano-paste.ini should be modified to
> ...
> [app:apiv1app]
> paste.app_factory = murano.api.v1.router:APIRouterV1.factory
> ...
> And the file [4] is murano/api/v1/extensions_base.py
>
> ------------------ Original ------------------
> *From: * "王正浩"<wangzhh at awcloud.com>;
> *Date: * Fri, Mar 25, 2016 11:10 AM
> *To: * "List"<OpenStack-dev at lists.openstack.org>;
> *Cc: * "smelikyan"<smelikyan at mirantis.com>;
> *Subject: * Extending API via Plugins
>
> Hi Serg Melikyan,
> I don't know much about CF Broker API. I'm sorry that I
> have no real use-case. But here is a test one which I plan to
> complete.
>
> I modified murano/common/wsgi.py[0], murano/api/v1/router.py[1],
> added
> ...
> murano.api.v1.extensions =
>     test = murano.api.v1.extensions.test:testAPI
> ...
> to the setup.cfg[2]. Imply the class testAPI[3].
> The class testAPI  inherit a base class APIExtensionBase[4].
> I'll show you my code.
> P.S. I copied it from nova. So there are some extra code, hope you don't
> mind.
> [0] http://paste.openstack.org/show/491841/
> [1] http://paste.openstack.org/show/491840/
> [2] http://paste.openstack.org/show/491842/
> [3] http://paste.openstack.org/show/491845/
> [4] http://paste.openstack.org/show/491843/
>



-- 
Serg Melikyan, Development Manager at Mirantis, Inc.
http://mirantis.com | smelikyan at mirantis.com | +1 (650) 440-8979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160330/ed4c591d/attachment.html>


More information about the OpenStack-dev mailing list