Skip to content

Instantly share code, notes, and snippets.

@underscorephil
underscorephil / order_dedicated_flex_image.py
Last active October 13, 2015 16:48
Order dedicated server from a Flex Image
# 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
# 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
@underscorephil
underscorephil / gist:4271461
Last active October 13, 2015 23:18
SoftLayer_Virtual_Guest::createObject - PHP
<?php
require_once('softlayer-api-php-client/SoftLayer/SoapClient.class.php');
$apiUsername = '';
$apiKey = '';
$client = Softlayer_SoapClient::getClient('SoftLayer_Virtual_Guest', null, $apiUsername, $apiKey);
try {
$templateObject = new stdClass();
$templateObject->hostname = 'test1';
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 = {
import SoftLayer
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(username=apiUsername, api_key=apiKey)
records = [
{
#!/usr/bin perl
use warnings;
use strict;
use Data::Dumper;
use SoftLayer::API::SOAP;
my $api_username = '';
my $api_key = '';
my $cPanelIp = '127.0.0.1';
<?php
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php');
$apiUser = '';
$apiKey = '';
$serverId = ;
$serverClient = SoftLayer_SoapClient::getClient('SoftLayer_Hardware_Server', $serverId, $apiUser, $apiKey);
try {
<?php
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php');
$apiUser = '';
$apiKey = '';
$cciId = ; // ID of the cloud instance
$loadBalancerId = ; // ID of the VIP
// Create the needed API interfaces
# 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 =
# 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 = ''