fixes bug 920474.
the nova client was not defaulting to version 1.1 unless NOVA_VERSION was
set. This makes version 1.1 the default if NOVA_VERSION is not set in the
environment.
It also makes shell.py usable from a git checkout as in:
PYTHONPATH=$PWD python novaclient/shell.py image-list
Change-Id: I02b7e060d1c0694639fcb146a7394b92014c140b
Fixes bug #911552
The None, True, and False values are singletons.
All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.
All Object type comparisons should use isinstance()
instead of comparing types directly
Change-Id: Ia5571e58e2662c652f0e996d8c1a1acb4531623d
409s are getting eaten... and nova uses this to return error when not in
the correct state to do an operation.
Change-Id: I76e9e98a89deb19e6b8aa32426fa31d6d66b8fdd
create() and get() are not needed here :
- it's not the role of the resource to call 'create'.
- 'get' is here to refresh the resource. There's no mean to retrieve
for sure the resource (get by IP address *or* by name only).
Change-Id: I97f4c26264b4abd0c1c8cdd91acc23ab6d6d008e
Some methods which should have returned objects dit not return and some
methods which don't return anything used return ... Fixed all that and
added tests to detect two returns which were missing.
Fixes bug 892058
Change-Id: If59468cfe1c7b1ab74ed0bfc6f81590dfd5dd668
Now a url like 'os-foo-bar/blah?arg1=apple&arg2=orange' will
invoke a fake function like 'os_foo_bar_blah' and receive
the arguments (arg1=apple, arg2=orange) as part of its
kwargs.
Change-Id: If2905ed0f335128ccd4100997354dfe12e0017fd
Now instead of doing server.get_console_output()[0]['output']
You can do: server.get_console_output()
Change-Id: Ic8a3f435fa0111feaa0d5cd42943dd2c7c243fb9
Nova volumes do not have a name property but a displayName one, therefore we
modify find_resource() so it looks for this. Then, we modify the test suite
for utils.py so it uses the novaclient.base.ManagerWithFind class for its
FakeManager rather than implementing its own find() method. This way we are
sure that the utils.py functions work correctly with ManagerWithFind and its
way to search in objects list.
FakeResource class is now used, whereas it was not before.
Change-Id: I4c4838250e6987e05022e1607e8d099eb8fb7fff
Signed-off-by: Julien Danjou <julien@danjou.info>
ManagerWithFind.find() method wants to use self.list() but Manager does not
provides it. Therefore, it's better to implement it as an interface here,
and raise a NotImplementedError.
Change-Id: Iba6ef2c1f789c2eb12b210d42261d63796db3407
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
Added @unauthenticated decorator to mark subcommands that do not
need authentication. And checks to skip authentication for these
commands.
Added novaclient.keystone to setup.py
Change-Id: Id2fd60af305c30a950bdbae8f897192bfae4d797
Python >= 2.7 has argparse has a builtin module, so there's no need to add
it to the this list of requirements.
Change-Id: I647cec70a564b1d184f0cb2aca6caf4d6478c403
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>