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
<?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> |
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
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(); |
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 = '' | |
client = SoftLayer.Client( | |
username=apiUsername, | |
api_key=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.API | |
from pprint import pprint as pp | |
api_username = '' | |
api_key = '' | |
client = SoftLayer.Client( | |
username=api_username, | |
api_key=api_key, | |
) |
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 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() |
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 | |
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 |
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: | |
import SoftLayer.API | |
# For nice debug output: | |
from pprint import pprint as pp | |
def create_user(username): | |
password = 'SL<3sKL!' | |
user_template = { | |
'username': 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
#!/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. |
NewerOlder