Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-18 Thread Matthew Gilliard
I think that both ways of doing this should be supported. Decorated private methods make sense if the different microversions have nicely interchangeable bits of functionality but not if one of the private methods would have to be a no-op. A method which just passes is noise. Additionally there

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-16 Thread Alex Xu
Oops, thanks, I abandoned my one. 2015-03-16 17:09 GMT+08:00 Chen CH Ji jiche...@cn.ibm.com: oops, duplication ... I submitted changes to spec after got this info since it make sense to me ... https://review.openstack.org/#/c/164229/ https://review.openstack.org/#/c/164234/ Best Regards!

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-16 Thread Alex Xu
2015-03-16 12:26 GMT+08:00 Christopher Yeoh cbky...@gmail.com: So ultimately I think this is a style issue rather than a technical one. I think there are situations where one way looks clearer than another the other way does. Sorry I can't get around to putting up a couple of examples, ATM

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-16 Thread Chen CH Ji
oops, duplication ... I submitted changes to spec after got this info since it make sense to me ... https://review.openstack.org/#/c/164229/ https://review.openstack.org/#/c/164234/ Best Regards! Kevin (Chen) Ji 纪 晨 Engineer, zVM Development, CSTL Notes: Chen CH Ji/China/IBM@IBMCN Internet:

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-15 Thread Alex Xu
2015-03-13 19:10 GMT+08:00 Sean Dague s...@dague.net: On 03/13/2015 02:55 AM, Chris Friesen wrote: On 03/12/2015 12:13 PM, Sean Dague wrote: On 03/12/2015 02:03 PM, Chris Friesen wrote: Hi, I'm having an issue with microversions. The api_version() code has a comment saying This

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-15 Thread Christopher Yeoh
So ultimately I think this is a style issue rather than a technical one. I think there are situations where one way looks clearer than another the other way does. Sorry I can't get around to putting up a couple of examples, ATM but to be clear there is no difference in the end result (no different

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-15 Thread Alex Xu
2015-03-16 9:48 GMT+08:00 Alex Xu sou...@gmail.com: 2015-03-13 19:10 GMT+08:00 Sean Dague s...@dague.net: On 03/13/2015 02:55 AM, Chris Friesen wrote: On 03/12/2015 12:13 PM, Sean Dague wrote: On 03/12/2015 02:03 PM, Chris Friesen wrote: Hi, I'm having an issue with microversions.

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-13 Thread Chris Friesen
On 03/12/2015 12:13 PM, Sean Dague wrote: On 03/12/2015 02:03 PM, Chris Friesen wrote: Hi, I'm having an issue with microversions. The api_version() code has a comment saying This decorator MUST appear first (the outermost decorator) on an API method for it to work correctly I tried making a

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-13 Thread Chen CH Ji
I posted same question below yesterday, not sure why it's not posted in the list ... Best Regards! Kevin (Chen) Ji 纪 晨 Engineer, zVM Development, CSTL Notes: Chen CH Ji/China/IBM@IBMCN Internet: jiche...@cn.ibm.com Phone: +86-10-82454158 Address: 3/F Ring Building, ZhongGuanCun Software

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-13 Thread Sean Dague
On 03/13/2015 02:55 AM, Chris Friesen wrote: On 03/12/2015 12:13 PM, Sean Dague wrote: On 03/12/2015 02:03 PM, Chris Friesen wrote: Hi, I'm having an issue with microversions. The api_version() code has a comment saying This decorator MUST appear first (the outermost decorator) on an API

[openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-12 Thread Chris Friesen
Hi, I'm having an issue with microversions. The api_version() code has a comment saying This decorator MUST appear first (the outermost decorator) on an API method for it to work correctly I tried making a microversioned static class method like this: @wsgi.Controller.api_version(2.4)

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-12 Thread Sean Dague
On 03/12/2015 02:03 PM, Chris Friesen wrote: Hi, I'm having an issue with microversions. The api_version() code has a comment saying This decorator MUST appear first (the outermost decorator) on an API method for it to work correctly I tried making a microversioned static class method

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-12 Thread Chen CH Ji
Know it's a little bit tricky but from doc/source/devref/api_microversions.rst, can we make _version_specific_func static function thought it's not required or we can explicitly suggest not to do so... 91 @api_version(2.1, 2.4) 92 def _version_specific_func(self, req, arg1): 93

Re: [openstack-dev] [nova] is it possible to microversion a static class method?

2015-03-12 Thread Alex Xu
2015-03-13 2:13 GMT+08:00 Sean Dague s...@dague.net: On 03/12/2015 02:03 PM, Chris Friesen wrote: Hi, I'm having an issue with microversions. The api_version() code has a comment saying This decorator MUST appear first (the outermost decorator) on an API method for it to work