cterasdk.core.devices module#
- class cterasdk.core.devices.Devices(core)#
Bases:
BaseCommand
Portal Devices APIs
- agents(include=None, allPortals=False)#
Get Agents
- Parameters:
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’, ‘portal’, ‘deviceType’]
allPortals (bool,optional) – Search in all portals, defaults to False
- Returns:
Iterator for all matching Agents
- Return type:
cterasdk.lib.iterator.Iterator[cterasdk.object.Agent.Agent]
- by_name(names, include=None)#
Get Devices by their names
- Parameters:
names (list[str],optional) – List of names of devices
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’, ‘portal’, ‘deviceType’]
- Returns:
Iterator for all matching Devices
- Return type:
cterasdk.lib.iterator.Iterator
- default = ['name', 'portal', 'deviceType', 'version', 'remoteAccessUrl']#
- desktops(include=None, allPortals=False)#
Get Desktops
- Parameters:
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’, ‘portal’, ‘deviceType’]
allPortals (bool,optional) – Search in all portals, defaults to False
- Returns:
Iterator for all matching Desktops
- Return type:
cterasdk.lib.iterator.Iterator
- device(device_name, tenant=None, include=None)#
Get a Device by its name
- Parameters:
device_name (str) – Name of the device to retrieve
tenant (str,optional) – Tenant of the device, defaults to the tenant in the current session
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’, ‘portal’, ‘deviceType’]
- Returns:
Managed Device
- Return type:
cterasdk.objects.synchronous.Edge or cterasdk.objects.synchronous.Drive
- devices(include=None, allPortals=False, filters=None, user=None)#
Get Devices
- Parameters:
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’, ‘portal’, ‘deviceType’]
allPortals (bool,optional) – Search in all portals, defaults to False
filters (list[],optional) – List of additional filters, defaults to None
user (cterasdk.core.types.UserAccount) – User account of the device owner
- Returns:
Iterator for all matching Devices
- Return type:
cterasdk.lib.iterator.Iterator
- filers(include=None, allPortals=False, deviceTypes=None)#
Get Filers
- Parameters:
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’, ‘portal’, ‘deviceType’]
allPortals (bool,optional) – Search in all portals, defaults to False
deviceTypes (list[cterasdk.core.enum.DeviceType.Gateways]) – Types of Filers, defaults to all Filer types
- Returns:
Iterator for all matching Filers
- Return type:
cterasdk.lib.iterator.Iterator[cterasdk.object.Gateway.Gateway]
- get_comment(device_name, tenant=None)#
Get Portal device comment
- Parameters:
device (str) – Device name
- Returns:
Comment
- Return type:
str
- name_attr = 'name'#
- servers(include=None, allPortals=False)#
Get Servers
- Parameters:
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’, ‘portal’, ‘deviceType’]
allPortals (bool,optional) – Search in all portals, defaults to False
- Returns:
Iterator for all matching Servers
- Return type:
cterasdk.lib.iterator.Iterator
- set_comment(device_name, comment, tenant=None)#
Set a comment to a Portal device
- Parameters:
device (str) – Device name
comment (str) – Comment
- type_attr = 'deviceType'#