-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for logon/logoff and named sessions
TODOs: * Add end2end testcases for the new 'session logon/logoff' commands Details: * Added new 'zhmc session logon/logoff' commands that manage the session in a file '.zhmc_sessions.yaml' in the user's home directory. * Deprecated the existing 'zhmc session create/delete' commands since they are less convenient to use compared to the new logon/logoff commands, and cannot be used as intended on Windows due to the displayed export/unset commands. * Added a general option '-s' / '--session-name' for specifying the name of the session that is managed in the '.zhmc_sessions.yaml' file. This allows having multiple sessions to different HMCs open at the same time, and selecting them by name. If not specified, the session name is 'default'. * The 'session delete' command was changed to unset all ZHMC_* environment variables, instead of just ZHMC_SESSION_ID. * If logon options and ZHMC_* environment variables are both specified, the logon options now have precedence and none of the ZHMC_* environment variables is used (except ZHMC_PASSWORD). This changes the earlier behavior where ZHMC_SESSION_ID was used even when logon options were specified. * The existing testcases for sessions were adjusted for the new behavior. * Added function testcases for the new _session_file.py module. * The end2end testcases for the _cmd_sessions.py module were extended with new testcases. Signed-off-by: Andreas Maier <[email protected]>
- Loading branch information
1 parent
b70aed0
commit 3403ba8
Showing
14 changed files
with
2,075 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.