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
import SoftLayer | |
from pprint import pprint as pp | |
apiUsername = '' | |
apiKey = '' | |
def getImageTemplateId(templateName): | |
client = SoftLayer.Client(username=apiUsername, api_key=apiKey) | |
templates = client['Account'].getBlockDeviceTemplateGroups() | |
for template in templates: |
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
require 'rubygems' | |
require 'softlayer_api' | |
$SL_API_USERNAME = "" # enter your username here | |
$SL_API_KEY = "" | |
virtual_guest_service = SoftLayer::Service.new("SoftLayer_Virtual_Guest") | |
begin | |
templateObject = { |
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
import SoftLayer.API | |
from pprint import pprint as pp | |
apiUsername = '' | |
apiKey = '' | |
passwordClient = SoftLayer.API.Client( | |
'SoftLayer_Software_Component_Password', None, apiUsername, apiKey) | |
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
import SoftLayer | |
from SoftLayer import utils | |
import sys | |
import pprint | |
import logging | |
apiUsername = '' | |
apiKey = '' | |
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
# So we can talk to the SoftLayer API, grab the current date | |
# and structured list/dict output | |
import SoftLayer.API | |
import datetime | |
from pprint import pprint as pp | |
# Find the priceId for the RAM item matching our defined memory allotment | |
def getMemoryPrice(memoryCapacity): | |
packageClient = SoftLayer.API.Client('SoftLayer_Product_Package', 46, apiUsername, apiKey) |
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
# Create SoftLayer End-Customer Account on Brand Account | |
# Use at your own risk | |
import SoftLayer | |
from pprint import pprint as pp | |
import json | |
import SoftLayer.API | |
# DIST MASTER ACCOUNT API INFORMATION (NOT SUB-BRAND) | |
username = "CHANGE_ME" #change me |
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
<?php | |
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php'); | |
$apiUser = ''; | |
$apiKey = ''; | |
$serverId = ; | |
$serverClient = SoftLayer_SoapClient::getClient('SoftLayer_Hardware_Server', $serverId, $apiUser, $apiKey); | |
try { |
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
#!/usr/bin/env python | |
import SoftLayer.API | |
from pprint import pprint as pp | |
api_username = '' | |
api_key = '' | |
client = SoftLayer.Client( | |
username=api_username, |
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
<?php | |
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php'); | |
$apiUsername = ''; | |
$apiKey = ''; | |
$accountClient = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey); | |
$mask = "mask[billingItem[recurringFee, id, orderItem[description, order[userRecord[id, username], id]]]]"; |
NewerOlder