Earlier  
Posted Nick Remark
#openstack-sdks - 2017-01-17
19:11:20 openstackgerrit Shashank Kumar Shankar proposed openstack/python-openstackclient: Introduce Neutron DHCP agent commands to OSC. https://review.openstack.org/387611
19:27:15 openstackgerrit Trevor McCasland proposed openstack/python-openstackclient: Add plugin adoption for trove https://review.openstack.org/421336
19:28:13 openstackgerrit Ankur proposed openstack/python-openstacksdk: Network L3 Router Commands https://review.openstack.org/385728
21:46:35 openstackgerrit Ankur proposed openstack/python-openstacksdk: Network L3 Router Commands https://review.openstack.org/385728
22:09:07 openstackgerrit Merged openstack/keystoneauth: Log request-id for each api call https://review.openstack.org/392442
22:33:18 openstackgerrit Shashank Kumar Shankar proposed openstack/python-openstacksdk: Corrections in DHCP Agent Resource listing. https://review.openstack.org/421568
22:35:58 openstackgerrit Shashank Kumar Shankar proposed openstack/python-openstacksdk: Corrections in DHCP Agent Resource listing. https://review.openstack.org/421568
22:47:27 openstackgerrit Shashank Kumar Shankar proposed openstack/python-openstacksdk: Corrections in DHCP Agent Resource listing. https://review.openstack.org/421568
23:09:34 openstackgerrit Shashank Kumar Shankar proposed openstack/python-openstackclient: Introduce Neutron DHCP agent commands to OSC. https://review.openstack.org/387611
23:29:06 openstackgerrit Justin A Wilson proposed openstack/python-openstackclient: Add support for Cinder API 3.3 into OSC https://review.openstack.org/421585
#openstack-sdks - 2017-01-18
00:38:39 openstackgerrit YAMAMOTO Takashi proposed openstack/python-openstackclient: Remove the fixed set of choices for network_type https://review.openstack.org/421598
01:26:20 openstackgerrit Huanxuan Ao proposed openstack/python-openstackclient: Fix functional test for creating subnet https://review.openstack.org/421310
01:58:30 openstackgerrit Wang Hui proposed openstack/golang-client: Update crud operation of volume API v3 https://review.openstack.org/421620
02:03:57 openstackgerrit Ha Van Tu proposed openstack/python-openstackclient: Add "qos-policy" option to "port create" & "port set" https://review.openstack.org/419236
02:04:49 openstackgerrit zhiyong.dai proposed openstack/python-openstackclient: Add "volume host failover" command https://review.openstack.org/411259
03:09:47 openstackgerrit Wang Hui proposed openstack/golang-client: Update crud operation of volume API v3 https://review.openstack.org/421641
03:15:24 openstackgerrit Merged openstack/keystoneauth: Correctly Omit Response Body in Debug Mode https://review.openstack.org/421319
03:21:47 openstackgerrit Merged openstack/python-openstackclient: Add plugin adoption for trove https://review.openstack.org/421336
04:56:12 openstackgerrit Andy Botting proposed openstack/os-client-config: Add support for Murano https://review.openstack.org/421668
05:02:09 openstackgerrit Andy Botting proposed openstack/os-client-config: Add support for Murano https://review.openstack.org/421668
05:10:47 openstackgerrit Andy Botting proposed openstack/os-client-config: Add support for Murano https://review.openstack.org/421668
06:03:16 openstackgerrit zhiyong.dai proposed openstack/python-openstackclient: Support "--no-property" option in volume snapshot set https://review.openstack.org/416182
06:11:22 openstackgerrit zhiyong.dai proposed openstack/python-openstackclient: Support "--no-property" option in volume snapshot set https://review.openstack.org/416182
06:41:21 openstackgerrit zhiyong.dai proposed openstack/python-openstackclient: Support "--no-property" option in flavor set https://review.openstack.org/421690
06:44:35 openstackgerrit zhiyong.dai proposed openstack/python-openstackclient: Support "--no-property" option in volume snapshot set https://review.openstack.org/416182
07:21:20 openstackgerrit zhiyong.dai proposed openstack/python-openstackclient: Fill the missing colon https://review.openstack.org/421705
07:31:26 reedip RuiChen: ping
07:42:36 reedip RuiChen : lemme know when you are online, would like to discuss on https://review.openstack.org/#/c/419911/2
07:55:12 RuiChen reedip: hi, let me check it
07:55:31 reedip RuiChen: I will explain here, it would be easier to understand than my comment :)
07:56:18 reedip RuiChen : please see the function in openstack/resource2.py _prepare_request()
07:56:29 reedip That class uses a parameter request_id
07:56:31 RuiChen yeah, i am reading your comment
07:56:39 reedip sorry requires_id()
07:58:15 reedip RuiChen : https://github.com/openstack/python-openstacksdk/blob/master/openstack/resource2.py#L502
07:59:38 reedip RuiChen : if you see https://github.com/openstack/python-openstacksdk/blob/master/openstack/resource2.py#L523-L529 , then you will know that if I pass requires_id as False, then URI would not have the project ID. But if I pass requires_id as True, then the InvalidRequest exception will be raised
07:59:53 RuiChen i think it should work, Quota class have id that be passed by def get_quota()
08:00:29 reedip RuiChen : if I call the base_class's prepare_request, then it fails because Quota classes do not use ID
08:00:44 reedip so putting requires_id as True raises the exception
08:01:21 reedip But if I put requires_id as False, then the URI doesnt have the Project ID , and therefore the Neutron Server doesnt get the proper REST request
08:01:39 reedip That was why I re-wrote the prepare_request for Quotas
08:02:23 RuiChen please wait a minute, let me try the patch in my devstack
08:02:47 reedip Similarly, default quotas do not have ID ( like Quotas) and they do not need Project ID in the URI, therefore the defaultQuotas class needs the requires_id
08:02:51 reedip RuiChen : ok
08:04:32 RuiChen default quota need project id too, it's passed by project=res.id in your other patch
08:05:36 reedip sorry , wrong statement. It needs project id but not in the URI
08:05:51 reedip thats why i put requires_id as false for default quotas in the second patch
08:06:07 reedip I was typing faster than I was thinking, thats why the wrong statement :D
08:10:43 RuiChen never mind, I debug the patch in my devstack to try openstack quota show, like this
08:10:50 RuiChen https://www.irccloud.com/pastebin/LaHmzLVV/
08:12:59 reedip this is quota show, right ?
08:13:07 RuiChen yes
08:13:08 reedip try quota set and quota-show --default
08:13:36 reedip this is your code ?
08:14:19 RuiChen https://www.irccloud.com/pastebin/Lpl0Srf1/
08:14:29 RuiChen this quota set --network -1 xxx
08:14:55 RuiChen quota show --default have to apply your other patch
08:15:45 reedip RuiChen, how did the request body have ID when you deleted it using the if loop ?
08:17:53 RuiChen yeah, have to handle the resource_key in body, then delete 'id'
08:19:01 reedip RuiChen : and you are trying this with SDK 0.9.12 right ??? :)
08:19:11 reedip just confirming , please do not mind :)
08:20:19 reedip Actually with 0.9.12, https://www.irccloud.com/pastebin/Lpl0Srf1/ was not happening for me, without my patch. It was failing at the _prepare_requests because quotas didnt have the ID
08:20:49 RuiChen I try the patch in current openstack sdk master, I think the code same with 0.9.12
08:21:14 reedip :)
08:21:14 reedip Yes, it should be
08:24:06 RuiChen if we can call the super class _prepare_request(), then delete 'id' in body or body[resource_key] to handle the special case for quota and default quota, i think it's better solution
08:24:46 RuiChen you don't have to care the _prepare_request() change in the future.
08:25:02 reedip RuiChen : wait, I am trying your change
08:25:17 reedip I am cloning the latest release and putting your change
08:25:28 reedip I still feel I will get a bug :P
08:28:53 RuiChen : ), I'm trying to make small change to handle quota and default quota (show and set action)
08:31:42 reedip RuiChen : I think there has been some change somewhere :D
08:35:55 reedip RuiChen: found the bug !
08:35:55 RuiChen finally, it worked
08:35:59 reedip :)
08:36:03 reedip Wait RuiChen :)
08:36:31 reedip I had 0.9.10 :P
08:36:47 reedip thats why the above code worked. Now using 0.9.12 and ur patch !
08:36:54 reedip and got the issue
08:37:09 RuiChen https://www.irccloud.com/pastebin/xFXl6TFa/
08:37:09 RuiChen https://www.irccloud.com/pastebin/H5yOdoYA/
08:39:49 reedip Ok, now it worked !
08:40:33 RuiChen \o/
08:41:14 RuiChen thank you mention the quota set case, that make the patch better
08:42:01 reedip RuiChen but what about the Default Quota now
08:42:09 reedip I need to remove the ID from URI
08:42:11 reedip :)
08:43:41 RuiChen in default quota case, project_id is not the resource id, it's attribute
08:43:59 RuiChen the resource base_path is base_path = '/quotas/%(project)s/default'
08:44:17 reedip So how would that work ?
08:44:45 RuiChen uri = self.base_path % self._uri.attributes in resource class
08:44:54 RuiChen in _prepare_request()
08:46:31 reedip so you are stating that we do not need to change anything for DefaultQuotas?>
08:47:48 RuiChen only to change the def get_quota-default(), pass id and requires_id=False
08:48:23 reedip yes, thats what I was thinking
08:48:36 reedip so I do not need to change much for the defaultquotas patch
08:48:42 reedip from the defaultquotas class
08:50:02 openstackgerrit Reedip proposed openstack/python-openstacksdk: Fix Setting Quotas in Neutron https://review.openstack.org/419911
08:50:19 reedip RuiChen vv
08:53:00 reedip RuiChen vv

Earlier   Later