<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 9:56 PM, Ken'ichi Ohmichi <span dir="ltr"><<a href="mailto:oomichi@mxs.nes.nec.co.jp" target="_blank">oomichi@mxs.nes.nec.co.jp</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi,<br>
<br>
I'd like to know should we apply Pecan/WSME to the existing projects<br>
(nova, cinder etc).<br>
<br>
IIUC, API URLs and API parameters should be on python naming rule if<br>
applying Pecan/WSME, because Pecan builds API URL by referring for a<br>
module path to API method. For example, the API URL of the following<br>
Pecan/WSME sample is "http://<hostname>:<port>/foo" for POST method.<br>
<br>
===<br>
app = pecan.make_app(RootController, ..)<br>
<br>
class RootController(object):<br>
foo = Foo()<br>
<br>
class Foo(rest.RestController):<br>
@wsexpose(..)<br>
def post(self, data):<br>
..<br>
===<br>
<br>
According to <a href="http://api.openstack.org/api-ref.html" target="_blank">http://api.openstack.org/api-ref.html</a>, current API URLs<br>
contains "-" such as "v2/{tenant_id}/os-floating-ips". We cannot create<br>
"os-floating-ips = Foo()" due to python naming rule, so I guess we need<br>
to change API URLs if applying Pecan/WSME. Now there are many APIs and<br>
Pecan/WSME will influence a lot of API design.<br>
Are there any workarounds?<br></blockquote><div><br></div><div style>We will need to make some changes to the APIs because of both Pecan and WSME. That's why the proposal is to move to the tools as each project builds a new version of its API, and not to go back and rebuild the old API servers. We can establish new naming and design conventions that make life easier with the new tools.</div>
<div style><br></div><div style>Doug</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Thanks<br>
Ken'ichi Ohmichi<br>
<br>
---<br>
<div><div class="h5">On Wed, 29 May 2013 20:07:12 -0400<br>
Doug Hellmann <<a href="mailto:doug.hellmann@dreamhost.com">doug.hellmann@dreamhost.com</a>> wrote:<br>
><br>
> I have -2ed several changes to the wsgi module in oslo-incubator in the<br>
> last few weeks, and I wanted to bring it up on the list to explain the<br>
> reasons more broadly.<br>
><br>
> At the last summit we agreed that the goal was to start deprecating our<br>
> home-grown WSGI service implementation in favor of moving to a new set of<br>
> tools called Pecan and WSME (<br>
> <a href="https://etherpad.openstack.org/havana-common-wsgi" target="_blank">https://etherpad.openstack.org/havana-common-wsgi</a>). While I understand that<br>
> we can't just drop everything and build new API servers, I do feel strongly<br>
> that we should not continue developing new features for the module we are<br>
> deprecating.<br>
><br>
> I don't see any other projects with "wsgi" in their openstack-common.conf,<br>
> nor did I find any copies of openstack/common/wsgi.py in any other<br>
> projects. I did find several wsgi.py files in different directories in the<br>
> projects. I take that to mean that we are/were still in the process of<br>
> unifying the various forked versions of the module, and I propose that we<br>
> just not bother doing more work on that. Since no project is already using<br>
> Oslo's wsgi module, I'm not sure it makes sense to bring bug fixes into<br>
> Oslo, either. If I've missed something, and projects are in fact using the<br>
> module, then we should continue to deal with bug fixes.<br>
><br>
> To officially indicate the module as deprecated, Mark suggested moving it<br>
> to openstack/common/deprecated/wsgi.py. I have done that in changeset<br>
> <a href="https://review.openstack.org/#/c/30972/" target="_blank">https://review.openstack.org/#/c/30972/</a>. As the commit log message<br>
> mentions, there is still some work to be done to remove the dependency<br>
> between one or two of the middleware classes and the now deprecated module.<br>
> I would appreciate any ideas about the best way to do that from folks who<br>
> know about those modules.<br>
><br>
> As we move to the new tools, I am sure we will find new bits of code<br>
> related to setting up those projects that we can share. For example, the<br>
> code to configure the keystone middleware for an API service shouldn't need<br>
> to be repeated across all of the projects. We should start a new module to<br>
> hold those pieces, taken from the projects that are starting to use Pecan<br>
> and WSME already. I volunteer to be the primary maintainer for that new<br>
> module within Oslo.<br>
><br>
> Doug<br>
<br>
</div></div>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div></div>