SoftLayer gives you the highest performing cloud infrastructure available. One platform that takes data centers around the world that are full of the widest range of cloud computing options, and then integrates and automates everything.

With this document guide you will be able to work with and use a SoftLayer Connector. While you start configuring the connector, this document will guide you through SoftLayer Connector request and response parameters.

Perform all standard application operations like Create, Start and Stop operations available through the SoftLayer Connector. Some of them are listed below:

  • Create Instance
  • Start Instance
  • Stop Instance
  • Reboot Instance
  • Reset Instance
  • List Instance
  • Details Instance
  • Update Instance
  • Delete Instance

Also,

The ability to set Connector execution timeouts Synchronous / Asynchronous execution of the Connector

Configuring Softlayer Connector

softlayer

Configuration parameters

ParameterDescriptionrequired
usernameSoftlayer client usernametrue: config/request
apikeySoftlayer client apikey Credentialstrue: config/request

Actions

create

Create softlayer instance.

Request parameters

ParameterDescriptionrequired
actionaction to perform: createtrue
hostnameHostname of the Softlayer Instancetrue
domainnameDomainname of the Softlayer Instancetrue
cpuNumber of cpu required for the Softlayer Instancetrue
max-memorymax-memory required for the Softlayer Instancetrue
opearting-systemOpearting system required for the Softlayer Instancetrue
datacenterThe datacenter where the Softlayer Instance is to be launchedtrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
responseResponse Body, with domain name and idtrue

Example

response = @call.connector("softlayer_connector_name")
                .set("action","create")
                .set("host-name","myhostname")
                .set("domain-name","http://example.com/")
                .set("cpu",1)
                .set("max-memory",1024)
                .set("datacenter","ams01")
                .set("opearting-system","UBUNTU_LATEST")
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync
ticket_content = response.get("response")  #Response Result, with domain name and id. 


 

start

Start softlayer instance.

Request parameters

ParameterDescriptionrequired
actionaction to perform: starttrue
idId of the Softlayer Instance which you want to starttrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
responseResponse Body, with operation status.true

Example

response = @call.connector("softlayer_connector_name")
                .set("action","start")
                .set("id",14580)
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync

ticket_content = response.get("response")  #Response Result, with operation status. 


stop

Stop softlayer instance.

Request parameters

ParameterDescriptionrequired
actionaction to perform: stoptrue
idId of the Softlayer Instance which you want to stoptrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
responseResponse Body, with operation status.true


Example

response = @call.connector("softlayer_connector_name")
                .set("action","stop")
                .set("id",14580)
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync

ticket_content = response.get("response")  #Response Result, with operation status. 


reboot

Reboot softlayer instance.

Request parameters

ParameterDescriptionrequired
actionaction to perform: reboottrue
idId of the Softlayer Instance which you want to reboottrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
responseResponse Body, with operation status.true

Example

response = @call.connector("softlayer_connector_name")
                .set("action","reboot")
                .set("id",14580)
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync

ticket_content = response.get("response")  #Response Result, with operation status. 



reset

Reset softlayer instance.

Request parameters

ParameterDescriptionrequired
actionaction to perform: resettrue
idId of the Softlayer Instance which you want to resettrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
responseResponse Body, with operation status.true

Example

response = @call.connector("softlayer_connector_name")
                .set("action","reboot")
                .set("id",14580)
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync

ticket_content = response.get("response")  #Response Result, with operation status. 

list

List all softlayer instances.

Request parameters

ParameterDescriptionrequired
actionaction to perform: listtrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
responseResponse Body, with available instances.true

Example

response = @call.connector("softlayer_connector_name")
                .set("action","list")
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync

ticket_content = response.get("response")  #Response Result, with available instances. 

details

Get details of softlayer instance with provided id.

Request parameters

ParameterDescriptionrequired
actionaction to perform: detailstrue
idId of the Softlayer Instance which you want to gettrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
vm-detailsResponse Body, with instance detail.true

Example

response = @call.connector("softlayer_connector_name")
                .set("action","details")
                .set("id",14580)
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync

ticket_content = response.get("vm-details")  #Response Result, with available instances. 
 

update

Update details of softlayer instance with provided id.

Request parameters

ParameterDescriptionrequired
actionaction to perform: updatetrue
idId of the Softlayer Instance which you want to updatetrue
full-nameFullname of the instance which you want to givefalse
host-nameThe hostname of the instance which you want to givetrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
vm-detailsResponse Body, details with updated instance.true

Example

response = @call.connector("softlayer_connector_name")
                .set("action","update")
                .set("id",14580)
                .set("full-name","infiverve")
                .set("host-name","myhostname")
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync
ticket_content = response.get("vm-details")  #Response Result, with available instances.

 

delete

Delete instance with provided id.

Request parameters

ParameterDescriptionrequired
actionaction to perform: deletetrue
idId of the Softlayer Instance which you want to deletetrue
usernameThe credentials for signing the connector requesttrue: config/request
apikeyThe credentials for signing the connector requesttrue: config/request

Response parameters

ParameterDescriptionrequired
responseResponse Body, with deleted status.true

Example

response = @call.connector("softlayer_connector_name")
                .set("action","delete")
                .set("id",14580)
                .set("apikey","a23dgn5nmk247gbn85sdebg")
                .set("username","rt784375")
                .sync
ticket_content = response.get("response")  #Response Result, with available instances. 
 

Connector request error handling

Here is how you can handle the connector requests success or failures within your Flintbit. This would help you to take appropriate action if something failed.
if response.exitcode == 0               # 0 is success.
  puts "success"
  # take action in case of success
else                                    # non zero means fail
  puts "fail"
  puts "Reason:" + response.message     # get the reason of failure
  ## Take action in case of failure
end

 

 

On this page: