Created
July 24, 2012 15:29
-
-
Save nicholaskuechler/3170669 to your computer and use it in GitHub Desktop.
Slicehost - list slice bandwidth in / bandwidth out
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
from pyactiveresource.activeresource import ActiveResource | |
api_password = 'YOUR_API_KEY_GOES_HERE' | |
api_site = 'https://%s@api.slicehost.com/' % api_password | |
class Slice(ActiveResource): | |
_site = api_site | |
class Zone(ActiveResource): | |
_site = api_site | |
class Record(ActiveResource): | |
_site = api_site | |
slices = Slice.find() | |
for slice in slices: | |
print "ID: %d name: %s B/W In: %s B/W Out: %s" % (slice.id, slice.name, slice.bw_in, slice.bw_out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment