Skip to content

Instantly share code, notes, and snippets.

@Kami
Created August 7, 2014 15:04
Show Gist options
  • Select an option

  • Save Kami/3380c7ee00d5614b1f7a to your computer and use it in GitHub Desktop.

Select an option

Save Kami/3380c7ee00d5614b1f7a to your computer and use it in GitHub Desktop.
Authenticating against Keystone API v3 using Libcloud
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
cls = get_driver(Provider.OPENSTACK)
driver = cls('username', 'password',
ex_force_auth_version='3.x_password',
ex_force_auth_url='http://<controller ip>:5000',
ex_force_service_name='nova',
ex_force_service_region='regionOne',
ex_tenant_name='mytenant')
print(driver.list_nodes())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment