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 | |
require_once('SoftLayer/SoapClient.class.php'); | |
/** | |
* Set your SoftLayer API username and key. | |
*/ | |
$apiUsername = 'USER HERE'; | |
$apiKey = 'KEY HERE'; |
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 | |
require_once('SoftLayer/SoapClient.class.php'); | |
function updateDns() { | |
$apiUsername = 'USER HERE'; | |
$apiKey = 'KEY HERE'; | |
$domainId = 'DOMAIN ID HERE'; | |
$dnsClient = SoftLayer_SoapClient::getClient('SoftLayer_Dns_Domain', $domainId, $apiUsername, $apiKey); | |
$recordClient = SoftLayer_SoapClient::getClient('SoftLayer_Dns_Domain_ResourceRecord', null , $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
<?php | |
require_once('SoftLayer/SoapClient.class.php'); | |
/** | |
* Set your SoftLayer API username and key. | |
*/ | |
$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
#!/usr/bin perl | |
use warnings; | |
use strict; | |
use SoftLayer::API::SOAP; | |
# Set SLAPI User and Key | |
my $api_username = ''; | |
my $api_key = ''; | |
# ID of LoadBalancer to poll |
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 | |
import ipaddr | |
def splitIpCidrNotation(arg): | |
ipv4 = ipaddr.IPv4Network(arg) | |
return str(ipv4.ip), str(ipv4.netmask) | |
def getClients(user, 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
# So we can talk to the SoftLayer API: | |
import SoftLayer.API | |
import argparse | |
# Your SoftLayer API username and key. | |
# | |
# Generate an API key at the SoftLayer Customer Portal: | |
# https://manage.softlayer.com/Administrative/apiKeychain | |
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 a network monitor | |
# So we can talk to the SoftLayer API: | |
import SoftLayer.API | |
# For nice debug output: | |
import pprint | |
pp = pprint.PrettyPrinter(indent=4) | |
# Your SoftLayer API username and 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
<?php | |
require_once dirname(__FILE__) . '/SoftLayer/SoapClient.class.php'; | |
/** | |
* Your SoftLayer API username. | |
* | |
* @var string | |
*/ | |
$apiUsername = '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 | |
/** | |
* Retrieve graphs for specific metrics for a single server. | |
* | |
* This example shows how to use the SoftLayer API to retrieve graphs for the | |
* specific Advanced Monitoring metrics for a single hardware or virtual guest | |
* server instance. | |
* | |
* We will call the SoftLayer API to retrieve the monitoring agents, | |
* configuration template, and configuration values for a server instance. |
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 | |
/** | |
* Add/update a reverse DNS record by providing an IP and FQDN. | |
* | |
* This assumes the SoftLayer API PHP client | |
* <http://github.com/softlayer/softlayer-api-php-client> is installed in the | |
* directory '/SoftLayer' in this script's path and that you wish to use the | |
* SOAP client instead of our XML-RPC client. | |
* | |
* @see http://sldn.softlayer.com/wiki/index.php/SoftLayer_Network_Subnet |
NewerOlder