SoftLayer.image

Image Manager/helpers

license:MIT, see LICENSE for more details.
class SoftLayer.managers.image.ImageManager(client)[source]

Manages SoftLayer server images.

See product information here: https://knowledgelayer.softlayer.com/topic/image-templates

Parameters:client (SoftLayer.API.BaseClient) – the client instance
delete_image(image_id)[source]

Deletes the specified image.

Parameters:image_id (int) – The ID of the image.
edit(image_id, name=None, note=None, tag=None)[source]

Edit image related details.

Parameters:
  • image_id (int) – The ID of the image
  • name (string) – Name of the Image.
  • note (string) – Note of the image.
  • tag (string) – Tags of the image to be updated to.
export_image_to_uri(image_id, uri)[source]

Export image into the given object storage

Parameters:
  • image_id (int) – The ID of the image
  • uri (string) – The URI for object storage of the format swift://<objectStorageAccount>@<cluster>/<container>/<objectPath>
get_image(image_id, **kwargs)[source]

Get details about an image.

Parameters:
  • image (int) – The ID of the image.
  • **kwargs (dict) – response-level options (mask, limit, etc.)
import_image_from_uri(name, uri, os_code=None, note=None)[source]

Import a new image from object storage.

Parameters:
  • name (string) – Name of the new image
  • uri (string) – The URI for an object storage object (.vhd/.iso file) of the format: swift://<objectStorageAccount>@<cluster>/<container>/<objectPath>
  • os_code (string) – The reference code of the operating system
  • note (string) – Note to add to the image
list_private_images(guid=None, name=None, **kwargs)[source]

List all private images.

Parameters:
  • guid (string) – filter based on GUID
  • name (string) – filter based on name
  • **kwargs (dict) – response-level options (mask, limit, etc.)
list_public_images(guid=None, name=None, **kwargs)[source]

List all public images.

Parameters:
  • guid (string) – filter based on GUID
  • name (string) – filter based on name
  • **kwargs (dict) – response-level options (mask, limit, etc.)
resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids.

What exactly ‘identifier’ can be depends on the resolvers

Parameters:identifier (string) – identifying string
Returns list: