Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from oslo_config import cfg
- from watcher.common.nova import NovaClient
- from watcher.common.keystone import KeystoneClient
- from watcher.metrics_engine.cluster_model_collector.nova import \
- NovaClusterModelCollector
- cfg.CONF.keystone_authtoken.auth_uri = "http://10.50.0.108:5000/v3/"
- cfg.CONF.keystone_authtoken.admin_user = "admin"
- cfg.CONF.keystone_authtoken.admin_password = "openstacktest"
- cfg.CONF.keystone_authtoken.admin_tenant_name = "admin"
- cfg.CONF.keystone_authtoken.auth_version = "v3"
- cfg.CONF.debug = True
- keystone = KeystoneClient()
- session = keystone.get_session()
- print(session.auth.get_token(session=session))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement