Skip to content

danielmellado/osclients

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSClients

Collection of OpenStack client helpers

In order to help and ease the process of using OpenStack credentials and clients with ipython or any python interpreter, this library allows you to call them directly using the environment variables from keystonerc files.

Usage

First, we'll have to export the needed variables to the environment, using the keystonerc file from the OpenStack installation

$ source keystonerc

That file should be close to this example

export OS_USERNAME =
export OS_TENANT_NAME =
export OS_PASSWORD =
export OS_AUTH_URL =
export PS1 = '[\u@\h \W(keystone_admin)]\$ '

After this just log into your Python interpreter:

$ ipython

import the module

import osclients

Now we can just call the clients directly, without having to bother to authenticate manually for each one of them:

nc = osclients.get_neutron_client()
networks = nc.list_networks()

Development

Want to contribute? Great! Feel free to fork or add comments / PR !

About

Collection of OpenStack client helpers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages