cterasdk.core.templates module#
- class cterasdk.core.templates.TemplateAutoAssignPolicy(core)#
Bases:
BaseCommand
- apply_changes(wait=False)#
Apply provisioning changes.
- Parameters:
wait (bool,optional) – Wait for all changes to apply, defaults to False
- get_policy()#
Get templates auto assignment policy
- set_policy(rules, apply_default=None, default=None, apply_changes=True)#
Set templates auto assignment policy
- Parameters:
rules (list[cterasdk.common.types.PolicyRule]) – List of policy rules
apply_default (bool,optional) – If no match found, apply default template. If not passed, the current config will be kept
default (str,optional) – Name of a template to assign if no match found. Ignored unless the
apply_default
is set toTrue
apply_changes (bool,optional) – Apply changes upon update, defaults to
True
- class cterasdk.core.templates.Templates(portal)#
Bases:
BaseCommand
Portal Configuration Template APIs
- add(name, description=None, include_sets=None, exclude_sets=None, apps=None, backup_schedule=None, versions=None, update_settings=None, scripts=None, cli_commands=None, consent_page=None)#
Add a Configuration Template
- Parameters:
name (str) – Name of the template
description (str,optional) – Template description
include_sets (list[cterasdk.common.types.FilterBackupSet],optional) – List of backup sets to include
exclude_sets (list[cterasdk.common.types.FilterBackupSet],optional) – List of backup sets to exclude
apps (list[cterasdk.common.enum.Application],optional) – List of applications to back up
backup_schedule (cterasdk.common.types.TaskSchedule,optional) – Backup schedule
versions (list[cterasdk.core.types.PlatformVersion],optional) – List of platforms and their associated versions. Pass None to inherit the default settings from the Global Administration Portal
update_settings (cterasdk.common.types.SoftwareUpdatesTopic,optional) – Software update settings
scripts (list[cterasdk.core.types.TemplateScript],optional) – Scripts to execute after logon, before or after backup
cli_commands (list[str],optional) – Template CLI commands to execute
consent_page (cterasdk.common.types.ConsentPage) – Consent page to show to end-user
- by_name(names, include=None)#
Get Templates by their names
- Parameters:
names (list[str],optional) – List of names of templates
include (list[str],optional) – List of fields to retrieve, defaults to [‘name’]
- Returns:
Iterator for all matching Templates
- Return type:
cterasdk.lib.iterator.Iterator
- default = ['name']#
- delete(name)#
Delete a Configuration Template
- Parameters:
name (str) – Name of the template
- get(name, include=None)#
Get a Configuration Template
- Parameters:
name (str) – Name of the template
include (list[str]) – List of fields to retrieve, defaults to
['name']
- list_templates(include=None, filters=None)#
List Configuration Templates.
To retrieve templates, you must first browse the tenant, using: GlobalAdmin.portals.browse()
- Parameters:
include (list[str],optional) – List of fields to retrieve, defaults to
['name']
filters (list[],optional) – List of additional filters, defaults to None
- remove_default(name, wait=False)#
Set a Configuration Template not to be the default template
- Parameters:
name (str) – Name of the template
wait (bool,optional) – Wait for all changes to apply, defaults to False
- set_default(name, wait=False)#
Set a Configuration Template as the default template
- Parameters:
name (str) – Name of the template
wait (bool,optional) – Wait for all changes to apply, defaults to False