Skip to content

Instantly share code, notes, and snippets.

@jamielennox
Created December 21, 2016 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamielennox/c3d202bbe8e97fd9f9f62916606be2b7 to your computer and use it in GitHub Desktop.
Save jamielennox/c3d202bbe8e97fd9f9f62916606be2b7 to your computer and use it in GitHub Desktop.
[mynewauth]
auth_type=password
auth_url=https://keystone.test.com
username=user
password=pass
project_name=proj
default_domain_name=domain
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