Novaclient flavors.create needs cleanup

Bug #1080891 reported by Gabriel Hurley on 2012-11-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Undecided
Unassigned

Bug Description

The conversion from integer-only required flavor ids in novaclient to allowing string ids and autogenerated ids needs some cleanup. REferring to the code here:

https://github.com/openstack/python-novaclient/blob/master/novaclient/v1_1/flavors.py#L107

  1. The docstring still refers to the id as a required integer.

  2. The flavor id argument, given it's position, could have been converted into a kwarg with a value of None with no alteration to the method signature. This would have eliminated the need for the "auto" special-cased name.

  3. The current implementation means that you can't create a flavor named "auto". While this isn't a huge issue, it is still an unnecessary artificial restriction on the possible set.

Gabriel Hurley (gabriel-hurley) wrote :

There's also a typo in that code; the variable "ephemeral" is misspelled and thus never properly used.

affects: nova → python-novaclient

Reviewed: https://review.openstack.org/16488
Committed: http://github.com/openstack/python-novaclient/commit/e9b015c7e14843784debc0d68cfe070c9778f80d
Submitter: Jenkins
Branch: master

commit e9b015c7e14843784debc0d68cfe070c9778f80d
Author: Gabriel Hurley <email address hidden>
Date: Sat Nov 17 18:18:48 2012 -0800

    Cleans up the flavor creation code. Fixes bug 1080891.

    Change-Id: Idc76cd01d1537ab87723a05ab8dd81015284e3c8

Changed in python-novaclient:
status: New → Fix Committed
Changed in python-novaclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers