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 responseTimeout profile property for z/OSMF operations #334

Open
pjfarleyiii opened this issue Sep 12, 2024 · 3 comments
Open

Support responseTimeout profile property for z/OSMF operations #334

pjfarleyiii opened this issue Sep 12, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request priority-medium

Comments

@pjfarleyiii
Copy link

pjfarleyiii commented Sep 12, 2024

The connection function only supports specific user name and password input and no way to use a secure profile name.

Provide either a new argument to the connection function or a new "profile_connect" function to connect to the remote system using a config.json profile with secure user credentials.

In the SDK documentation there does not seem to be any way to use a loaded profile to connect to the remote system.

The specific reason for this request is to allow the responseTimeout configuration parameter to govern how long the SDK functions wait for a response from the z/OS system since none of the SDK functions are documented to allow a timeout parameter to be supplied.

@pjfarleyiii pjfarleyiii added the enhancement New feature or request label Sep 12, 2024
@github-project-automation github-project-automation bot moved this to New Issues in Zowe CLI Squad Sep 12, 2024
Copy link

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@zowe-robot zowe-robot moved this from New Issues to Medium Priority in Zowe CLI Squad Sep 18, 2024
@t1m0thyj t1m0thyj changed the title Add a way to use a secure profile to connect to the remote z/OS system Support responseTimeout profile property for z/OSMF operations Sep 21, 2024
@t1m0thyj
Copy link
Member

t1m0thyj commented Sep 21, 2024

Followed up on Zowe Discord:

There is a pre-release version of the Zowe Python SDK available on PyPI that can load connection info from V2 profiles in team config files. If you want to load secure properties like user/password that are stored in the OS keyring you'll also want to install the Secrets SDK.

To install these pre-release versions you need to pass the --pre flag to pip: pip install -U --pre zowe-python-sdk-bundle zowe.secrets_for_zowe_sdk

Here's a sample Python script that loads the default z/OSMF profile from zowe.config.json and uploads a local file to USS on the mainframe:

from zowe.core_for_zowe_sdk import ProfileManager
from zowe.zos_files_for_zowe_sdk import USSFiles

profile = ProfileManager().load(profile_name="zosmf")
uss_api = USSFiles(profile)
uss_api.upload("local.txt", "/u/users/ibmuser/remote.txt")

You are correct that the responseTimeout flag in zosmf profiles is not yet supported by the Python SDK. Thanks for filing an issue, we've added this enhancement request to our backlog 🙂

@aadityasinha-dotcom
Copy link
Contributor

Assign this issue to me ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium
Projects
Status: Medium Priority
Development

No branches or pull requests

4 participants