api.policy_definitions
¶
Cisco vManage Policy Definitions API Methods.
Module Contents¶
-
api.policy_definitions.
definition_types_19_2_0
= ['data', 'approute', 'control', 'cflowd', 'mesh', 'hubandspoke', 'vpnmembershipgroup', 'qosmap', 'rewriterule', 'acl', 'aclv6', 'vedgeroute', 'zonebasedfw', 'intrusionprevention', 'urlfiltering', 'advancedMalwareProtection', 'dnssecurity'][source]¶
-
api.policy_definitions.
definition_types_19_3_0
= ['data', 'approute', 'control', 'cflowd', 'mesh', 'hubandspoke', 'vpnmembershipgroup', 'qosmap', 'rewriterule', 'acl', 'aclv6', 'deviceaccesspolicy', 'deviceaccesspolicyv6', 'vedgeroute', 'zonebasedfw', 'intrusionprevention', 'urlfiltering', 'advancedMalwareProtection', 'dnssecurity', 'ssldecryption', 'fxoport', 'fxsport', 'fxsdidport', 'dialpeer', 'srstphoneprofile'][source]¶
-
class
api.policy_definitions.
PolicyDefinitions
(session, host, port=443)[source]¶ Bases:
object
vManage Policy Definitions API
Responsible for DELETE, GET, POST, PUT methods against vManage Policy Definitions used in Centralized, Localized, and Security Policy.
-
get_definition_types
(self)[source]¶ Return the definition types for this version of vManage
Args:
- Returns
List of definition types
- Return type
result (list)
-
delete_policy_definition
(self, definition_type, definition_id)[source]¶ Delete a Policy Definition from vManage.
- Parameters
definition_type (str) – The defintion type of the requested policy definition
definition_id (str) – The defintion ID of the requested policy definition
- Returns
All data associated with a response.
- Return type
result (dict)
-
add_policy_definition
(self, policy_definition)[source]¶ Delete a Policy Definition from vManage.
- Parameters
definition_type (str) – The defintion type of the requested policy definition
definition_id (str) – The defintion ID of the requested policy definition
- Returns
All data associated with a response.
- Return type
result (dict)
-
update_policy_definition
(self, policy_definition, policy_definition_id)[source]¶ Update a Policy Definition from vManage.
- Parameters
definition_type (str) – The defintion type of the requested policy definition
definition_id (str) – The defintion ID of the requested policy definition
- Returns
All data associated with a response.
- Return type
result (dict)
-
get_policy_definition
(self, definition_type, definition_id)[source]¶ Get a Policy Definition from vManage.
- Parameters
definition_type (str) – The defintion type of the requested policy definition
definition_id (str) – The defintion ID of the requested policy definition
- Returns
All data associated with a response.
- Return type
result (dict)
-
get_policy_definition_list
(self, definition_type='all')[source]¶ Get all Policy Definition Lists from vManage.
- Parameters
definition_type (string) – The type of Definition List to retreive
- Returns
- A list of all definition lists currently
in vManage.
- Return type
response (dict)
-
get_policy_definition_dict
(self, definition_type, key_name='name', remove_key=False)[source]¶ Get all Policy Definition Lists from vManage.
- Parameters
definition_type (str) – Policy definition type
key_name (string) – The name of the attribute to use as the dictionary key
remove_key (boolean) – Remove the search key from the element
- Returns
All data associated with a response.
- Return type
result (dict)
-