^^^^^^^^^^^^^^
Released: 2017-03-16
**Incompatible changes:**
* Changed the return value of all methods on resource classes that invoke
asynchronous operations (i.e. all methods that have a `wait_for_completion`
parameter), as follows:
- For `wait_for_completion=True`, the JSON object in the 'job-results' field
is now returned, or `None` if not present (i.e. no result data).
Previously, the complete response was returned as a JSON object.
- For `wait_for_completion=False`, a new `Job` object is now returned that
allows checking and waiting for completion directly on the `Job` object.
Previously, the whole response of the 'Query Job Status' operation was
returned as a JSON object, and the job completion was checked on the
`Session` object, and one could not wait for completion.
* Changed the default value of the `wait_for_completion` parameter of the
`Session.post()` method from `True` to `False`, in order to avoid
superfluos timestats entries. This method is not normally used by
users of the zhmcclient package.
* Removed the version strings from the ``args[]`` property of the
``zhmcclient.VersionError`` exception class. They had been available as
``args[1]`` and ``args[2]``. ``args[0]`` continues to be the error message,
and the ``min_api_version`` and ``api_version`` properties continue to
provide the version strings.
* Changed the names of the Python loggers as follows:
1. Logger 'zhmcclient.api' logs API calls made by the user of the package,
at log level DEBUG. Internal calls to API functions are no longer logged.
2. Logger 'zhmcclient.hmc' logs HMC operations. Their log level has been
changed from INFO to DEBUG.
* Removed the log calls for the HMC request ID.
**Bug fixes:**
* Added a minimum version requirement `>=4.0.0` for the dependency on the
"decorate" Python package (issue 199).
* Increased minimum version of "click-spinner" package to 0.1.7, in order to
pick up the fix for zhmcclient issue 116.
* Fixed CLI help text for multiple commands, where the text was incorrectly
flowed into a paragraph.
**Enhancements:**
* Added support for retry/timeout configuration of HTTP sessions, via
a new ``RetryTimeoutConfig`` class that can be specified for the ``Session``
object. The retry/timeout configuration can specify:
- HTTP connect timeout and number of retries.
- HTTP read timeout (of HTTP responses), and number of retries.
- Maximum number of HTTP redirects.
* Added new exceptions ``zhmcclient.ConnectTimeout`` (for HTTP connect
timeout), ``zhmcclient.ResponseReadTimeout`` (for HTTP response read
timeout), and ``zhmcclient.RequestRetriesExceeded`` (for HTTP request retry
exceeded). They are all derived from ``zhmcclient.ConnectionError``.
* Fixed a discrepancy between documentation and actual behavior of the return
value of all methods on resource classes that invoke asynchronous operations
(i.e. all methods that have a `wait_for_completion` parameter). See also
the corresponding incompatible change (issue 178).
* In the CLI, added a 'help' command that displays help for interactive mode,
and a one-line hint that explains how to get help and how to exit
interactive mode (issue 197).
* In the CLI, added support for command history. The history is stored in
the file `~/.zhmc_history`.
* In the CLI, changed the prompt of the interactive mode to ``zhmc>``.
* Added support for tolerating HTML content in the response, instead of JSON.
An HTML formatted error message may be in the response for some 4xx and
5xx HTTP status codes (e.g. when the WS API is disabled). Such responses
are raised as ``HTTPError`` exceptions with an artificial reason code of 999.
* Fixed an incorrect use of the ``zhmcclient.AuthError`` exception and
unnecessary checking of HMC behavior, i.e. when the HMC fails with "API
session token expired" for an operation that does not require logon. This
error should never be returned for operations that do not require logon. If
it would be returned, it is now handled in the same way as when the operation
does require logon, i.e. by a re-logon.
* Added support for deferred status polling to the
`Lpar.activate/deactivate/load()` methods. The HMC operations issued by these
methods exhibit "deferred status" behavior, which means that it takes a few
seconds after successful completion of the asynchronous job that executes the
operation, until the new status can be observed in the 'status' property of
the LPAR resource. These methods will poll the LPAR status until the desired
status value is reached. A status timeout can be specified via a new
`status_timeout` parameter to these methods, which defaults to 60 seconds.
If the timeout expires, a new `StatusTimeout` exception is raised
(issue 191).
* Added operation timeout support to `Session.post()` and to all resource
methods with a `wait_for_completion` parameter (i.e. the asynchronous
methods). The operation timeout on the asynchronous methods can be specified
via a new `operation_timeout` parameter, which defaults to 3600 seconds.
If the timeout expires, a new `OperationTimeout` exception is raised
(issue 6).
* Added a new module that defines public constants, and that defines
default timeout and retry values.
* Experimental: In the CLI, added more supported table formats (plain,
simple, psql, rst, mediawiki, html, LaTeX).
* Improved the content of the log messages for logged API calls and HMC
operations to now contain the function call arguments and return values (for
API calls) and the HTTP request and response details (for HMC operations).
For HMC operations and API calls that contain the HMC password, the password
is hidden in the log message by replacing it with a few '*' characters.