Zhmcclient

Latest version: v1.16.2

Safety actively analyzes 640747 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

1.4.0

^^^^^^^^^^^^^

This version contains all fixes up to version 1.3.3.

Released: 2022-08-20

**Incompatible changes:**

* Mocked HMC definitions now require userid and password in the vault file.

* Auto-updated resources now auto-detect if the corresponding HMC resource no
longer exists and accessing the zhmcclient resource in that case with certain
attributes and methods causes a new `zhmcclient.CeasedExistence` exception to
be raised. The documentation shows which attributes and methods do that.

* The zhmcclient/debuginfo.py script has been removed since the instructions using
it only worked when having the repo local, but not when installing from Pypi.
To display debug info, you can now use:
python -c "import zhmcclient; print(zhmcclient.debuginfo())".

**Bug fixes:**

* Pylint: Migrated config file to pylint 2.14; No longer installing Pylint on
Python 2.7; Enabled running Pylint again on Python 3.5, Increased minimum
version of Pylint to 2.10.0 on Python 3.5 and higher.

* Addressed issues discovered by Pylint 2.10 and higher (it was pinned to 2.7.0
before).

* Made the `JMS_LOGGER_NAME` symbol publicly available, in order for users
to have a symbol for the JMS logger name.

* Fixed an AttributeError on 'HMCDefinition.filepath' when using the testutils
support for mocked environments. (issue 1001)

* Fixed the 'dump()' method on the Client class and other resource classes
to accommodate for HBAs on z14 and later, unconfigured FICON adapters, and
presence of unmanaged CPCs.

* Fixed the add_permissions() and remove_permissions() methods of UserRole
by no longer including the 'include-members' and 'view-only-mode' parameters
in the request payload, since the HMC requires them to be omitted unless
the type of permitted resource allows them.

* Fixes in default values for properties in mock support of 'Create Partition'.

* Test: Added tolerance against non-unique storage volume names in HMC 2.14.0
in the storage volume end2end tests. (issue 962)

**Enhancements:**

* Relative path names for mock files specified in the HMC inventory file are
now interpreted relative to the directory of the HMC inventory file.
(part of issue 1001)

* Added optional 'userid' and 'password' arguments to the
'FakedSession.from_hmc_yaml_file()' method and to the methods it calls, in
order to use a userid to log on to the mocked HMC, consistent with real HMCs.
(part of issue 1001)

* Added a dump_hmc_definition.py example script that dumps the resources of
an HMC to a HMC definition file for use as a mock definition.

* Improved mock support for password rules and user roles by creating default
properties. (issue 1018)

* Auto-updated resources now auto-detect if the corresponding HMC resource no
longer exists. This can be tested with a new `ceased_existence` attribute on
the resources. Accessing the zhmcclient resource in that case with certain
attributes and methods causes a new `zhmcclient.CeasedExistence` exception to
be raised. The documentation shows which attributes and methods do that.
(Issue 996)

* Added an example script 'list_cpcs.py' that lists managed CPCs with version,
status, operational mode.

* Improved the mock support for Create Partition by doing more input validation
and by setting all default properties on the new partitions.

* Improved waiting for job of asynchronous operation:
Increased wait time between 'Get Job Properties' operations from 1 second
to 10 seconds to release stress on the HMC. Now logging failures of
'Get Job Properties operation. No longer removing the original message in the
urllib3.exceptions.MaxRetryError exception.

* In Lpar.scsi_load(), added parameters 'os_ipl_token' and 'clear_indicator',
to support the corresponding parameters of the 'SCSI Load' operation. Clarified
the description of parameters of Lpar.scsi_load() and Lpar.scsi_dump().

* Added tests for Lpar.scsi_load() and Lpar.scsi_dump().

* Added mock support for Lpar.scsi_load() and Lpar.scsi_dump(), including tests.

* Added Lpar.nvme_load() and Lpar.nvme_dump() methods, and tests.

