Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created December 9, 2013 17:14
Show Gist options
  • Save underscorephil/7876124 to your computer and use it in GitHub Desktop.
Save underscorephil/7876124 to your computer and use it in GitHub Desktop.
from SoftLayer import CCIManager, Client
api_username = ''
api_key = ''
object_mask = 'mask.provisionDate'
client = Client(
username=api_username,
api_key=api_key
)
manager = CCIManager(client)
cci = manager.get_instance(1234)
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