Skip to content

Instantly share code, notes, and snippets.

@chmouel
Created March 17, 2011 12:05
Show Gist options
  • Save chmouel/874215 to your computer and use it in GitHub Desktop.
Save chmouel/874215 to your computer and use it in GitHub Desktop.
rebout cloudservers
"""
Reboot server by ID
Requirement: python-cloudservers library from
https://github.com/chmouel/python-cloudservers
"""
import cloudservers
# Server ID to shut-down
SERVER_ID = 10010547
USERNAME = "USERNAME"
API_KEY = "API_KEY"
AUTH_URL = "https://lon.auth.api.rackspacecloud.com/v1.0"
cnx = cloudservers.CloudServers(USERNAME, API_KEY, auth_url=AUTH_URL)
server = cnx.servers.get(SERVER_ID)
server.reboot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment