Skip to content

Instantly share code, notes, and snippets.

@hatchetation
Created April 22, 2014 18:16
Show Gist options
  • Select an option

  • Save hatchetation/11189097 to your computer and use it in GitHub Desktop.

Select an option

Save hatchetation/11189097 to your computer and use it in GitHub Desktop.

Revisions

  1. hatchetation created this gist Apr 22, 2014.
    18 changes: 18 additions & 0 deletions nova-shell.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/usr/bin/env python

    from os import environ
    from IPython import embed
    import pyrax

    if environ['OS_PASSWORD'] and environ['OS_USERNAME']:
    pyrax.set_environment(environ['OS_USERNAME'])
    pyrax.set_credentials(environ['OS_USERNAME'], environ['OS_PASSWORD'])

    cs = pyrax.cloudservers
    servers = cs.list()


    if __name__ == '__main__':
    print "Pyrax client is available in `cs`, servers in `servers`."

    embed()