cterasdk.core.servers module#

class cterasdk.core.servers.Servers(portal)#

Bases: BaseCommand

Global Admin Servers APIs

default = ['name']#
get(name, include=None)#

Retrieve server properties

Parameters:
  • name (str) – Name of the server

  • include (list[str]) – List of fields to retrieve, defaults to [‘name’]

Returns:

The server, including the requested fields

list_servers(include=None)#

Retrieve the servers that comprise CTERA Portal.

To retrieve servers, you must first browse the Global Administration Portal, using: GlobalAdmin.portals.browse_global_admin()

Parameters:

include (list[str],optional) – List of fields to retrieve, defaults to [‘name’]

modify(name, server_name=None, app=None, preview=None, enable_public_ip=None, public_ip=None, allow_user_login=None, enable_replication=None, replica_of=None)#

Modify a Portal server

Parameters:
  • name (str) – The current server name

  • server_name (str,optional) – New server name

  • app (bool,optional) – Application server

  • preview (bool,optional) – Preview server

  • enable_public_ip (bool,optional) – Enable or disable public NAT address

  • public_ip (str,optional) – Public NAT address

  • allow_user_login (bool,optional) – Allow or disallow logins to this server

  • enable_replication (bool,optional) – Enable or disable database replication

  • replica_of (str,optional) – Configure as a replicate of another Portal server. enable_replication must be set to True

class cterasdk.core.servers.Tasks(portal)#

Bases: BaseCommand

background(name)#

Get all background tasks

Parameters:

name (str) – Name of the server

Returns:

List of tasks

scheduled(name)#

Get all scheduled tasks

Parameters:

name (str) – Name of the server

Returns:

List of tasks