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"
},
If you create a
zowe.config.jsonlike 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:
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:
And: