Earlier  
Posted Nick Remark
#openstack-sdks - 2017-01-13
07:43:24 reedip RuiChen : I have 0.9.12 ( I like living on the edge :P )
07:43:56 reedip RuiChen : so would be fixing that in the Openstack SDK itseld, I talked with briancurtin about it earlier this week
07:44:47 RuiChen seems neutron server side don't accept id when update quota
07:44:53 reedip yes, it doesnt
07:44:55 RuiChen https://www.irccloud.com/pastebin/kYQKtf7A/
07:45:16 reedip thats what I mentioned in the bug
07:46:35 reedip I have made a few changes, but need to modify resource2 in openstack SDK
07:48:58 RuiChen yes, you are right, the object id is added common logic of resource2
07:50:10 reedip RuiChen : The fix is simple , ideally
07:50:23 reedip RuiChen: quota update uses proxy
07:51:28 reedip From openstack/network/v2/_proxy.py
07:52:08 reedip basically we need to send a check from here NOT to check ID required in openstack/proxy.py
07:53:07 reedip But to do that we need to overwrite the _update function in proxy
07:53:36 reedip or send an additional attribute from update_quota function which is popped out in the _update function
07:54:24 RuiChen thank you, I'm thinking about why neutron side don't accept the id attribute? looks like it break API forward compatibility
07:55:03 reedip RuiChen : Neutron API does not need ID as an attribute
07:55:27 reedip thats because it treats quotas as a resource, and the ID acts an end point to that resource
07:56:03 reedip if you try and update the quota using : "neutron --debug quota-update --subnet 1" , you will see the resource end point
07:56:24 reedip considering you have the neutronclient installed in your system
07:56:38 RuiChen let me try, thank your clarification :)
07:57:15 reedip NP :)
07:59:04 RuiChen https://www.irccloud.com/pastebin/JeIIAoRM/
08:01:52 RuiChen reedip: so neutron don't accept id always, openstacksdk shouldn't add id, right?
08:02:24 reedip RuiChen : Neutron doesnt accept IDs for only certain conditions
08:02:27 reedip like quota
08:02:38 reedip maybe this would change in the future releases, but not now
08:02:54 reedip openstacksdk should not add ID for specific conditions
08:03:03 RuiChen get it, thank you :)
08:03:28 reedip RuiChen : what would be interesting is quota list for a specific tenant :D
08:05:30 reedip Like when I ran it for a specific project ( demo ) , neutron evaluated the REST request as :
08:05:33 reedip neutronclient.v2_0.client GET call to neutron for http://10.0.4.186:9696/v2.0/quotas/062fe3fccc174db385b1a35a1ee3152f.json
08:05:37 RuiChen I'm not sure if all the services support to list specified tenant quota
08:05:51 reedip RuiChen: neutron does , in neutronclient
08:06:02 reedip then it shouldnt avoid doing the same in openstackclient :D
08:07:01 RuiChen I think if admin can set quota for specified tenant, then he should can list it
08:07:38 reedip RuiChen : admin can update it
08:08:08 reedip RuiChen : I just confirmed, there is no problem in listing the information in quota
08:08:16 reedip neutron quota-update --subnet 10000 --tenant-id 062fe3fccc174db385b1a35a1ee3152f
08:08:17 reedip neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
08:08:17 reedip | Field | Value |
08:08:17 reedip +---------------------+-------+
08:08:17 reedip | floatingip | 50 |
08:08:19 reedip | network | 10 |
08:08:21 reedip | port | 50 |
08:08:23 reedip | rbac_policy | 10 |
08:08:25 reedip | router | 10 |
08:08:27 reedip | security_group | 10 |
08:08:29 reedip | security_group_rule | 100 |
08:08:31 reedip | subnet | 10000 |
08:08:35 reedip | subnetpool | -1 |
08:08:37 reedip +---------------------+-------+
08:08:39 reedip [outofmemory@localhost neutron]$ openstack quota show 062fe3fccc174db385b1a35a1ee3152f
08:08:41 reedip +-----------------------+----------------------------------+
08:08:43 reedip | Field | Value |
08:08:45 reedip +-----------------------+----------------------------------+
08:08:47 reedip | backup-gigabytes | 1000 |
08:08:49 reedip | backups | 10 |
08:08:51 reedip | cores | 20 |
08:08:53 reedip | fixed-ips | -1 |
08:08:55 reedip | floating-ips | 50 |
08:08:57 reedip | gigabytes | 1000 |
08:08:59 reedip | gigabytes_lvmdriver-1 | -1 |
08:09:01 reedip | injected-file-size | 10240 |
08:09:05 reedip | injected-files | 5 |
08:09:07 reedip | injected-path-size | 255 |
08:09:09 reedip | instances | 10 |
08:09:11 reedip | key-pairs | 100 |
08:09:13 reedip | networks | 10 |
08:09:15 reedip | per-volume-gigabytes | -1 |
08:09:17 reedip | ports | 50 |
08:09:19 reedip | project | 062fe3fccc174db385b1a35a1ee3152f |
08:09:21 reedip | properties | 128 |
08:09:23 reedip | ram | 51200 |
08:09:25 reedip | rbac-policies | 10 |
08:09:27 reedip | routers | 10 |
08:09:29 reedip | secgroup-rules | 100 |
08:09:31 reedip | secgroups | 10 |
08:09:35 reedip | server-group-members | 10 |
08:09:37 reedip | server-groups | 10 |
08:09:39 reedip | snapshots | 10 |
08:09:41 reedip | snapshots_lvmdriver-1 | -1 |
08:09:43 reedip | subnetpools | -1 |
08:09:45 reedip | subnets | 10000 |
08:09:47 reedip | volumes | 10 |
08:09:49 reedip | volumes_lvmdriver-1 | -1 |
08:09:51 reedip +-----------------------+----------------------------------+
08:09:53 reedip [outofmemory@localhost neutron]$
08:32:35 RuiChen sorry, reply late, looks nova support it too
08:32:47 RuiChen reedip: ^^^
08:42:26 reedip RuiChen : okay great :)
09:18:36 openstackgerrit Sindhu Devale proposed openstack/python-openstackclient: OSC Quota List https://review.openstack.org/379813
09:25:18 huanxuan stevemar: Sorry that I am on a business trip today,will back tomorrow,
09:27:28 huanxuan RuiChen: Thanks very much for your help! :)
11:48:18 openstackgerrit yuval shalev proposed openstack/python-openstacksdk: Added project role assignment https://review.openstack.org/416598
12:08:02 reedip RuiChen: The issue is resolved but had to hack some things
12:12:06 openstackgerrit Reedip proposed openstack/python-openstacksdk: Fix Setting Quotas in Neutron https://review.openstack.org/419911
13:17:52 Serlex hi, " An authenticated request is required but no plugin available." how may I resolve this
14:23:18 openstackgerrit Ed Leafe proposed openstack/api-wg: Define pagination guidelines https://review.openstack.org/390973
14:43:44 openstackgerrit Merged openstack/python-openstackclient: Install from /opt/stack/new instead of git.o.o https://review.openstack.org/419670
15:57:29 dtroyer stevemar: we are so, uh, well, I can't say it in a logged room…

Earlier   Later