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
Some of the tests rely on a hard-coded date being actually in the past
when the test runs. This fixes that by fixing the value of utctime when
the test executes to a date in the past relative to the test input.
Change-Id: Iccb57dca5c1130a0e6ca88e9ca387fc218891369
The lease-update command needs to know about all possible keys that can
be passed as reservation parameters. Also treat required_floatingips as
a list, like in commit 9183950833.
Change-Id: Iad95ebf662fb052000f05aa3d76f76308704fd1d
Related-Bug: #1843258
An API request to create a floating IP reservation is expected to pass
the required_floatingips parameter as a list, not as a string. Modify
the CLI to parse required_floatingips as a JSON array so it can be
passed to the API in the right format.
Change-Id: Ia84ceb881f0889266c8f0349a1ffb047597bac2d
Closes-Bug: #1843258
The network_id parameter was not defined in CREATE_RESERVATION_KEYS. As
a result, it could not be parsed by the command-line client.
Change-Id: Icad6533ea32967601cf8d3bd4ccee659bb0b5abd
Closes-Bug: #1840759
When the Blazar CLI client is run without specifying a start date, it
uses the current time on the client machine. If the lease creation
request is sent to the Blazar service just before the end of a minute,
e.g. at 12:34:59, the Blazar manager might only process it during the
next minute (i.e. after 12:35:00). In this case, the manager will reject
the request with:
Start date must be later than current date
This can also be an issue if the clocks on the client and server are not
synchronized closely.
This patch uses the special start date value 'now' which is resolved to
the current time on the server rather than on the client. Note that this
can result in leases that are one minute shorter than what the user
might expect, as the end date is still specified by the client.
It also clarifies help messages for start and end dates.
Change-Id: Ib761d8f4f15e44e28452497f282447472f0cf918
Closes-Bug: #1783296
This patch adds instance reservation update support to the Blazar
command-line client.
Change-Id: I2a5ab7f6d05c0351930f69d894005329ed637dd7
Depends-On: Ibdf7a730ae45ff6d8c17de62b0fc69262df2db79
This patch adds a before_end_date option to the lease-create command. It
also adds a before_end parameter to the physical_reservation option.
Partially Implements: blueprint on-end-options
Depends-On: I90fb90d9d53814791d863f4ce5dab28388d3688d
Change-Id: I2a6f3477509f5b549edbdc25cb2c6ac457c7c100
python-blazarclient does not accept multiple properties when
creating leases. This is because of the wrong regular expression
used for separating given options.
This patch fixs the regular expression and enables the use of
multiple properties in python-blazarclient.
Change-Id: I35dc3cd213e70890abe20c6f17cd4fb90fcb3ea9
Closes-Bug: #1699679
Commit b2fa6bf534 [1] was accessing the
wrong variable, resulting in failures to create leases from the CLI with
the --physical-reservation option.
This patch fixes the error.
[1] https://review.openstack.org/#/c/489033/
Change-Id: I58e753ed1af0d80e5b5e1f9429f2dfea2d14ec07
Closes-Bug: #1708963
python-blazarclient sends all request parameters in the request body as
strings even though the blazar service only accepts integer values for
some parameters.
For instance, the instance reservation feature accepts an integer for
the 'vcpus' parameter, but the blazar client sends a string value for
the parameter with the --reservation vcpus=1 option.
This patch enables the --reservation option to convert integer style
parameters to integer values.
Closes-Bug: #1707552
Change-Id: Ife1124e14adc0183fe5d4680031bc00ca3647ed5
lease-update CLI only accepts time delta to update start_time
or end_time of leases. It's hard for users to specify a specific
date as its argument since users need to caluclate the time delta
between the previous start/end time and the new date.
This patch enables users to update leases with date format
like --end-date "2017-06-05 17:15".
Change-Id: I5044213656a22ffa99d96f3d2f3f92752da1b6e9
There was no validation for min and max arguments, so the following
is added:
1. min and max values must be integers
2. min value must be less than max value
3. min and max values must be greater than 0
4. min and max values must be provided by user
Change-Id: Icef260826d84578875af1345c387395bc80cada6
Closes-Bug: #1404190
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