* Added mock support for Lpar.nvme_load() and Lpar.nvme_dump(), and tests.

**Cleanup:**

* Removed unintended internal names from the zhmcclient namespace in the area
of logging and timestamp conversion.

1.3.0

^^^^^^^^^^^^^

This version contains all fixes up to version 1.2.2.

Released: 2022-05-17

**Incompatible changes:**

* 'Lpar.list()' with filters that have no matching LPAR now returns an empty
result set, consistent with other zhmcclient 'list()' methods. Previously,
'Lpar.list()' raised HTTPError 404.1 when no LPAR matched the filters.
If you used 'Lpar.list()' with filters, you may need to adjust the handling
of the case where no LPARs match the filter. (issue 954)

* End2end test: Changed the format of files that define the HMCs to test against,
from a zhmcclient-specific HMC definition file in YAML format to a pair of
Ansible-compatible inventory and vault files in YAML format.
The HMC inventory file is '.zhmc_inventory.yaml' in the user's home directory
by default and can be set using the 'TESTINVENTORY' environment variable.
The HMC vault file is '.zhmc_vault.yaml' in the user's home directory
by default and can be set using the 'TESTVAULT' environment variable.
The format of the HMC definition file used so far is no longer supported.
(issues 950, 986)

* Renamed the properties of the 'zhmcclient.testutils.HMCDefinition' to remove
the 'hmc _' prefix, e.g. 'hmc_userid' became 'userid', etc. (part of issue 986)

**Bug fixes:**

* Added the missing `secure_boot` parameter to `zhmcclient.Lpar.scsi_dump()`
(issue 945)

* Fixed the handling of JMS notifications that have no content, such as the
job completion notification and the inventory change notification.
(issue 956)

* End2end test: Made user test tolerant against missing password rule 'Basic'.
(issue 960)

* End2end test: Added CPC property 'last-energy-advice-time' to the list of
volatile CPC properties in 'test_cpc_find_list()'.

**Enhancements:**

* Docs: Added documentation for the 'zhmcclient.testutils' module to the
"Development" chapter. (issue 950)

* Docs: Improved and fixed the "Testing" section in the "Development" chapter.
(issue 950)

* Added a new function 'zhmcclient.testutils.hmc_definitions()' that
can be used by example scripts to access HMC definitions.

* Examples: Simplified and cleaned up the example scripts. They now use
the HMC inventory and vault files. Deleted scripts that were too complex and
not particularly instructive (cpcdata.py, cpcinfo.py). Renamed some scripts
for better clarity on what they do. (issue 953)

* End2end test: Added env.var 'TESTRESOURCES' that can be used to control
which resources are picked for testing with. By default, a random choice
from all resources is picked. (issue 963)

* Added support for z16 in Python property 'Cpc.maximum_active_partitions'.

* Improved description of 'Cpc.maximum_active_partitions' to better
clarify the difference between DPM partitions and classic mode LPARs.

* Removed optional empty fields in the exported DPM configuration data returned
by 'Cpc.export_dpm_configuration()'. This allows using newer versions of
zhmcclient that added support for new features with older machines that did
not yet have the feature. (issue 988)

**Cleanup:**

* Made the handling of 'Lpar.list()' with filters that have no matching LPAR
consistent with other zhmcclient 'list()' methods that return an empty
result set in such cases. Previously, 'Lpar.list()' raised HTTPError 404.1
when no LPAR matched the filters. (issue 954)

* Removed the unused 'FakedHMCFileError' class from the
'zhmcclient.testutils.hmc_definition_fixtures' module. (issue 950)

* Removed code in tests/common/utils.py that supported the old format for
defining HMCs. (issue 966)

* Transitioned test code for the old format for defining HMCs to the new
format, and removed some test code. (issue 966)

* End2end test: Removed CPC scope from test functions for HMC-based resources
(e.g. users)

1.2.0

^^^^^^^^^^^^^

This version contains all fixes up to version 1.1.1.

