Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from keystoneauth1 import session
- from keystoneauth1.extras.kerberos import MappedKerberos
- from novaclient import client
- auth = MappedKerberos(auth_url=os.environ.get('OS_AUTH_URL'),
- project_id=os.environ.get('OS_PROJECT_ID'),
- project_domain_id=os.environ.get('OS_PROJECT_DOMAIN_ID'),
- identity_provider=os.environ.get('OS_IDENTITY_PROVIDER'),
- protocol=os.environ.get('OS_PROTOCOL'),
- mutual_auth=os.environ.get('OS_MUTUAL_AUTH'))
- sess = session.Session(auth=auth)
- nova = client.Client('2', session=sess)
- nova.servers.list()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement