quota-class-update doesn't work for --fixed_ips

Bug #1330571 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Low
Matt Riedemann

Bug Description

There is a fixed_ips default quota of -1 but novaclient doesn't support updating that field.

Here are defaults:

[root@vs212 ~]# nova quota-defaults
+-----------------------------+-------+
| Quota | Limit |
+-----------------------------+-------+
| instances | 10 |
| cores | 20 |
| ram | 51200 |
| floating_ips | 10 |
| fixed_ips | -1 |
| metadata_items | 128 |
| injected_files | 5 |
| injected_file_content_bytes | 10240 |
| injected_file_path_bytes | 255 |
| key_pairs | 100 |
| security_groups | 10 |
| security_group_rules | 20 |
+-----------------------------+-------+

This fails when trying to update --fixed_ips:

[root@vs212 ~]# nova quota-class-update --fixed_ips 5
usage: nova [--version] [--debug] [--os-cache] [--timings]
            [--timeout <seconds>] [--os-auth-token OS_AUTH_TOKEN]
            [--os-username <auth-user-name>] [--os-password <auth-password>]
            [--os-tenant-name <auth-tenant-name>]
            [--os-tenant-id <auth-tenant-id>] [--os-auth-url <auth-url>]
            [--os-region-name <region-name>] [--os-auth-system <auth-system>]
            [--service-type <service-type>] [--service-name <service-name>]
            [--volume-service-name <volume-service-name>]
            [--endpoint-type <endpoint-type>]
            [--os-compute-api-version <compute-api-ver>]
            [--os-cacert <ca-certificate>] [--insecure]
            [--bypass-url <bypass-url>]
            <subcommand> ...
error: unrecognized arguments: --fixed_ips
Try 'nova help ' for more information.

This is because --fixed_ips isn't a listed var for the shell command:

http://git.openstack.org/cgit/openstack/python-novaclient/tree/novaclient/v1_1/shell.py#n3424

Matt Riedemann (mriedem)
Changed in python-novaclient:
status: New → Triaged
importance: Undecided → Low
Matt Riedemann (mriedem)
Changed in python-novaclient:
assignee: nobody → Matt Riedemann (mriedem)
Revision history for this message
Matt Riedemann (mriedem) wrote :

Hmm, the v3 shell actually has support for the quota class API but that's not in the v3 API in nova:

https://github.com/openstack/python-novaclient/blob/master/novaclient/v3/shell.py#L2869

The v3 API was removed here:

https://review.openstack.org/#/c/72499/

Doesn't look like the client part was removed though, so that's a separate issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/100638

Changed in python-novaclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/100638
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=3441007062eea006fe0fa1a90692c3e85eee9df8
Submitter: Jenkins
Branch: master

commit 3441007062eea006fe0fa1a90692c3e85eee9df8
Author: Matt Riedemann <email address hidden>
Date: Tue Jun 17 11:01:18 2014 -0700

    Allow updating fixed_ips quotas in quota-class-update (v2 shell only)

    The quota-class-update command wasn't allowing updating quotas for
    fixed_ips which is a supported key for the os-quota-class-sets API.

    This change adds the support to update qoutas for fixed_ips and updates
    the existing test to be more robust in (a) the quota keys it's testing
    and (b) the request body it's asserting.

    This is a v2-only change since the os-quota-class-sets API was removed
    from the nova v3 API in Icehouse.

    Closes-Bug: #1330571

    Change-Id: Ifcca6d00551619b993b96f05134980a4ca2f2acf

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.