[openstack-dev] [Nova] Type checking arguments in novaclient
Anita Kuno
akuno at lavabit.com
Mon Jan 21 18:49:05 UTC 2013
Hello:
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":
https://bugs.launchpad.net/python-novaclient/+bug/1056935
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:
https://review.openstack.org/#/c/14516/6/novaclient/v1_1/flavors.py
Bug requests a more useful error message for nova boot:
https://bugs.launchpad.net/python-novaclient/+bug/1065367
Commited November 3, 2012.
Adds is_intid to find_resource:
https://review.openstack.org/#/c/15286/4/novaclient/utils.py
Flavor Id was required to be an int but this requirement is removed
to allow int or uuid to be passed in:
https://bugs.launchpad.net/python-novaclient/+bug/1076818
https://review.openstack.org/#/c/15873/
Commited December 12, 2012.
Adds "UUID" to help message for flavor id and removes type=int from shell.py
https://review.openstack.org/#/c/15873/3/novaclient/v1_1/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:
https://bugs.launchpad.net/python-novaclient/+bug/1072961
Reported October 30, 2012, no patch.
This is the related bug dealing with image argument type checking:
https://bugs.launchpad.net/python-novaclient/+bug/1080515
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