Released: 2022-03-28

**Incompatible changes:**

* The installation of this package using `setup.py install` is no longer
recommended. Use `pip install` instead.

* The "timestamp" init parameter of "FakedMetricObjectValues" now gets
converted to a timezone-aware datetime object using the local timezone, if
provided as timezone-naive datetime object. This may be incompatible for
users of the zhmcclient mock support if the mock support is used in testcases
that have expected timestamps.

* Mock support for metrics: The representation of metric group definitions has
been moved from the FakedMetricsContextManager class to the FakedHmc class,
where they are now predefined and no longer need to be added by the user of
the mock support. As a result, the add_metric_group_definition() method
has been dropped. The get_metric_group_definition() and
get_metric_group_definition_names() methods have also been dropped and
the predefined metric groups can now be accessed via a new property
FakedHmc.metric_groups that provides an immutable view.

* Mock support for metrics: The representation of metric values has
been moved from the FakedMetricsContextManager class to the FakedHmc class.
The add_metric_values() method has been moved accordingly. The
get_metric_values() and get_metric_values_group_names() methods have been
dropped and the metric values can now be accessed via a new property
FakedHmc.metric_values that provides an immutable view.

**Bug fixes:**

* Fixed an issue that delete() of element objects e.g. NICs, HBAs, VFs,
storage volumes, storage template volumes) did not update the uris list in
the local properties of its parent object.

* Fixed the issue that 'StorageVolumeTemplate.delete()' provided an incorrect
field in the request to the HMC. (issue 900)

* Fixed the issue that resource types with case-insensitive names were matched
case-sensitively in find..() and list() methods. This affected resource
types User, UserRole, UserPattern, PasswordRule, and LDAPServerDefinition.
The mock support was also fixed accordingly. This required adding 'nocasedict'
as a new package dependency. (issue 894)

* Fixed issues in the zhmcclient_mock support for the "Update LPAR Properties"
operation. (issue 909)

* Doc fix: Added the missing classes "FakedMetricGroupDefinition",
"FakedMetricObjectValues", "FakedCapacityGroupManager", and "FakedCapacityGroup"
to section "Mock support" and fixed errors in doc links to some of these
classes.

* Mock support: Fixes for storage groups and added support for storage volumes.

* Mock support: Fixed that operations on activation profiles succeed with an
empty result set in case the CPC is in DPM mode, instead of failing.

* Mock support: Fixed a follow-on error in repr() when FakedAdapter() raised
InputError.

* Mock support: Fixed list of properties returned by the "List Adapters of CPC"
operation.

* Fixed that the "timestamp" init parameter of "FakedMetricObjectValues" gets
converted to a timezone-aware datetime object using the local timezone, if
provided as a timezone-naive datetime object.

* Fixed installation of pywinpty (used by Jupyter notebook) on Python >=3.6,
by pinning it to <1.0.

**Enhancements:**

* Added support for Python 3.10. This required increasing the minimum version of
a number of packages, both for installation and development. (issue 867)

* End2end tests: Added support for verify_cert parameter in HMC definition file.
Changed test env var TESTHMCDIR with hard coded filename to TESTHMCFILE.

* Added support for activating and deactivating a CPC in classic mode, by
adding Cpc.activate() and Cpc.deactivate().

* Added support for saving real and faked HMCs to HMC definitions, via new
methods to_hmc_yaml_file(), to_hmc_yaml() and to_hmc_dict() on the 'Client'
class.
Added support for restoring faked HMCs from HMC definitions, via new methods
from_hmc_yaml_file(), from_hmc_yaml() and from_hmc_dict() on the
'FakedSession' class.
This required adding the following Python packages as dependencies:
PyYAML, yamlloader, jsonschema, dateutil.

* Mock support: Added checks for non-modifiable properties in Update operations
and for defaulting properties in Create operations.

* Docs: Improved example on README page and in Introduction section of the
documentation to be much faster.

