-
Notifications
You must be signed in to change notification settings - Fork 28
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
Load profile properties from environment variables #136
Comments
Hey there @t1m0thyj. Just for clarification purposes for this issue. Is the idea here to load the Environment variables from a user provided, local |
For the below discussion I'll be taking this code as reference: # (This is what I got from the readme, Doesn't works)
# from zowe.zos_core_for_zowe_sdk import ProfileManager
# This one works
from zowe.core_for_zowe_sdk import ProfileManager
from zowe.zos_console_for_zowe_sdk import Console
# Creates a dictionary object (example)
# {'host': 'globalhost', 'rejectUnauthorized': True, 'user': 'bhavuk', 'password': 'bh', 'port': 443}
profile = ProfileManager(appname="Give user config name here").load(profile_type="zosmf")
my_console = Console(profile) Question 1 - The import that is mentioned in the readme in the from zowe.zos_core_for_zowe_sdk import ProfileManager Doesn't work, I replaced it with something that does. ( Question 2 - I have now clearly understood on how the configs are getting inputed. I have a few clarifying questions on how the above feature is supposed to look like Example 1 - Create a function profile = ProfileManager(appname="Give user config name here").load_from_env_file("ENV_FILE_PATH_HERE)")
Example 2 - More Info on |
Environment variables take priority over values defined in the config |
Environment variables have |
When loading a profile from team config, have an opt-in flag to support loading of properties from environment variables.
For example, in an environment where I don't want to store credentials securely, the user and password properties should be loaded from
ZOWE_OPT_USER
andZOWE_OPT_PASSWORD
respectively.The text was updated successfully, but these errors were encountered: