Created
July 11, 2012 17:29
-
-
Save nicholaskuechler/3091886 to your computer and use it in GitHub Desktop.
rackspace cloudservers - list host machines a cloud server is running on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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.name, s.hostId) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment