clc.server
index
/Users//clc_git/src/clc/server.py

Server related functions.
 
These server related functions generally align one-for-one with published API calls categorized in the server category
 
API v1 - https://t3n.zendesk.com/forums/20578872-Server
API v2 - https://t3n.zendesk.com/forums/21613150-Servers

 
Modules
       
clc
re

 
Classes
       
Server

 
class Server
     Static methods defined here:
Archive(servers, alias=None)
Archives the specified servers.
 
https://t3n.zendesk.com/entries/21016957-Archive-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
Create(name, template, cpu, ram, backup_level, group, alias=None, location=None, network='', description='', password='')
Gets the list of Templates available to the account and location.
 
https://t3n.zendesk.com/entries/21006677-Create-Server
 
:param alias: short code for a particular account.  If None will use account's default alias
:param location: datacenter where group resides.  If None will use account's default location
:param name: server name up to 6 character string that' embedded in final server hostname
:param template: template name for the server template to base build off
:param cpu: int number of CPUs from 1-16
:param ram: int RAM from 1-128
:param backup_level: Standard or Premium
:param group: name of group or group ID for server to belong to
:param network: name of the network to which to deploy the server.  If your account has not yet been assigned a network, leave this blank and one will be assigned automatically
:param description: optional description for the server.  If None the server name will be used.
:param password: optional administrator password.  If None the system will generate one
Delete(servers, alias=None)
Deletes the specified servers and releases all associated resources.
 
https://t3n.zendesk.com/entries/21016852-Delete-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
GetAllServers(alias=None, name_groups=False)
Gets a deep list of all Servers in all groups and datacenters.
 
:param alias: short code for a particular account.  If none will use account's default alias
GetCredentials(servers, alias=None)
Gets the credentials for the specified servers.
 
https://t3n.zendesk.com/entries/21053657-Get-Server-Credentials
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
GetDisks(server, alias=None, guest_names=True)
Returns list of disks configured for the server
 
https://t3n.zendesk.com/entries/23087091-List-Disks
 
:param alias: short code for a particular account.  If none will use account's default alias
:param server: server name
:param guest_names: query guest disk names and mount points
GetServerDetails(alias, servers)
Gets estimated costs for a group of servers.
 
https://t3n.zendesk.com/entries/21741917-Get-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param server: name of server to queury
GetServers(location, group=None, alias=None, name_groups=False)
Gets a deep list of all Servers for a given Hardware Group and its sub groups, or all Servers for a given location.
 
https://t3n.zendesk.com/entries/21735513-Get-All-Servers
 
:param alias: short code for a particular account.  If none will use account's default alias
:param location: datacenter where group resides
:param group: group name
GetTemplateID(alias, location, name)
Given a template name return the unique OperatingSystem ID.
 
:param alias: short code for a particular account.  If none will use account's default alias
:param location: datacenter where group resides
:param name: template name
GetTemplates(alias=None, location=None)
Gets the list of Templates available to the account and location.
 
https://t3n.zendesk.com/entries/23102683-List-Available-Server-Templates
 
:param alias: short code for a particular account.  If none will use account's default alias
:param location: datacenter where group resides
Pause(servers, alias=None)
Pauses the specified servers and releases all associated resources.
 
https://t3n.zendesk.com/entries/21005343-Pause-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
Poweroff(servers, alias=None)
Powers off the specified servers.
 
https://t3n.zendesk.com/entries/21005353-Power-Off-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
Poweron(servers, alias=None)
Powers on the specified servers.
 
https://t3n.zendesk.com/entries/20985206-Power-On-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
Reboot(servers, alias=None)
Reboots the specified servers.
 
https://t3n.zendesk.com/entries/20998347-Reboot-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
Reset(servers, alias=None)
Resets the specified servers.
 
https://t3n.zendesk.com/entries/21005363-Reset-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
Shutdown(servers, alias=None)
Shuts down the specified servers.
 
https://t3n.zendesk.com/entries/23126728-Shutdown-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names
Snapshot(servers, alias=None)
Initiates a server snapshot.
 
https://t3n.zendesk.com/entries/23106211-Snapshot-Server
 
:param alias: short code for a particular account.  If none will use account's default alias
:param servers: list of server names

Data and other attributes defined here:
backup_level_stoi = {'Premium': 1, 'Standard': 2}