Created
December 21, 2016 03:03
-
-
Save jamielennox/c3d202bbe8e97fd9f9f62916606be2b7 to your computer and use it in GitHub Desktop.
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
[mynewauth] | |
auth_type=password | |
auth_url=https://keystone.test.com | |
username=user | |
password=pass | |
project_name=proj | |
default_domain_name=domain |
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
from keystoneauth1 import loading | |
from oslo_config import cfg | |
GROUP = 'mynewauth' | |
CONF = cfg.CONF | |
loading.register_session_conf_options(CONF, GROUP) | |
loading.register_auth_conf_options(CONF, GROUP) | |
CONF([], 'test', default_config_files=['keystoneauth-oslo-config.ini']) | |
def main(): | |
auth = loading.load_auth_from_conf_options(CONF, GROUP) | |
session = loading.load_session_from_conf_options(CONF, GROUP, auth=auth) | |
# call client = Client(session) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment