Skip to content

Instantly share code, notes, and snippets.

# So we can talk to the SoftLayer API:
import SoftLayer
# For nice debug output:
from pprint import pprint as pp
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
api_username = ''
# So we can talk to the SoftLayer API:
import SoftLayer
# For nice debug output:
from pprint import pprint as pp
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
apiUsername = ''
import SoftLayer
from pprint import pprint as pp
client = SoftLayer.Client(username=apiUsername, api_key=apiKey)
mask = {
'hardware': {
'datacenter': {},
'privateIpAddress': {},
'primaryNetworkComponent': {
import SoftLayer
from pprint import pprint as pp
api_username = ''
api_key = ''
guestId = 1234
hostname = 'host1'
domain_name = 'example.com'
operating_system = 'CENTOS_5_64'
import SoftLayer.API
from pprint import pprint as pp
api_username = ''
api_key = ''
image_template_name = ''
guestId = 1234
hostname = 'host1'
domain_name = 'example.com'
#!/usr/bin/env python
def ticket_iter(client, start_date, end_date):
mask = """
mask[
id,
billableFlag,
createDate,
groupId,
import SoftLayer.API
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(username=apiUsername, api_key=apiKey)
def updatePassword(server):
import SoftLayer.API
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
passwordClient = SoftLayer.API.Client(
'SoftLayer_Software_Component_Password', None, apiUsername, apiKey)
# So we can talk to the SoftLayer API:
import SoftLayer
# For nice debug output:
from pprint import pprint as pp
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
apiUsername = ''
# So we can talk to the SoftLayer API:
import SoftLayer.API
# For nice debug output:
from pprint import pprint as pp
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
apiUsername =