Created
December 9, 2013 17:08
-
-
Save underscorephil/7876016 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import SoftLayer | |
object_mask = 'mask.provisionDate' | |
client = SoftLayer.Client() | |
cci = client['Virtual_Guest'].getObject(id=12345, mask=object_mask) | |
if ( 'provisionDate' in cci and cci['provisionDate'] != ''): | |
print 'CCI %s is online' % cci['hostname'] | |
else: | |
print 'CCI %s is provisioning' % cci['hostname'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment