Last active
August 29, 2015 14:03
-
-
Save ryumei/ab0cf154d13d6adb02f3 to your computer and use it in GitHub Desktop.
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
# Get number of virtual servers via SLAPI | |
import SoftLayer | |
client = SoftLayer.Client() | |
for user in client['Account'].getUsers(mask='id,username'): | |
count1 = client['User_Customer'].getVirtualGuestCount(id=user['id']) | |
vss = client['User_Customer'].getVirtualGuests(id=user['id'], mask='id') | |
count2 = len(vss) | |
print("user_id:%d username:%s, # of vs: %d/%d, vs: %s" | |
% (user['id'], user['username'], count1, count2, vss)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in https://forums.softlayer.com/forum/softlayer-developer-network/implementations/81673-getvirtualguestcount-vs-length-of-getvirtualguests
I expected
for LIMITED_USER.