[openstack-dev] [Nova] Type checking arguments in novaclient

Anita Kuno akuno at lavabit.com
Mon Jan 21 18:49:05 UTC 2013


I am a GNOME OPW intern currently learning novaclient and fixing bugs.

I have two related bugs (one dealing with flavor, one dealing with
image) I am addressing and need some design guidance in order to create
a unified approach in my solution.

Some history, there are 3 bugs with patches which address flavor
argument type verification in novaclient:

Bug required a more specific exception message for "create flavor":
Patch: https://review.openstack.org/#/c/14516/
Commited on October, 23, 2012.
In flavors.py type checking was added raising a CommandError if
incorrect type:
Bug requests a more useful error message for nova boot:
Commited November 3, 2012.
Adds is_intid to find_resource:
Flavor Id was required to be an int but this requirement is removed
to allow int or uuid to be passed in:
Commited December 12, 2012.
Adds "UUID" to help message for flavor id and removes type=int from shell.py
My output currently: ERROR: No flavor with a name or ID of 'sample' exists.

Currently, I am working on:
Flavor id type checking is non-existent:
Reported October 30, 2012, no patch.

This is the related bug dealing with image argument type checking:
Reported November 19, 2012, no patch.

May I get some direction as to what kind of argument type checking needs
to take place, what level it needs to occur (shell | utils.find_resource
| flavors/images), and what kind of error/exception needs to be thrown?

Thank you for your help and support,
Anita Kuno.

More information about the OpenStack-dev mailing list