Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for session logon/logoff commands and for named sessions #685

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ $(done_dir)/ruff_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_$(pymn)_$(PA
check_reqs: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done minimum-constraints-develop.txt minimum-constraints-install.txt requirements.txt
@echo "Makefile: Checking missing dependencies of this package"
pip-missing-reqs $(package_name) --requirements-file=requirements.txt
pip-missing-reqs $(package_name) --requirements-file=minimum-constraints-install.txt
# TODO-ZHMC: Enable again, once released version is available
# pip-missing-reqs $(package_name) --requirements-file=minimum-constraints-install.txt
@echo "Makefile: Done checking missing dependencies of this package"
ifeq ($(PLATFORM),Windows_native)
# Reason for skipping on Windows is https://github.com/r1chardj0n3s/pip-check-reqs/issues/67
Expand Down
7 changes: 7 additions & 0 deletions changes/544.2.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Added support for creating multiple named sessions with a new global option
'-s' / '--session-name'. It is optional and defaults to the name 'default'.
This option can be used with 'zhmc session logon/logoff' to create or delete a
named session, and with any other zhmc command to use a session that has
previously been created. The 'zhmc session create/delete' commands do not
support named sessions, because the environment variables that are used to
store the session data support only a single session.
3 changes: 3 additions & 0 deletions changes/544.2.incompatible.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The 'zhmc session create' command now creates a new session without logging off
from an existing session. Previously, it logged off from an existing session
and then created a new session.
4 changes: 4 additions & 0 deletions changes/544.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The 'zhmc session create/delete' commands are now deprecated. They were
inconvenient to use and did not support Windows out of the box since they
displayed the export/unset commands to manage the session. Use the new
'zhmc session logon/logoff' commands instead.
6 changes: 6 additions & 0 deletions changes/544.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
New 'zhmc session logon/logoff' commands are provided. They manage the session
in a '.zhmc_sessions.yaml' file in the user's home directory. This is more
convenient for users compared to the existing 'zhmc session create/delete'
commands which store the session in environment variables and display the
export/unset commands to do that. The new commands also support Windows out
of the box.
5 changes: 5 additions & 0 deletions changes/544.incompatible.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
If logon options and ZHMC_* environment variables are both provided, the
logon options now take precedence, and the environment variables are ignored.
As a result, a provided ZHMC_SESSION_ID variable is now ignored when logon
options are also provided. Previously, a provided ZHMC_SESSION_ID variable was
used when logon options were also provided.
3 changes: 2 additions & 1 deletion minimum-constraints-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ wheel==0.41.3

# Direct dependencies for install (must be consistent with requirements.txt)

zhmcclient==1.18.0
# TODO-ZHMC: Switch to released version again, once available
# zhmcclient==1.19.0

click==8.0.2
click-repl==0.2
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

# Direct dependencies for install (must be consistent with minimum-constraints-install.txt)

# zhmcclient @ git+https://github.com/zhmcclient/python-zhmcclient.git@master
zhmcclient>=1.18.0
# TODO-ZHMC: Switch to released version again, once available
zhmcclient @ git+https://github.com/zhmcclient/python-zhmcclient.git@master
# zhmcclient>=1.19.0

# safety 2.2.0 depends on click>=8.0.2
click>=8.0.2
Expand Down
Loading
Loading