zhmcclient / zhmccli Goto Github PK
View Code? Open in Web Editor NEWA CLI for the IBM Z HMC
License: Apache License 2.0
A CLI for the IBM Z HMC
License: Apache License 2.0
Add support for all types of Activation Profiles and CPC profile import/export functionality supported in zhmcclient 0.28.
New command group and commands for reset activation profiles:
resetprofile list CPC
- List the reset activation profiles in a CPCresetprofile show CPC PROFILE
- Show the details of a reset activation profileresetprofile update CPC PROFILE
- Update properties of a reset activation profileNew command group and commands for image activation profiles:
imageprofile list CPC
- List the image activation profiles in a CPCimageprofile show CPC PROFILE
- Show the details of an image activation profileimageprofile update CPC PROFILE
- Update properties of an image activation profileNew command group and commands for load activation profiles:
loadprofile list CPC
- List the load activation profiles in a CPCloadprofile show CPC PROFILE
- Show the details of a load activation profileloadprofile update CPC PROFILE
- Update properties of a load activation profileNew commands for CPCs:
cpc import-profiles CPC
- Import activation and system activity profiles from SE hard drivecpc export-profiles CPC
- Export activation and system activity profiles to SE hard driveCopied from zhmcclient/python-zhmcclient#260:
There is a number of properties for DPM partitions that are supported for partition creation and for partition updating by the HMC version 2.13.1, and also at the zhmcclient API, but are not yet supported by the zhmc CLI and its "partition create" and "partition update" commands.
TODO: Determine list of properties that are still missing.
Start the CLI, press TAB, get a python exception.
~$ zhmc -h $hmc_host -u $hmc_userid
Enter 'help' for help, <CTRL-D> or ':q' to exit.
Unhandled exception in event loop:
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/eventloop/posix.py", line 154, in _run_task
t()
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/eventloop/context.py", line 115, in new_func
return func(*a, **kw)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/application/application.py", line 376, in redraw
self._redraw()
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/application/application.py", line 444, in _redraw
self.renderer.render(self, self.layout)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/renderer.py", line 578, in render
screen.draw_all_floats()
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/screen.py", line 232, in draw_all_floats
functions[0][1]()
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 700, in _draw_float
width = fl.content.preferred_width(write_position.width).preferred
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 2173, in preferred_width
return self.content.preferred_width(max_available_width)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 1339, in preferred_width
dont_extend=self.dont_extend_width())
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 1380, in _merge_dimensions
preferred = get_preferred()
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 1328, in preferred_content_width
max_available_width - total_margin_width)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/menus.py", line 46, in preferred_width
menu_meta_width = self._get_menu_meta_width(500, complete_state)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/menus.py", line 110, in _get_menu_meta_width
if self._show_meta(complete_state):
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/menus.py", line 94, in _show_meta
return any(c.display_meta_text for c in complete_state.completions)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/menus.py", line 94, in <genexpr>
return any(c.display_meta_text for c in complete_state.completions)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/completion/base.py", line 92, in display_meta_text
return fragment_list_to_text(self.display_meta)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/completion/base.py", line 86, in display_meta
return to_formatted_text(self._display_meta)
File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/formatted_text/base.py", line 50, in to_formatted_text
'HTML, ANSI or a FormattedText instance. Got %r' % value)
Exception No formatted text. Expecting a unicode object, HTML, ANSI or a FormattedText instance. Got 'Hostname or IP address of the HMC (Default: ZHMC_HOST environment variable).'
Press ENTER to continue...
Get a list of available commands.
Copied from zhmcclient/python-zhmcclient#426 (opened by simon-spinner):
There is no way to set properties of a resource to null (at least that I am aware of):
nic update --vlan-id '' SSPSE test-ssc nic
--> Error: Invalid value for "--vlan-id": is not a valid integer
nic update --vlan-id SSPSE test-ssc nic1
--> Error: Invalid value for "--vlan-id": SSPSE is not a valid integer
nic update --vlan-id null SSPSE test-ssc nic1
--> Error: Invalid value for "--vlan-id": null is not a valid integer
Certain fields in the DPM API allow for null values (e.g., the field vlan-id of a SSC management nic). If this field contains a value, it can be cleared by explicitly sending a JSON null value (see SPEC at http://www.json.org/) in an update request. There should be a way to specify null values in zhmc for such fields.
Add support for managing crypto attachments (incl. zeroize) of a partition (DPM mode) (This is supported by zhmcclient 0.28)
New commands for partitions for managing the assignment of crypto adapters:
partition list-crypto-adapters CPC PARTITION
- List crypto adapters of a partitionpartition add-crypto-adapters CPC PARTITION
- Add crypto adapters to a partitionpartition remove-crypto-adapters CPC PARTITION
- Remove crypto adapters from a partitionNew commands for partitions for managing the assignment of crypto domains:
partition list-crypto-domains CPC PARTITION
- List crypto domains of a partitionpartition add-crypto-domains CPC PARTITION
- Assign crypto domains to a partitionpartition remove-crypto-domains CPC PARTITION
- Remove crypto domains from a partitionpartition update-crypto-domains CPC PARTITION
- Update access mode of crypto domains of a partitionNote, the following has been moved out into separate issues:
partition zeroize-crypto-domains CPC PARTITION
- Zeroize crypto domains of a partition - issue #502Currently zhmccli is tested and marked as supported up to Python 3.6
Add Python 3.7
Add a stable branch for the latest stable version, and update the release documentation in development.rst to support that.
This issue describes what functionality is currently missing in the zhmccli project, compared to the functionality supported by zhmcclient 0.28.0.
DISCUSSION: Prioritize the items and assign to releases.
When functionality is added, update this description and add the issue / PR links.
Missing resource types:
Missing functionality on existing resource types:
Add support for changing the adapter type for FICON adapters (DPM mode). (This is supported by zhmcclient 0.28)
Update the functionality of the existing adapter update CPC ADAPTER
command to change the 'type' property by calling zhmcclient.Adapter.change_adapter_type()
.
The zhmc CLI needs to add command groups to support the storage management feature.
This issue proposes an initial set of functionality, which covers most of what is supported by zhmcclient 0.28. See issue #54 for the overall roadmap to add functionality, which also lists the remaining functionality.
New command group and commands for storage groups:
storagegroup create
- Create a storage groupstoragegroup list
- List the storage groupsstoragegroup show SG
- Show the details of a storage groupstoragegroup delete SG
- Delete a storage groupstoragegroup update SG
- Update properties of a storage groupstoragegroup list-partitions SG
- List the partitions to which a storage group is attachedstoragegroup list-ports SG
- List the candidate adapter ports of a storage groupstoragegroup add-ports SG
- Add storage adapter ports to the candidate adapter ports of a storage groupstoragegroup remove-ports SG
- Remove storage adapter ports from the candidate adapter ports of a storage groupstoragegroup discover-fcp SG
- Perform LUN discovery for an FCP storage groupNew commands for partitions:
partition list-storagegroups CPC PARTITION
- List the storage groups attached to a partitionpartition attach-storagegroup CPC PARTITION
- Attach a storage group to a partitionpartition detach-storagegroup CPC PARTITION
- Detach a storage group from a partitionNew command group and commands for storage volumes:
storagevolume create SG
- Create a storage volume in a storage groupstoragevolume list SG
- List the storage volumes in a storage groupstoragevolume show SG SV
- Show the details of a storage volumestoragevolume delete SG SV
- Delete a storage volumestoragevolume update SG SV
- Update properties of a storage volumestoragevolume fulfill-fcp SG SV
- Indicate fulfillment for a FCP boot volumeNew command group and commands for virtual storage resources:
vstorageresource list SG
- List the virtual storage resources in a storage groupvstorageresource show SG VSR
- Show the details of a virtual storage resourcevstorageresource update SG VSR
- update properties of a virtual storage resourceFlake8 3.5.0 (released on 2017-10-23) introduces new checks:
These new checks cause zhmccli to fail in the following places:
zhmccli/_helper.py:578:9: E722 do not use bare except'
zhmccli/zhmccli.py:92:22: E741 ambiguous variable name 'l'
No flake8 failures reported.
Add support for an HMC/console-level command group and commands.
New console command group and commands:
console show
- Show details of the HMCconsole get-audit-log
- Get the audit log entries of the HMC as a log fileconsole get-security-log
- Get the security log entries of the HMC as a log fileconsole list-unmanaged-cpcs
- List the unmanaged CPCs of the HMC - DONE in PR #374console make-primary
- Change the role of the HMC to become the primary HMCconsole restart
- Restart the HMCconsole shutdown
- Shut down and power off the HMCAdd support for validating a LUN path from a CPC. (This is supported by zhmcclient 0.28)
New commands for CPCs:
cpc validate-lun-path CPC
- Validate a LUN pathCopied from zhmcclient/python-zhmcclient#176 (opened by leopoldjuergen):
(demo) vagrant@vagrant-ubuntu-trusty-64:~$ zhmc -h ZHMC_IP -u ZHMC_USER
> cpc list
-Enter password (for user pedebug at HMC ZHMC_IP):
|+----------+------------------+
| name | status |
|----------+------------------|
| P000TEST | service-required |
+----------+------------------+
> cpc list
Enter password (for user pedebug at HMC ZHMC_IP):
Password should be provided once.
Copied from zhmcclient/python-zhmcclient#179 (opened by scheuran):
Show the partition details of an Partition that has at least 2 NICs attached:
zhmc partition show
The zhmccli does not do any line breaks. This gets very ugly when the *uri fields (list of URIs).
As there's no line break, the terminal breaks the line - which does not look nice at all!
Ideally the zhmccli would make a line break after each uri list item.
Since today, the zhmc
command on my MacOS fails as follows:
(zhmc27) Andreass-MacBook-Pro-2:zhmccli maiera$ zhmc --version
Traceback (most recent call last):
File "/Users/maiera/virtualenvs/zhmc27/bin/zhmc", line 6, in <module>
from zhmccli.zhmccli import cli
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/__init__.py", line 17, in <module>
from ._cmd_info import * # noqa: F401
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/_cmd_info.py", line 20, in <module>
from .zhmccli import cli
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/zhmccli.py", line 29, in <module>
from ._helper import CmdContext, GENERAL_OPTIONS_METAVAR, REPL_HISTORY_FILE, \
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/_helper.py", line 32, in <module>
import pyreadline as readline # noqa: F401
Looking at the code, the pyreadline
package is supposed to be used only on Windows, and that part of the code was reached because the readline
package failed to import.
Importing the readline
package fails as follows:
ImportError: No module named pyreadline
(zhmc27) Andreass-MacBook-Pro-2:zhmccli maiera$ python -c "import readline"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: dlopen(/Users/maiera/virtualenvs/zhmc27/lib/python2.7/lib-dynload/readline.so, 2): Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
Referenced from: /Users/maiera/virtualenvs/zhmc27/lib/python2.7/lib-dynload/readline.so
Reason: image not found
On my system, this directory contains version 8 of the readline DLL, but not version 7 that is expected by the Python readline
package:
(zhmc27) Andreass-MacBook-Pro-2:zhmccli maiera$ ls -l /usr/local/opt/readline/lib/
-r--r--r-- 1 maiera staff 40396 Feb 11 14:18 libhistory.8.0.dylib
lrwxr-xr-x 1 maiera staff 20 Dec 19 22:07 libhistory.8.dylib -> libhistory.8.0.dylib
-r--r--r-- 1 maiera staff 45880 Dec 19 22:07 libhistory.a
lrwxr-xr-x 1 maiera staff 20 Dec 19 22:07 libhistory.dylib -> libhistory.8.0.dylib
-rw-r--r-- 1 maiera staff 239252 Feb 11 14:18 libreadline.8.0.dylib
lrwxr-xr-x 1 maiera staff 21 Dec 19 22:07 libreadline.8.dylib -> libreadline.8.0.dylib
-r--r--r-- 1 maiera staff 405848 Dec 19 22:07 libreadline.a
lrwxr-xr-x 1 maiera staff 21 Dec 19 22:07 libreadline.dylib -> libreadline.8.0.dylib
drwxr-xr-x 3 maiera staff 96 Feb 11 14:18 pkgconfig
Homebrew knows that it has a version 8 of its readline
package installed, but does not know about a version 7.
It is not clear what caused this to fail, but presumably something changed in the system that caused this.
zhmc --version
)Add support for managing temporary capacity of a CPC, as supported in zhmcclient 0.28.
New command group and commands for storage groups:
cpc add-capacity CPC
- Add temporary CPU capacitycpc remove-capacity CPC
- Remove temporary CPU capacityRight now, the list
commands often show the properties that are returned by the corresponding List HMC operations. This is not always helpful, for example the URIs are not helpful and other important properties are missing.
This issue is about adjusting the set of properties shown. This includes adjusting some of the options that control the properties shown.
The test function test_option_logdest()
when invoked with logdest_value='syslog'
fails with the following exception when attempting to write a log message:
Traceback (most recent call last):
File "/opt/python/3.5.5/lib/python3.5/logging/handlers.py", line 924, in emit
self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor
This happens only on the Travis CI (currently using Ubuntu 14.04) and only with Python 3.5 and 3.6. An example Travis build that fails with this error, is here: https://travis-ci.org/zhmcclient/zhmccli/builds/354989881
It does not happen on the Travis CI with Python 2.7 or 3.4, and it does not happen on the Appveyor CI (using CygWin) with Python 2.7 and 3.6.
On a local Ubuntu 16.04, the error does not happen with Python 3.6.
Should work.
Add support for changing the crypto type for crypto adapters (DPM mode). (This is supported by zhmcclient 0.28)
Update the functionality of the existing adapter update CPC ADAPTER
command to change the 'crypto-type' property by calling zhmcclient.Adapter.change_crypto_type()
.
Recently, the test started failing with assertions related to logging. See https://travis-ci.org/zhmcclient/zhmccli/jobs/353936182#L1183
Add support for showing a storage connection report of a storage group. (This is supported by zhmcclient 0.28)
New commands for CPCs:
storagegroup show-connections SG
- Show storage connection reportAdd support for listing the assigned NICs of a virtual switch (DPM mode). (This is supported by zhmcclient 0.28 via VirtualSwitch.get_connected_nics()
)
New commands for CPCs:
vswitch list-nics CPC VSWITCH
- List the connected NICs of a virtual switchUpdate: This should be generalized across all types of NICs (vswitch-based and adapter-based, which probably means one would list the NICs of an adapter.
Currently it is only possible to dump a LPAR that are not in the DPM mode. You can do it with "lpar load..." For partition option is it not available. On the HMC GUI is it possible.
Dump also a DPM system.
Add support for PSW restart of a partition (DPM mode). (This is supported by zhmcclient 0.28)
New commands for partitions:
partition psw-restart CPC PARTITION
- PST restart of a partitionAdd support for the resources StorageGroupTemplate and StorageVolumeTemplate (which are supported in zhmcclient).
New command group and commands for storage group templates:
storagegrouptemplate create
- Create a storage group templatestoragegrouptemplate list
- List the storage group templatesstoragegrouptemplate show SGT
- Show the details of a storage group templatestoragegrouptemplate delete SGT
- Delete a storage group templatestoragegrouptemplate update SGT
- Update properties of a storage group templateNew command group and commands for storage volume templates:
storagevolumetemplate create SGT
- Create a storage volume template in a storage group templatestoragevolumetemplate list SGT
- List the storage volume templates in a storage group templatestoragevolumetemplate show SGT SVT
- Show the details of a storage volume templatestoragevolumetemplate delete SGT SVT
- Delete a storage volume templatestoragevolumetemplate update SGT SVT
- Update properties of a storage volume templateCopied from zhmcclient/python-zhmcclient#170 (opened by leopoldjuergen):
The command should return the pending JMS messages and return immediately . If the option -f (--follow) is added JMS messages should be added until the user terminates it with CTRL-C.
Add support for reassigning ports of HBAs (DPM mode, z13 and earlier). (This is supported by zhmcclient 0.28)
New commands for CPCs:
hba reassign-port CPC PARTITION HBA
- Reassign a port of an HBACopied from zhmcclient/python-zhmcclient#308 (opened by leopoldjuergen):
$ zhmc cpc list
+----------+------------------+
| name | status |
|----------+------------------|
| P000S67B | service-required |
+----------+------------------+
$ zhmc partition console P000S67B UbuntuDemo2
Enter password (for user pedebug at HMC 9.152.151.49):
No password request
Copied from zhmcclient/python-zhmcclient#115, and reduced to only the open items:
The zhmc CLI does not support a number of resources that are supported by the underlying zhmcclient library:
Have support for these resources in the zhmc CLI.
Most resources have some URI-like properties. The current show
commands simply show these properties as URI values. This is not very useful, since resources are identified by name in the zhmc universe.
This issue proposes to add artificial properties with the resource names. For example, when a partition object has an array property named nic-uris
, it would get an artificial property nic-names
that has the corresponding (index-corelated) names of these NICs.
The zhmc command invokes several zhmcclient functions with wait_for_completion=True
. Here is a source code grep:
zhmccli/_cmd_lpar.py: lpar.activate(wait_for_completion=True, **options)
zhmccli/_cmd_lpar.py: lpar.deactivate(wait_for_completion=True, **options)
zhmccli/_cmd_lpar.py: lpar.load(load_address, wait_for_completion=True, **options)
zhmccli/_cmd_lpar.py: lpar.stop(wait_for_completion=True, **options)
zhmccli/_cmd_lpar.py: lpar.psw_restart(wait_for_completion=True, **options)
zhmccli/_cmd_lpar.py: lpar.scsi_load(load_address, wwpn, lun, wait_for_completion=True,
zhmccli/_cmd_lpar.py: lpar.scsi_dump(load_address, wwpn, lun, wait_for_completion=True,
zhmccli/_cmd_partition.py: partition.start(wait_for_completion=True)
zhmccli/_cmd_partition.py: partition.stop(wait_for_completion=True)
zhmccli/_cmd_partition.py: parameters=op_properties, wait_for_completion=True,
zhmccli/_cmd_partition.py: parameters=properties, wait_for_completion=True,
zhmccli/_cmd_storagegroup.py: force_restart=force_restart, wait_for_completion=True)
In all those cases, the zhmccli code does not specify the operation_timeout
parameter. Not specifying it causes the retry/timeout config of the zhmcclient.Session object to be used, which in zhmccli currently cannot be influenced by the user and uses the default retry/timeout config of the zhmcclient package which defines the operation timeout to be 3600s.
In addition, if such a command gets an operation timeout despite its long timeout, that only caues the zhmc command to no longer wait for completion; the associated asynchronous job keeps on running on the HMC and could succeed or fail.
Currently, zhmc does not provide a means to list or manage such asynchronous jobs on the HMC.
Here are possible improvements:
--operation-timeout
that would allow specifying a non-default operation timeout.Add support for user-related command groups. They are all supported in zhmcclient.
New commands for users: - DONE in PR #245
user create
- Create a useruser list
- List the usersuser show USER
- Show the details of a useruser delete USER
- Delete a useruser update USER
- Update properties of a useruser add-role USER
- Add a user role to a useruser remove-role USER
- Remove a user role from a userNew commands for user patterns:
userpattern create
- Create a user patternuserpattern list
- List the user patternsuserpattern show PATTERN
- Show the details of a user patternuserpattern delete PATTERN
- Delete a user patternuserpattern update PATTERN
- Update properties of a user patternNew commands for user roles: - DONE in PR #245
userrole create
- Create a user roleuserrole list
- List the user rolesuserrole show ROLE
- Show the details of a user roleuserrole delete ROLE
- Delete a user roleuserrole update ROLE
- Update properties of a user roleuserrole add-permission ROLE
- Add a task or object permission to a user roleuserrole remove-permission ROLE
- Remove a task or object permission from a user roleNew commands for password rules:
passwordrule create
- Create a password rulepasswordrule list
- List the password rulespasswordrule show RULE
- Show the details of a password rulepasswordrule delete RULE
- Delete a password rulepasswordrule update RULE
- Update properties of a password ruleNew commands for LDAP Server Definitions:
ldapserver create
- Create an LDAP server definitionldapserver list
- List the LDAP server definitionsldapserver show SERVER
- Show the details of an LDAP server definitionldapserver delete SERVER
- Delete an LDAP server definitionldapserver update SERVER
- Update properties of an LDAP server definitionNew commands for Tasks:
task list
- List the taskstask show TASK
- Show the details of a taskCopied from zhmcclient/python-zhmcclient#399.
In the interactive mode of the zhmc CLI, it would be beneficial to have the ability to set a standard CPC.
Add support for start/stop of a CPC. (This is supported by zhmcclient 0.28)
New commands for CPCs:
cpc start CPC
- Start a CPCcpc stop CPC
- Stop a CPCExample:
$ zhmc hba list CPCA MGMT1 --names-only --uri
Traceback (most recent call last):
File "/Users/maiera/virtualenvs/zhmc38/bin/zhmc", line 33, in <module>
sys.exit(load_entry_point('zhmccli', 'console_scripts', 'zhmc')())
File "/Users/maiera/virtualenvs/zhmc38/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/maiera/virtualenvs/zhmc38/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/maiera/virtualenvs/zhmc38/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/maiera/virtualenvs/zhmc38/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/maiera/virtualenvs/zhmc38/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/maiera/virtualenvs/zhmc38/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/maiera/virtualenvs/zhmc38/lib/python3.8/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/_cmd_hba.py", line 67, in hba_list
cmd_ctx.execute_cmd(lambda: cmd_hba_list(cmd_ctx, cpc, partition, options))
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/_helper.py", line 265, in execute_cmd
cmd()
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/_cmd_hba.py", line 67, in <lambda>
cmd_ctx.execute_cmd(lambda: cmd_hba_list(cmd_ctx, cpc, partition, options))
File "/Users/maiera/Projects/zhmcclient/repos/zhmccli/zhmccli/_cmd_hba.py", line 167, in cmd_hba_list
hbas = partition.hbas.list()
AttributeError: 'NoneType' object has no attribute 'list'
Add support for reset-clear command for LPARs (classic mode).
This is supported by zhmcclient 0.28 in Lpar.reset_clear()
.
Add new commands for LPARs:
lpar reset-clear CPC LPAR
- Reset an LPAR with clearing of pending interruptions, channel subsystem, and processorsFor details, see zhmcclient/python-zhmcclient#594
Add support for listing the associated storage groups of a CPC. (This is supported by zhmcclient 0.28)
New commands for CPCs:
cpc list-storagegroups CPC
- List the associated storage groups of a CPCMost of the time, the docs talk about ZHMC_USER
and ZHMC_HOST
but on few occasions about hmc_userid
and hmc_host
. I'm not sure if it is a bug, it only confused me a little.
The examples work if you read them carefully, but a bit more consistency might be helpful.
NOTE: This report is about the naming, and not about the upper-case/lower-case difference.
.. code-block:: text
$ hmc_host="<IP address or hostname of the HMC>"
$ hmc_userid="<userid on that HMC>"
$ zhmc -h $hmc_host -u $hmc_userid cpc list
Enter password (for user <hmc_user> at HMC <hmc_host>): .......
+----------+------------------+
| name | status |
|----------+------------------|
| P000S67B | service-required |
+----------+------------------+
.. code-block:: text
$ zhmc_host="<IP address or hostname of the HMC>"
$ zhmc_user="<userid on that HMC>"
$ zhmc -h $zhmc_host -u $zhmc_user cpc list
Enter password (for user <zhmc_user> at HMC <zhmc_host>): .......
+----------+------------------+
| name | status |
|----------+------------------|
| P000S67B | service-required |
+----------+------------------+
Add support for firmware features at the CPC & partition levels, as supported by zhmcclient 0.28.0.
New commands for CPCs:
cpc list-features CPC
- List the features of a CPCNew commands for partitions:
partition list-features CPC PARTITION
- List the features of a partitionCopied from zhmcclient/python-zhmcclient#402:
When creating a NIC, the zhmc CLI currently requires the use of the --adapter
and --port
options for ROCE adapters, and the use of the --virtual-switch
option for OSA and Hipersockets adapters.
Determining the name of the correct virtual switch is cumbersome because (without a naming convention that allows identifying the adapter) the CLI user has to list all virtual switches and needs to show each of them until the one with the desired backing adapter is found. An additional complexity is that the backing adapter is shown in the virtual switch properties only with its URI, so the user needs to compare URIs in this process.
In the zhmc-ansible project, we have eliminated the virtual switch from the configuration input parameters, and both ROCE and OSA/HS adapters can be configured by specifying adapter name and port index.
It is suggested to implement a similar approach also for the CLI, i.e. to add support for using the --adapter
and --port
options also for OSA and Hipersockets adapters.
For backwards compatibility, we should continue supporting the --virtual-switch
option for OSA and Hipersockets adapters. Specifying both the old and new options should be rejected.
The current option help messages specify defaults "manually" in the help text, sometimes with duplicating the default value, sometimes with constants that are used for both the default value and the message, and sometimes the default is not a value but a specific text, such as for example "Default: auto-generated" in the help text of the "hba create" option "--device-number".
The Click package provides a means to automatically add the default value to the help message, by specifying option show_default=True
(see https://click.palletsprojects.com/en/7.x/api/#click.Option). Using this approach adds the text [default: {default}]
to the specified help text, consistent with adding [required]
if the option is required.
If we use this Click ability, then those default values that are not showing the value specified with default
(such as the hba create example shownn above) probably also should be manually adjusted to that output format, for consistency.
Copied from zhmcclient/python-zhmcclient#114.
The zhmc CLI has no automated test concept.
Have an automated test environment for the zhmc CLI.
Currently zhmccli is tested and marked as supported up to Python 3.6
Add support for Python 3.8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.