This adds support for the recommended CLI using the OpenStackClient,
without modifying the existing Blazar shell CLI.
The existing shell command classes are used, by introducing a check in
the base comand class to use either the client passed by Blazar shell,
or the client using the osc_lib client_manager.
The argument --physical-reservation is also removed for the create lease
command when using the OpenStack client.
Implements: blueprint openstackclient-support
Change-Id: I97a7b91f0d05efc887307ac167e5c368276d4f81
The Blazar CLI doesn't support show, update and delete host operations
with hostname. It only accepts id because host uses a key called
hypervisor_hostname, rather one called name like for leases.
This patch enables the Blazar CLI to support hostname as well.
Change-Id: I3a7a3307099ed518d89de37039f9366770a21ce2
Closes-Bug: #1702266
As mentioned in [1], we should avoid using six.iteritems() to achieve
iterators. We can use dict.items() instead, as it will return iterators
in Python 3 as well, and it is more readable.
In Python 2, the overhead of dict.items() creating a new list should be
negligible for most use cases in OpenStack [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I620c9cc201c62f033a5467aa52625b56e19933cb
Blazar CLI outputs unnecessary messages when creating,
updating and deleting resources such like
"<open file '<stdout>', mode 'w' at 0x7f7e3067f150>".
This commit fixes these output messages.
Change-Id: I87838dabe40039778908ad2d14426d5d2bfcfff7
The python-blazarclient repository has been using the climateclient
namespace.
This patch converts the climateclient namespace to the blazarclient
namespace. Additionally, some classes, methods and variables that
include 'climate' in their name are also changed to 'blazar'.
Change-Id: Ibf900f9a8a7a7bfb0b6b213545b9cbf121ce0df7
Closes-Bug: #1662735
Closes-Bug: #1311746