data.template_data
¶
Cisco vManage Templates Methods.
Module Contents¶
-
class
data.template_data.
TemplateData
(session, host, port=443)[source]¶ Bases:
object
Methods that deal with importing, exporting, and converting data from templates.
-
convert_device_template_to_name
(self, device_template)[source]¶ Convert a device template objects from IDs to Names.
- Parameters
device_template (dict) – Device Template
- Returns
Converted Device Template.
- Return type
result (dict)
-
convert_device_template_to_id
(self, device_template)[source]¶ Convert a device template objects from Names to IDs.
- Parameters
device_template (dict) – Device Template
- Returns
Converted Device Template.
- Return type
result (dict)
-
generalTemplates_to_id
(self, generalTemplates)[source]¶ Convert a generalTemplates object from Names to IDs.
- Parameters
generalTemplates (dict) – generalTemplates object
- Returns
Converted generalTemplates object.
- Return type
result (dict)
-
import_feature_template_list
(self, feature_template_list, push=False, check_mode=False, update=False)[source]¶ Import a list of feature templates from list to vManage. Object Names are converted to IDs.
- Parameters
feature_template_list (list) – List of feature templates
check_mode (bool) – Only check to see if changes would be made
update (bool) – Update the template if it exists
- Returns
Returns the diffs of the updates.
- Return type
result (list)
-
export_device_template_list
(self, factory_default=False, name_list=None)[source]¶ Export device templates from vManage into a list. Object IDs are converted to Names.
- Parameters
factory_default (bool) – Include factory default
name_list (list of strings) – A list of template names to retreive.
- Returns
All data associated with a response.
- Return type
result (dict)
-
import_device_template_list
(self, device_template_list, check_mode=False, update=False, push=False)[source]¶ Import a list of device templates from list to vManage. Object Names are converted to IDs.
- Parameters
device_template_list (list) – List of device templates
check_mode (bool) – Only check to see if changes would be made
update (bool) – Update the template if it exists
- Returns
Returns the diffs of the updates.
- Return type
result (list)
-
import_attachment_list
(self, attachment_list, check_mode=False, update=False)[source]¶ Import a list of device attachments to vManage.
- Parameters
attachment_list (list) – List of attachments
check_mode (bool) – Only check to see if changes would be made
update (bool) – Update the template if it exists
- Returns
Returns the diffs of the updates.
- Return type
result (list)
-