Skip to content

Instantly share code, notes, and snippets.

Created July 11, 2012 17:29
What would you like to do?
rackspace cloudservers - list host machines a cloud server is running on
list cloud servers and their physical host
import cloudservers
USERNAME = "your_username_here"
API_KEY = "your_api_key_here"
cloudservers = cloudservers.CloudServers(USERNAME, API_KEY)
servers = cloudservers.servers.list()
for s in servers:
print "Server: %-30s ==> Host: %-40s" % (, s.hostId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment