tuskar/tuskar — pull request #20 by marios (2013-07-11 20:49:17+00:00)
Title: Nova flavors

Partial implementation of "query the Nova API about Flavor resources":

[First commit](https://github.com/marios/tuskar/commit/7fe42cb5ba3a4dbbae8111ea8e0a984be500b3a6)
is about [Nova owns flavors](#novaflavors) and
[second commit](https://github.com/marios/tuskar/commit/d3d6312dc3a1dcc795d92a3c9805c51bfcd930f3)
is about 'Expose Flavor resource as a
[subcollection of ResourceClass](#flavor_rc).

#### Nova owns flavors

Code here shamelessly copied from
https://github.com/openstack/nova/blob/master/nova/image/glance.py
Basically a wrapper around python-novaclient implementing Retry and basic
Error handling etc. UNTESTED - will need a story to cover this next sprint.

That means that right now Flavor(s) are being mocked by storage in full in
the local tuskar db. Story for next sprint is to fix this code to talk to
a nova instance with the ‘Flavor Access’ compute API extension enabled
a bit more info @
http://mariosandreou.com/cloud_api/2013/07/09/calling-out-to-nova.html#http )
to create bona-fide Nova instance_type(s).

#### Expose Flavor within ResourceClass

Assumption is flavors *defined in-line* as part of ResourceClass creation
(as opposed to Rack(s) which are created by reference).

Implication is we don't expose Flavor as a stand-alone resource. A Flavor can
only be referred to as part of a ResourceClass, as shown by the examples@
https://github.com/tuskar/tuskar/wiki/cURL-commands#flavor---this-resource-only-exists-as-part-of-resourceclass

marios