View create_account.py
# 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
View get_updates_with_filter.soap
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://api.service.softlayer.com/soap/v3/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<ns1:authenticate>
<username>arst</username>
View get_updates_with_filter.php
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php');
$apiUser = '';
$key = '';
$startDate = new DateTime('2015-06-21T08:42:56-06:00');
$accountClient = SoftLayer_SoapClient::getClient('SoftLayer_Ticket', 19899621, $apiUser, $key);
$filter = new stdClass();
$filter->updates = new stdClass();
View get_spare_pool.py
import SoftLayer.API
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(
username=apiUsername,
api_key=apiKey,
)
View get_v6_address.py
import SoftLayer.API
from pprint import pprint as pp
api_username = ''
api_key = ''
client = SoftLayer.Client(
username=api_username,
api_key=api_key,
)
View metadata_example.py
import urllib2
from pprint import pprint as pp
response = urllib2.urlopen('https://api.service.softlayer.com/rest/v3/SoftLayer_Resource_Metadata/getUserMetadata')
metadata = response.read()
f = open('my.conf', 'w')
f.write(metadata)
f.close()
View create_brand.py
import SoftLayer
import json
import SoftLayer.API
from pprint import pprint as pp
# DIST MASTER ACCOUNT API INFORMATION
username = "CHANGE_ME" #change me
apiKey = "CHANGE_ME" #change me
# New Sub-brand
View get_ipmi_info.py
import SoftLayer
from SoftLayer import utils
import sys
import pprint
import logging
apiUsername = ''
apiKey = ''
View create_users.py
# So we can talk to the SoftLayer API:
import SoftLayer.API
# For nice debug output:
from pprint import pprint as pp
def create_user(username):
password = 'SL<3sKL!'
user_template = {
'username': username,
View tunnel.sh
#!/bin/bash
# Set me to your SSH server hostname or IP
host="example.com"
# Enable the Proxy location and open a tunnel if needed
if [ "$1" = "on" ]
then
# Check if there is an existing SSH connection...we don't want to go making
# unnecessary ones.