zowe / zowe/zowe-client-python-sdk
Missing Base Profile Warning for Python SDK but not Zowe CLI
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44
- Forks
- 38
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 1
Description
If you create a zowe.config.json like this (with valid values for host/user/passwor):
{
"$schema": "./zowe.schema.json",
"profiles": {
"sys1": {
"type": "zosmf",
"properties": {
"port": 1443,
"host": "sys1.mainframe.net",
"user": "ibmuser",
"password": "ibmpass"
},
"secure": []
}
},
"defaults": {
"zosmf": "sys1"
},
"autoStore": true
}
Then run python code such as:
from zowe.zos_jobs_for_zowe_sdk import Jobs
from zowe.core_for_zowe_sdk import ProfileManager
profile = ProfileManager().load(profile_type="zosmf")
jobs = Jobs(profile)
jobs_list = jobs.list_jobs()
for job in jobs_list:
print(f"jobid: {job.jobid} is: {job.status}")
You get a warning like ProfileParsingWarning: "Given profile type 'base' has no default profile name" warnings.warn(
However, this same profile does not produce a warning for Zowe CLI. As a workaround you can add:
"base": {
"type": "base"
}
And:
"defaults": {
"zosmf": "sys1",
"base": "base"
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ProfileManager().load(profile_type="zosmf") and the ProfileParsingWarning shown in the report; use the provided configuration and compare its behavior with Zowe CLI. Done means a valid configuration with a zosmf default no longer emits the unexpected base-profile warning, while the existing SDK job-listing example still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100