No way to set quotas for neutron-vpnaas resources using openstack CLI tool
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Medium
|
Unassigned | ||
python-openstackclient |
New
|
Undecided
|
Unassigned |
Bug Description
I can't find a way to set up VPN quotas using the CLI tools: neither the openstack CLI nor deprecated neutron CLI has this feature.
I can only update VPN quotas using a direct API request (e.g. via curl).
And can only list VPN quotas using neutron CLI tool.
[root@node4578 ~]# curl -ks -H "x-auth-token: $token" -X PUT https:/
{"quota": {"subnet": -1, "ikepolicy": -1, "subnetpool": -1, "network": -1, "ipsec_
[root@node4578 ~]#
[root@node4578 ~]# neutron quota-show e28d46f9ce084b2
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+------
| Field | Value |
+------
| endpoint_group | -1 |
| floatingip | -1 |
| ikepolicy | -1 |
| ipsec_site_
| ipsecpolicy | -1 |
| network | -1 |
| port | -1 |
| rbac_policy | -1 |
| router | -1 |
| security_group | -1 |
| security_
| security_group_rule | -1 |
| subnet | -1 |
| subnetpool | -1 |
| vpnservice | -1 |
+------
[root@node4578 ~]# openstack quota list --network --detail --project e28d46f9ce084b2
+------
| Resource | In Use | Reserved | Limit |
+------
| subnets | 0 | 0 | -1 |
| routers | 0 | 0 | -1 |
| security_
| subnet_pools | 0 | 0 | -1 |
| security_groups | 0 | 0 | -1 |
| rbac_policies | 0 | 0 | -1 |
| floating_ips | 0 | 0 | -1 |
| networks | 0 | 0 | -1 |
| ports | 0 | 0 | -1 |
+------
[root@node4578 ~]#
Hello Anton:
"neutron-vpnaas" registers two quotas: groups: https:/ /github. com/openstack/ neutron- vpnaas/ blob/f82e5c7415 646844654ffb97c 02f52541be0c906 /neutron_ vpnaas/ extensions/ vpn_endpoint_ groups. py#L83 /github. com/openstack/ neutron- vpnaas/ blob/f82e5c7415 646844654ffb97c 02f52541be0c906 /neutron_ vpnaas/ extensions/ vpnaas. py#L499
* Vpn_endpoint_
* Vpnaas: https:/
These values are present in the API. Actually "neutron" CLI commands shows it because it prints what the API call returns.
However OSC sets a static list of resources [1] for "network" quotas. Those 9 elements are in the "openstack quota list" output you printed. What you need is to improve OSC, reading what is returned in the API call and adding new elements that could be freely registered, as Neutron quota engine allows. BTW, you'll probably need to add those new parameters to [2], that is the Network Quota resource object the API is using to return the information.
I'll add OSC to this bug.
Regards.
[1]https:/ /github. com/openstack/ python- openstackclient /blob/8f07476e5 3c8dd9ddeb4bd13 f8e186c920eba1e e/openstackclie nt/common/ quota.py# L69-L79 /github. com/openstack/ openstacksdk/ blob/master/ openstack/ network/ v2/quota. py
[2]https:/