Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created December 9, 2013 17:08
Show Gist options
  • Save underscorephil/7876016 to your computer and use it in GitHub Desktop.
Save underscorephil/7876016 to your computer and use it in GitHub Desktop.
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