* Fixed that some content of request exceptions was lost when re-raising them
as zhmcclient exceptions. (issue 845)

**Cleanup:**

* Removed the ability to build the Windows executable, triggered by the fact
that the corresponding build command has been removed in Python 3.10.
The Windows executable has never been part of the zhmcclient package on Pypi,
and building it seems odd anyway. (issue 865)

1.1.0

^^^^^^^^^^^^^

This version contains all fixes up to version 1.0.3.

Released: 2021-11-18

**Bug fixes:**

* Fixed maturity level from 4 (Beta) to 5 (Production/Stable).

* Fixed an issue in 'Lpar.stop()' where incorrectly an empty body was sent, and
an incorrect status has been waited for.

* Fixed a TypeError in 'Partition.mount_iso_image()'. (issue 833)

* Fixed install error of wrapt 1.13.0 on Python 2.7 on Windows due to lack of
MS Visual C++ 9.0 on GitHub Actions, by pinning it to <1.13.

* Fixed Sphinx doc build error on Python 2.7.

* Docs: Fixed description of Client.get_inventory().

* Dev: Excluded more-itertools 8.11.0 on Python 3.5.

**Enhancements:**

* Added support for the 'Set Auto-Start List' operation on CPCs by adding
a method 'Cpc.set_auto_start_list()', and the corresponding mock support.
(issue 472)

* Improved the log entries when file-like objects are passed to
'Partition.mount_iso_image()'.

* Changed the 'User-Agent' header sent with each HTTP request to show
'python-zhmcclient/<version>'.

* Added support for 'Cpc.import_dpm_configuration()'. (issue 851)

* Added support for 'Cpc.export_dpm_configuration()'.

* Added a new exception class 'ConsistencyError' that indicates consistency
errors that should be reported.

* Added a new example script examples/export_dpm_config.py.

**Cleanup:**

* Defined HMC resource class names centrally.

1.0.0

^^^^^^^^^^^^^

This version contains all fixes up to version 0.32.1.

Released: 2021-08-05

**Incompatible changes:**

* Dropped support for Python 3.4. Python 3.4 has had its last release as 3.4.10
on March 18, 2019 and has officially reached its end of life as of that date.
Current Linux distributions no longer support Python 3.4. (issue 792)

**Bug fixes:**

* Fixed an install error of lazy-object-proxy on Python 3.5 by no longer
installing pylint/astroid/typed-ast/lazy-object-proxy on Python 3.5. It
was already not invoked anymore on Python 3.5, but still installed.

* Increased minimum version of Pylint to 2.5.2 on Python 3.6 and higher.

* Fixed a bug where 'Console.list_permitted_partitions()' and
'Console.list_permitted_lpars()' when run on HMC/SE version 2.14.0 failed
when accessing the 'se-version' property of the partition unconditionally.
That property was introduced only in HMC/SE version 2.14.1. (issue 816)

**Enhancements:**

* Made read and write access to the properties dictionary of zhmcclient resource
objects thread-safe by adding a Python threading.RLock on each resource object.

* Added support for auto-updating of resources. For details, see the new
section 'Concepts -> Auto-updating of resources'. (issue 762)

**Cleanup:**

* Removed old build tools that were needed on Travis and Appveyor
(remove_duplicate_setuptools.py and retry.bat) (issue 809)

0.32.0

^^^^^^^^^^^^^^

This version contains all fixes up to version 0.31.1.

Released: 2021-07-02

**Bug fixes:**

* Docs: Fixed and added missing authorization requirements for the Partition
and Lpar methods.

* Examples: Fixed errors in and improved metrics examples.

* Fixed issues raised by new Pylint version 2.9.1.

**Enhancements:**

* Added support for 'Console.list_permitted_partitions()' and
'Console.list_permitted_lpars()'. These methods require HMC 2.14.0 or later.
(issue 793)

* The Console object returned by 'client.consoles.console' is now a locally
built object in order to avoid needless property retrieval.

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.