zhmcclient / python-zhmcclient

A pure Python client library for the IBM Z HMC Web Services API
Apache License 2.0
39 stars 26 forks source link

Mock support returns properties that are not independent of internal state #1583

Closed andy-maier closed 4 months ago

andy-maier commented 4 months ago

The zhmcclient mock support returns properties that are not independent of the internal state. For non-mutable property value types that is not a problem, but if a property is a dict or list, that is a problem, because subsequent changes of the internal object state are immediately visible to a user that retrieved the object's properties previously.

This flaw was discovered as part of the PR for https://github.com/zhmcclient/zhmc-ansible-modules/issues/716