DH Manager/helpers

license:MIT, see License for more details.
class SoftLayer.managers.dedicated_host.DedicatedHostManager(client, ordering_manager=None)[source]

Manages SoftLayer Dedicated Hosts.

See product information here
  • client (SoftLayer.API.BaseClient) – the client instance
  • ordering_manager (SoftLayer.managers.OrderingManager) – an optional manager to handle ordering. If none is provided, one will be auto initialized.

Returns valid options for ordering a dedicated host.

get_host(host_id, **kwargs)[source]

Get details about a dedicated host.

:param integer : the host ID :returns: A dictionary containing host information.


# Print out host ID 12345.
dh = mgr.get_host(12345)
print dh

# Print out only name and backendRouter for instance 12345
object_mask = "mask[name,backendRouter[id]]"
dh = mgr.get_host(12345, mask=mask)
print dh
get_router_options(datacenter=None, flavor=None)[source]

Returns available backend routers for the dedicated host.

list_instances(tags=None, cpus=None, memory=None, hostname=None, disk=None, datacenter=None, **kwargs)[source]

Retrieve a list of all dedicated hosts on the account

  • tags (list) – filter based on list of tags
  • cpus (integer) – filter based on number of CPUS
  • memory (integer) – filter based on amount of memory
  • hostname (string) – filter based on hostname
  • disk (string) – filter based on disk
  • datacenter (string) – filter based on datacenter
  • **kwargs (dict) – response-level options (mask, limit, etc.)

Returns a list of dictionaries representing the matching dedicated host.

place_order(hostname, domain, location, flavor, hourly, router=None)[source]

Places an order for a dedicated host.

See get_create_options() for valid arguments.

  • hostname (string) – server hostname
  • domain (string) – server domain name
  • location (string) – location (datacenter) name
  • hourly (boolean) – True if using hourly pricing (default). False for monthly.
  • router (int) – an optional value for selecting a backend router

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:
verify_order(hostname, domain, location, hourly, flavor, router=None)[source]

Verifies an order for a dedicated host.

See place_order() for a list of available options.