cterasdk.core.plans module#

class cterasdk.core.plans.PlanAutoAssignPolicy(core)#

Bases: BaseCommand

get_policy()#

Get plans auto assignment policy

set_policy(rules, apply_default=None, default=None, apply_changes=True)#

Set plans auto assignment policy

Parameters:
  • rules (list[cterasdk.common.types.PolicyRule]) – List of policy rules

  • apply_default (bool,optional) – If no match found, apply default plan. If not passed, the current config will be kept

  • default (str,optional) – Name of a plan to assign if no match found. Ignored unless the apply_default is set to True

  • apply_changes (bool,optional) – Apply provisioning changes upon update, defaults to True

class cterasdk.core.plans.Plans(portal)#

Bases: BaseCommand

Portal Plan APIs

Variables:

auto_assign (cterasdk.core.plans.PlanAutoAssignPolicy) – Object holding the Portal subscription plan auto assignment rules APIs

add(name, retention=None, quotas=None)#

Add a subscription plan

Parameters:
  • retention (dict,optional) – The data retention policy

  • quotas (dict,optional) – The items included in the plan and their respective quota

by_name(names, include=None)#

Get Plans by their names

Parameters:
  • names (list[str],optional) – List of names of plans

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

  • filters (list[cterasdk.core.query.FilterBuilder],optional) – List of additional filters, defaults to None

Returns:

Iterator for all matching Plans

Return type:

cterasdk.lib.iterator.Iterator

default = ['name']#
delete(name)#

Delete a subscription plan

Parameters:

username (str) – The name of the subscription plan

get(name, include=None)#

Retrieve subscription plan properties

Parameters:
  • name (str) – Name of the subscription plan

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

Returns:

The subscription plan, including the requested fields

list_plans(include=None, filters=None)#

List Plans

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

  • filters (list[],optional) – List of additional filters, defaults to None

Returns:

Iterator for all matching Plans

Return type:

cterasdk.lib.iterator.Iterator

modify(name, retention=None, quotas=None, apply_changes=True)#

Modify a subscription plan

Parameters:
  • retention (dict,optional) – The data retention policy

  • quotas (dict,optional) – The items included in the plan and their respective quota

  • apply_changes (bool,optional) – Apply provisioning changes immediately