| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-sdks - 2017-01-18 | |||
| 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 | Yes, it should be | |
| 08:21:14 | reedip | :) | |
| 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 | RuiChen | finally, it worked | |
| 08:35:55 | reedip | RuiChen: found the bug ! | |
| 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/H5yOdoYA/ | |
| 08:37:09 | RuiChen | https://www.irccloud.com/pastebin/xFXl6TFa/ | |
| 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 | |
| 08:53:16 | openstackgerrit | Reedip proposed openstack/python-openstacksdk: Add project ID in QuotaDefault requests https://review.openstack.org/420301 | |
| 08:54:37 | openstackgerrit | Reedip proposed openstack/python-openstacksdk: Add project ID in QuotaDefault requests https://review.openstack.org/420301 | |
| 08:57:12 | RuiChen | reedip: I had added my +1 for the two patches, thank you | |
| 08:58:14 | reedip | Thanks RuiChen :) | |
| 11:37:56 | openstackgerrit | Chris Dent proposed openstack/api-wg: [WIP] Refactor and re-validate api change guidelines https://review.openstack.org/421846 | |
| 15:48:16 | mordred | dtroyer, stevemar: did we release occ already? | |
| 15:49:09 | mordred | ah - looks like we have | |
| 15:49:16 | dtroyer | https://review.openstack.org/#/c/421469/ yes | |
| 15:49:25 | dtroyer | need another? | |
| 15:49:41 | mordred | well - we got this submitted: https://review.openstack.org/#/c/421668/ which seems both easy and friendly - but also not _super_ important | |
| 15:51:28 | dtroyer | +A, the deadline is tomorrow if we want that in stable | |
| 15:51:30 | dtroyer | wait | |
| 15:51:36 | dtroyer | o-c-c- doesn't do stable | |
| 15:52:09 | dtroyer | so its just a matter of when it would be released, today/tomorrow or next month | |
| 15:54:42 | mordred | oh - neat. cool - no rush then | |
| 15:59:26 | openstackgerrit | Dean Troyer proposed openstack/golang-client: Revert "Add crud operation of volume API v3" https://review.openstack.org/422055 | |
| 16:01:12 | ankur-gupta-f2 | dtroyer: similar note. Does OSC do a feature freeze? | |
| 16:02:59 | dtroyer | ankur-gupta-f: yes, next week. we will have one more release before then, early next week | |
| 16:03:24 | dtroyer | osc-lib freezes tomorrow, its to-become-stable-brans is the current release | |
| 16:03:33 | dtroyer | s/brans/branch/ | |
| 16:03:52 | stevemar | dtroyer: we'll have to get more strict about feature freeze and such soon | |
| 16:04:26 | dtroyer | stevemar: soon == now for the new bits (volume v3, etc). | |