existing configuration data is read from a json/yaml file by zhmc
zhmc turns that configuration into a dictionary object
zhmc sets the values for the preserve-uris and preserve-wwpns fields in said dict object
the dict object is passed to the zhmcclient library call, which in turn uses the dict as request body for the actual WSAPI endpoint
Past tooling allowed the user to include the to preservation fields directly in the configuration data file; or had the import tool add the fields before passing to the WSAPI endpoint.
The current implementation of zhmc cpc dpm-import doesn't allow for that; as the CLI code will always set the preserve fields (either with True or False); thus overwriting any existing field content originating in the configuration file itself.
Expected behavior
Either: document the current behavior explicitly in the CLI help
Or: improve the CLI implementation to not necessarily overwrite flags already present in the configuration file.
In addition to this, the import command should also provide more information about the configuration that gets applied, to minimize the risk of using it with unwanted configurations.
Describe the bug
Importing a DPM configuration happens as follows:
zhmc
zhmc
turns that configuration into a dictionary objectzhmc
sets the values for thepreserve-uris
andpreserve-wwpns
fields in said dict objectPast tooling allowed the user to include the to preservation fields directly in the configuration data file; or had the import tool add the fields before passing to the WSAPI endpoint.
The current implementation of
zhmc cpc dpm-import
doesn't allow for that; as the CLI code will always set the preserve fields (either with True or False); thus overwriting any existing field content originating in the configuration file itself.Expected behavior
Either: document the current behavior explicitly in the CLI help
Or: improve the CLI implementation to not necessarily overwrite flags already present in the configuration file.
In addition to this, the import command should also provide more information about the configuration that gets applied, to minimize the risk of using it with unwanted configurations.
Environment information
zhmc, version 1.10.1 zhmcclient, version 1.14.0