api.policy_updates¶
Cisco vManage Policy Lists API Methods.
Module Contents¶
-
class
api.policy_updates.PolicyUpdates(session, host, port=443)[source]¶ Bases:
objectvManage Policy Updates API
Responsible for POST and PUT methods against vManage Policy APIs used in Centralized, Localized, and Security Policy.
-
get_device_ids(self, template_id)[source]¶ GET vSmart device ids from vManage.
- Parameters
templateid (str) – vManaged assigned template identifier.
- Returns
device ids list.
- Return type
response (list)
-
get_device_inputs(self, template_id, device_ids)[source]¶ GET vSmart device inputs from vManage.
- Parameters
templateid (str) – vManage assigned template identifier.
device_ids (list) – vManage assigned device ids for vSmarts.
- Returns
device inputs.
- Return type
response (dict)
-
get_policy_id(self, policy_type, policy_name)[source]¶ GET vSmart device ids from vManage.
- Parameters
policy_type (str) – vManage policy type i.e. approute, data, hubandspoke etc.
policy_name (str) – policy name for user needs policy id.
- Returns
vManage assigned policy id.
- Return type
response (str)
-
get_policy_definition(self, policy_type, policy_id)[source]¶ GET vSmart device ids from vManage.
- Parameters
policy_type (str) – vManage policy type i.e. approute, data, hubandspoke etc.
policy_id (str) – vManage assigned policy id.
- Returns
policy definition.
- Return type
response (dict)
-
update_policy_definition(self, policy_type, name, policy_id, policy_def, new_color, seq_name=None)[source]¶ update policy definition
- Parameters
policy_type (str) – vManage policy type i.e. approute, data, hubandspoke etc.
policy_id (str) – vManage assigned policy id.
policy_def (dict) – dict of data for policy updates to be done
- Returns
policy definition.
- Return type
response (dict)
-