This document discusses various ways to interact with SoftLayer, including via the web portal, mobile apps, command line interface (CLI), APIs, and code examples. It provides an overview of the REST API and Python CLI for SoftLayer, demonstrating how to get account details, manage CDN, snapshots, tickets, and generate pricing tables. In summary, SoftLayer offers a full suite of tools including CLI, APIs, code samples, and documentation to help users interact with and manage their SoftLayer infrastructure and services.
4. Python CLI
sl コマンド v3.1.0
Compute:
bmc Bare Metal Cloud
cci Cloud Compute Instances
image Manages compute and
flex images
metadata Get details about this
machine. Also available with 'my'
and 'meta'
server Hardware Bare metal
servers
sshkey Manage SSH keys on your
account
vs Virtual Servers
(formerly CCIs)
Networking:
cdn Content Delivery
Network service management
dns Domain Name System
firewall Firewall rule and
security management
globalip Global IP address
management
messaging Message Queue Service
rwhois RWhoIs operations
ssl Manages SSL
subnet Subnet ordering and
management
vlan Manage VLANs on your
account
Storage:
iscsi View iSCSI details
nas View NAS details
snapshot iSCSI snapshots
General:
config View and edit
configuration for this tool
ticket Manage account tickets
summary Display an overall
summary of your account
help Show help
4
5. $ sl help cdn
usage: sl cdn [<command>] [<args>...] [options]
Manage CDN accounts and configuration
The available commands are:
detail Show details for a CDN account
list List CDN accounts
load Cache one or more files on all edge nodes
origin-add Add an origin pull mapping
origin-list Show origin pull mappings on a CDN account
origin-remove Remove an origin pull mapping
purge Purge one or more cached files from all
edge nodes
6. $ sl help snapshot
usage: sl snapshot [<command>] [<args>...] [options]
Manage, order, delete iSCSI snapshots
The available commands are:
cancel Cancel an iSCSI snapshot
create Create a snapshot of given iSCSI volume
create-space Orders space for storing snapshots
list List snpshots of given iSCSI
restore-volume Restores volume from existing snapshot
For several commands <identifier> will be asked for.This
can be the id
of iSCSI volume or iSCSI snapshot.
7. $ sl help ticket
usage: sl ticket [<command>] [<args>...] [options]
Manages account tickets
The available commands are:
create Create a new ticket
detail Output details about an ticket
list List tickets
update Update an existing ticket
subjects List the subject IDs that can be used for
ticket creation
summary Give summary info about tickets
8. API Python Client
$ python
from SoftLayer import TicketManager, Client
client = Client()
ticket = TicketManager(client)
>>> for t in ticket.list_tickets():
print("%d %s %s" % (t['id'], t['lastEditDate'], t['title']))
9533798 2014-04-16T08:08:32+09:00 Virtual Server Cancellation -
04/15/14
9533682 2014-04-16T11:07:15+09:00 MONITORING: Network Monitor Alert
9432082 2014-05-09T19:47:44+09:00 NOTIFICATION: Object Storage
Service and the Heartbleed OpenSSL Vulnerability - Global -
04/09/2014
9397692 2014-04-09T15:07:36+09:00 Security Issue - Impact of
CVE-2014-0160 in SLayer
8988684 2014-03-15T12:46:28+09:00 Cloud Instance Cancellation -
03/13/14
8896850 2014-03-13T10:31:31+09:00 Introducing New Product Names
8581498 2014-02-15T05:27:15+09:00 MONITORING: Network Monitor Alert
8