smartdc.legacy Module

class smartdc.legacy.LegacyDataCenter(location=None, key_id=None, secret='~/.ssh/id_rsa', headers=None, login=None, known_locations=None, allow_agent=False, verify=True, verbose=None)

This class provides bare bones support for older versions of the SmartDataCenter API.

A smartdc.datacenter.DataCenter object may be instantiated without any parameters, but practically speaking, the key_id and secret parameters are necessary before any meaningful requests may be made.

  • location (basestring) – SmartDC API’s hostname
  • key_id (basestring) – SmartDC identifier for the ssh key
  • secret (str) – path to private rsa key (default: ‘~/.ssh/id_rsa’)
  • headers (dict) – headers inserted upon every request
  • login (basestring) – user path in SmartDC
  • known_locations (dict) – keys-to-URLs mapping used by location
  • allow_agent (bool) – whether or not to try ssh-agent
  • verify (bool) – whether or not to verify server SSL certificates
  • verbose (bool) – whether or not to print request URLs to stderr, overrides config

The location is notionally a hostname, but it may be expressed as an FQDN, one of the keys to the known_locations dict, or, as a fallback, a bare hostname as prefix to the API_HOST_SUFFIX. The default location is ‘us-west-1’, because that is where ‘’ redirects to at the time of writing.

The known_locations dict allows for custom access to a private cloud.


  • location – location of the machine
  • known_locationsdict of known locations for this cluster of datacenters
  • login – user path in the SmartDC

Previous topic

smartdc.machine Module

Next topic

Version History

This Page