Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On Fri, 28 Aug 2015, Chris Dent wrote: The problem with the spec is that it doesn't know what to replace WSME with. Thanks to everyone who provided some input. The summary is: A lot of support for Flask. A fair bit of support for the idea of using JSONSchema and publishing it. Since this isn't a new API we may find that doing Flask to exactly replicate the existing API is not possible, but if it is it seems like a good candidate. Thanks again. -- Chris Dent tw:@anticdent freenode:cdent https://tank.peermore.com/tanks/cdent __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 08/28/2015 10:36 AM, Lucas Alvares Gomes wrote: Hi, If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. I have been thinking about doing it for Ironic as well so I'm looking for options. IMHO after using WSME I would think that one of the most important criteria we should start looking at is if the project has a health, sizable and active community around it. It's crucial to use libraries that are being maintained. So at the present moment the [micro]framework that comes to my mind - without any testing or prototype of any sort - is Flask. I personally find Flask to be super nice to work with. It is easy to visualize what the API looks like just from reading the code. It also has good documentation and a fairly large community. Cheers, Lucas __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
Hi, If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. I have been thinking about doing it for Ironic as well so I'm looking for options. IMHO after using WSME I would think that one of the most important criteria we should start looking at is if the project has a health, sizable and active community around it. It's crucial to use libraries that are being maintained. So at the present moment the [micro]framework that comes to my mind - without any testing or prototype of any sort - is Flask. Cheers, Lucas __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On Fri, Aug 28 2015, Chris Dent wrote: This morning I kicked off a quick spec for replacing WSME in Ceilometer with ... something: https://review.openstack.org/#/c/218155/ This is because not only is WSME not that great, it also results in controller code that is inscrutable. The problem with the spec is that it doesn't know what to replace WSME with. So, for your Friday afternoon pleasure I invite anyone with an opinion to hold forth on what framework they would choose. The spec lists a few options but please feel to not limit yourself to those. If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. For Gnocchi we've been relying on voluptuous¹ for data validation, and Pecan as the rest of the framework – like what's used in Ceilometer and consors. I find it a pretty good option, more Pythonic than JSON Schema – which has its pros and cons too. What I'm not happy with is actually Pecan, as I find the routing system way too much complex in the end. I think I'd prefer to go with something like Flask finally. P.S: An option not listed, and one that may make perfect sense for ceilometer (but perhaps not aodh), is to do nothing and consider the v2 api legacy. This is going to happen in a few cycles I hope for Ceilometer. ¹ https://pypi.python.org/pypi/voluptuous -- Julien Danjou # Free Software hacker # http://julien.danjou.info signature.asc Description: PGP signature __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 08/28/2015 04:36 PM, Lucas Alvares Gomes wrote: Hi, If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. I have been thinking about doing it for Ironic as well so I'm looking for options. IMHO after using WSME I would think that one of the most important criteria we should start looking at is if the project has a health, sizable and active community around it. It's crucial to use libraries that are being maintained. So at the present moment the [micro]framework that comes to my mind - without any testing or prototype of any sort - is Flask. We're using Flask in inspector. We have a nice experience, but note that inspector does not have very complex API :) Cheers, Lucas __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On Fri, Aug 28 2015, Jay Pipes wrote: voluptuous may be more Pythonic, as Julien mentioned, but the problem is you can't expose the validation schema to the end user via any standard document format (like JSONSchema). Using the jsonschema library along with standard JSONSchema documents allows the API to publish its expected request and response schemas to the end user, allowing, for example, a client library to pull the schema documents and utilize a JSONSchema parsing/validation library locally to pre-validate data before ever sending it over the wire. That's a good point. I think we took a look at some point to generate JSON Schema from voluptuous, but we didn't continue since we were not sure there were a use case. Though that might be possible I imagine if somebody asks at some point. (or we could also rewrite the few schemas we have to JSON Schema since there not tight to the WSGI framework anyway) -- Julien Danjou ;; Free Software hacker ;; http://julien.danjou.info signature.asc Description: PGP signature __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
I enjoy using validictory for using Jsonschema with Python https://pypi.python.org/pypi/validictory. Sent from my iPhone On Aug 28, 2015, at 11:29 AM, Jay Pipes jaypi...@gmail.com wrote: On 08/28/2015 07:22 AM, Chris Dent wrote: This morning I kicked off a quick spec for replacing WSME in Ceilometer with ... something: https://review.openstack.org/#/c/218155/ This is because not only is WSME not that great, it also results in controller code that is inscrutable. The problem with the spec is that it doesn't know what to replace WSME with. So, for your Friday afternoon pleasure I invite anyone with an opinion to hold forth on what framework they would choose. The spec lists a few options but please feel to not limit yourself to those. If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. I'm not going to get into another discussion about what WSGI/routing framework to use (go Falcon! ;) ). But, since you are asking specifically about *validation* of request input, I'd like to suggest just using plain ol' JSONSchema, and exposing the JSONSchema documents in a GET /schemas/{object_type} resource endpoint. voluptuous may be more Pythonic, as Julien mentioned, but the problem is you can't expose the validation schema to the end user via any standard document format (like JSONSchema). Using the jsonschema library along with standard JSONSchema documents allows the API to publish its expected request and response schemas to the end user, allowing, for example, a client library to pull the schema documents and utilize a JSONSchema parsing/validation library locally to pre-validate data before ever sending it over the wire. Best, -jay __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 08/28/2015 07:22 AM, Chris Dent wrote: This morning I kicked off a quick spec for replacing WSME in Ceilometer with ... something: https://review.openstack.org/#/c/218155/ This is because not only is WSME not that great, it also results in controller code that is inscrutable. The problem with the spec is that it doesn't know what to replace WSME with. So, for your Friday afternoon pleasure I invite anyone with an opinion to hold forth on what framework they would choose. The spec lists a few options but please feel to not limit yourself to those. If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. I'm not going to get into another discussion about what WSGI/routing framework to use (go Falcon! ;) ). But, since you are asking specifically about *validation* of request input, I'd like to suggest just using plain ol' JSONSchema, and exposing the JSONSchema documents in a GET /schemas/{object_type} resource endpoint. voluptuous may be more Pythonic, as Julien mentioned, but the problem is you can't expose the validation schema to the end user via any standard document format (like JSONSchema). Using the jsonschema library along with standard JSONSchema documents allows the API to publish its expected request and response schemas to the end user, allowing, for example, a client library to pull the schema documents and utilize a JSONSchema parsing/validation library locally to pre-validate data before ever sending it over the wire. Best, -jay __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 08/28/2015 08:32 AM, Julien Danjou wrote: On Fri, Aug 28 2015, Chris Dent wrote: This morning I kicked off a quick spec for replacing WSME in Ceilometer with ... something: https://review.openstack.org/#/c/218155/ This is because not only is WSME not that great, it also results in controller code that is inscrutable. The problem with the spec is that it doesn't know what to replace WSME with. So, for your Friday afternoon pleasure I invite anyone with an opinion to hold forth on what framework they would choose. The spec lists a few options but please feel to not limit yourself to those. If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. For Gnocchi we've been relying on voluptuous¹ for data validation, and Pecan as the rest of the framework – like what's used in Ceilometer and consors. I find it a pretty good option, more Pythonic than JSON Schema – which has its pros and cons too. What I'm not happy with is actually Pecan, as I find the routing system way too much complex in the end. I think I'd prefer to go with something like Flask finally. P.S: An option not listed, and one that may make perfect sense for ceilometer (but perhaps not aodh), is to do nothing and consider the v2 api legacy. This is going to happen in a few cycles I hope for Ceilometer. ¹ https://pypi.python.org/pypi/voluptuous We use voluptuous in Infra for data validation and have been very pleased with it. __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
Monty Taylor wrote: On 08/28/2015 08:32 AM, Julien Danjou wrote: On Fri, Aug 28 2015, Chris Dent wrote: This morning I kicked off a quick spec for replacing WSME in Ceilometer with ... something: https://review.openstack.org/#/c/218155/ This is because not only is WSME not that great, it also results in controller code that is inscrutable. The problem with the spec is that it doesn't know what to replace WSME with. So, for your Friday afternoon pleasure I invite anyone with an opinion to hold forth on what framework they would choose. The spec lists a few options but please feel to not limit yourself to those. If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. For Gnocchi we've been relying on voluptuous¹ for data validation, and Pecan as the rest of the framework – like what's used in Ceilometer and consors. I find it a pretty good option, more Pythonic than JSON Schema – which has its pros and cons too. What I'm not happy with is actually Pecan, as I find the routing system way too much complex in the end. I think I'd prefer to go with something like Flask finally. P.S: An option not listed, and one that may make perfect sense for ceilometer (but perhaps not aodh), is to do nothing and consider the v2 api legacy. This is going to happen in a few cycles I hope for Ceilometer. ¹ https://pypi.python.org/pypi/voluptuous We use voluptuous in Infra for data validation and have been very pleased with it. Out of curiosity how are u using voluptuous (and/or getting it installed?), when I tried to propose that to the global requirements requirement list/repo I got shot-down (since json-schema does similar things); Review @ https://review.openstack.org/#/c/131920/ __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 08/28/2015 08:32 AM, Julien Danjou wrote: On Fri, Aug 28 2015, Chris Dent wrote: This morning I kicked off a quick spec for replacing WSME in Ceilometer with ... something: https://review.openstack.org/#/c/218155/ This is because not only is WSME not that great, it also results in controller code that is inscrutable. The problem with the spec is that it doesn't know what to replace WSME with. So, for your Friday afternoon pleasure I invite anyone with an opinion to hold forth on what framework they would choose. The spec lists a few options but please feel to not limit yourself to those. If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. For Gnocchi we've been relying on voluptuous¹ for data validation, and Pecan as the rest of the framework – like what's used in Ceilometer and consors. I find it a pretty good option, more Pythonic than JSON Schema – which has its pros and cons too. What I'm not happy with is actually Pecan, as I find the routing system way too much complex in the end. I think I'd prefer to go with something like Flask finally. One more thing from my previous things - this exists: https://github.com/rantav/flask-restful-swagger The docs team has been working on getting a bunch of swagger stuff going. This might be (needs real investigation) a nice way of complimenting that work - and is also looking for adoption. So one could imagine a future where we took that direction and OpenStack offered to adopt the module. Just a thought - my opinion should be considered useless. P.S: An option not listed, and one that may make perfect sense for ceilometer (but perhaps not aodh), is to do nothing and consider the v2 api legacy. This is going to happen in a few cycles I hope for Ceilometer. ¹ https://pypi.python.org/pypi/voluptuous __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
It seems like Flask has a reasonable amount of support and there is a good ecosystem around it but that aside (as Jay said)... I definitely support exposing the schema to the end user; making it easier for the end user to validate input / model outputs for their integration with OpenStack services is an important feature of whatever is selected. I admit I am intrigued by the swagger things (and I expect to be spending some serious time considering it) that Monty linked (especially relating to Flask, but there is a bias as Keystone is moving to flask). --Morgan On Fri, Aug 28, 2015 at 1:26 PM, michael mccune m...@redhat.com wrote: On 08/28/2015 10:36 AM, Lucas Alvares Gomes wrote: So at the present moment the [micro]framework that comes to my mind - without any testing or prototype of any sort - is Flask. just wanted to add on here, sahara is using flask. mike __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On Aug 28, 2015, at 6:10 PM, Morgan Fainberg morgan.fainb...@gmail.com wrote: It seems like Flask has a reasonable amount of support and there is a good ecosystem around it but that aside (as Jay said)... I definitely support exposing the schema to the end user; making it easier for the end user to validate input / model outputs for their integration with OpenStack services is an important feature of whatever is selected. I admit I am intrigued by the swagger things (and I expect to be spending some serious time considering it) that Monty linked (especially relating to Flask, but there is a bias as Keystone is moving to flask). With respect to Swagger, we have a guideline [1] in flight from Anne that involves it for API docs. Everett [1] https://review.openstack.org/#/c/214817/ __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 08/28/2015 10:36 AM, Lucas Alvares Gomes wrote: So at the present moment the [micro]framework that comes to my mind - without any testing or prototype of any sort - is Flask. just wanted to add on here, sahara is using flask. mike __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 08/28/2015 07:36 AM, Lucas Alvares Gomes wrote: Hi, If you just want to shoot the breeze please respond here. If you have specific comments on the spec please response there. I have been thinking about doing it for Ironic as well so I'm looking for options. IMHO after using WSME I would think that one of the most important criteria we should start looking at is if the project has a health, sizable and active community around it. It's crucial to use libraries that are being maintained. So at the present moment the [micro]framework that comes to my mind - without any testing or prototype of any sort - is Flask. Keystone is about to do an API thing in flask - so I'd say that has some groundswell to it. Also - there is a Flask extension called Flask-API which generates an HTML browsable/discoverable version of the endpoint. __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [api] [wsme] [ceilometer] Replacing WSME with _____ ?
On 2015-08-28 11:27:57 -0700 (-0700), Joshua Harlow wrote: Out of curiosity how are u using voluptuous (and/or getting it installed?), when I tried to propose that to the global requirements requirement list/repo I got shot-down (since json-schema does similar things); Zuul uses voluptuous to validate its YAML-based layout configuration and Nodepool does similarly (but our Infra projects don't generally participate in global requirements either). -- Jeremy Stanley __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev