Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

Add support for private images in SoftLayer #1291

Open
malawski opened this issue Feb 2, 2013 · 0 comments
Open

Add support for private images in SoftLayer #1291

malawski opened this issue Feb 2, 2013 · 0 comments

Comments

@malawski
Copy link

malawski commented Feb 2, 2013

Current implementation of listImages() returns a list of public images (Ubuntu, Centos, etc).

There are also private images (snapshots) that can be obtained using http://sldn.softlayer.com/reference/services/SoftLayer_Account/getBlockDeviceTemplateGroups/

To create a node from such a private image we can use Virtual_Guest/createObject method, see also issue #1282.

In this new method the image should be specified using http://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest_Block_Device_Template_Group parameter in http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject method call.

A sample Ruby code to do that is:

require 'rubygems'
require 'softlayer_api'

service = SoftLayer::Service.new("SoftLayer_Virtual_Guest")
service.createObject(
  {"hostname" => "myhost",
   "domain" => "mydomain.com",
   "startCpus" => 1,
   "maxMemory" => 1024,
   "localDiskFlag" => true,
   "hourlyBillingFlag" => true,
   "datacenter" => {"name" => "ams01"},
   "blockDeviceTemplateGroup" => {"globalIdentifier" => "65b5551d-1770-4694-XXXXXXXXXXXXXXX"},
  }) 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant