^^^^^^^^^^^^^^
Released: 2017-09-20
**Incompatible changes:**
* The zhmcclient mock support for Partitions no longer allows to stop a
partition when it is in status 'degraded' or 'reservation-error'.
That is consistent with the real HMC as described in the HMC API book.
* In the `HTTPError` exception class, `args[0]` was set to the `body` argument,
i.e. to the entore response body. Because by convention, `args[0]` should be
a human readable message, this has been changed to now set `args[0]` to the
'message' field in the response body, or to `None` if not present.
**Bug fixes:**
* Fixed the bug that aborting a confirmation question in the CLI (e.g. for
"zhmc partition delete") caused an AttributeError to be raised. It now
prints "Aborted!" and in interactive mode, terminates only the current
command. (issue 418).
* Fixed an AttributeError when calling 'zhmc vfunction update'.
Access to a partition from nic and vfunction is done via the respective
manager (issue 416).
* In the zhmc CLI, fixed that creating a new session reused an existing
session. This prevented switching between userids on the same HMC
(issue 422).
* Docs: In the "Introduction" chapter of the documentation, fixed the HMC API
version shown for z14.
* Docs: In the Appendix of the documentation, added IBM book number and link
for the HMC API book of z14.
**Enhancements:**
* Avoided `DeprecationWarning` on Python 3 for invalid escape sequences
in some places.
* The zhmcclient mock support for various resource classes did not always
check for invalid CPC status and for invalid Partition status as
described in the HMC API book. It now does.
* In the mock support, invalid input to faked resource classes (mainly when
adding faked resources) is now handled by raising a new exception
``zhmcclient_mock.InputError`` (instead of ``ValueError``). The URI
handler of the mock support now converts that into an HTTP error 400
(Bad Request), consistent with the HMC API book.
* Added ``datetime_from_timestamp()`` and ``datetime_from_timestamp()``
functions that convert between Python ``datetime`` objects and HMC timestamp
numbers.
* Added mock support for Metrics resources.
* Added a ``verify`` argument to ``Session.logoff()``, consistent with
``Session.logon()``. This was needed as part of fixing issue 422.
* Added a `__repr__()` function to the `Session` class, for debug purposes.
* In the `ParseError` exception class, a message of `None` is now tolerated,
for consistency with the other zhmcclient exception classes.
* In the `NotFound` exception class, a `filter_args` parameter of `None` is now
tolerated, for consistency with the `NoUniqueMatch` exception class.
* Documented for the zhmcclient exception classes how `args[0]` is set.
* Clarified in the documentation that the `manager` and `resources` parameters
of the `NoUniqueMatch` and `NotFound` exception classes must not be `None`.
* Improved the unit test cases for the `Client` class and for the zhmcclient
exception classes, and migrated them to py.test.
* Migrated the unit tests for HBAs from unittest to py.test, and
improved the test cases.
* In the `Hba.reassign_port()` method, updated the `Hba` object with the
changed port, consistent with other update situations.
* Clarified in the description of `HbaManager.list()` that only the
'element-uri' property is returned and can be used for filtering.
* The mock support for the "Create NIC" operation now performs more
checking on the URIs specified in the 'network-adapter-port' or
'virtual-switch-uri' input properties, raising HTTP status 404 (Not Found)
as specified in the HMC API book.
* In the ``FakedNic.add()`` method of the mock support, the checking for the
URIs specified in the 'network-adapter-port' or 'virtual-switch-uri' input
properties was relaxed to only the minimum, in order to make the setting
up of faked resources easier.
* Migrated the unit tests for ``Nic`` and ``NicManager`` from unittest to
py.test, and improved them.
* Improved the way the named tuples ``MetricGroupDefinition`` and
``MetricDefinition`` are documented.
* Added support for ``Console`` resource and its child resources ``User``,
``User Role``, ``User Pattern``, ``Password Rule``, ``Task``, and
``LDAP Server Definition``, both for the zhmcclient API and for the
zhmcclient mock support.
* As part of support for the ``Console`` resource, added a new resource class
``UnmanagedCpc`` which representd unmanaged CPCs that have been discovered by
the HMC. The existing ``Cpc`` class continues to represent only managed CPCs;
this has been clarified in the documentation.
* As part of support for the ``Console`` resource, added a method
``wait_for_available()`` to the ``Client`` class, which waits until the HMC
is available again after a restart. This method is used by
``Console.restart()``, but it can also be used by zhmcclient users.
* As part of support for the ``Console`` resource, improved ``Session.post()``
to allow for an empty response body when the operation returns with HTTP
status 202 (Accepted). This status code so far was always assumed to indicate
that an asynchronous job had been started, but it can happen in some
``Console`` operations as well.
* Improved the error information in the ``ParseError`` exception, by adding
the "Content-Type" header in cases where that is interesting.
* Add CLI commmands to mount and unmount an ISO to a Partition.