apps.files
¶
Cisco vManage Files API Methods.
Module Contents¶
-
class
apps.files.
Files
(session, host, port=443)[source]¶ Bases:
object
Read and write data to file.
-
export_templates_to_file
(self, export_file, name_list=None, template_type=None)[source]¶ Export templates to a file. All object IDs will be translated to names. Use a ‘.yml’ extention to export as YAML and a ‘.json’ extension to export as JSON.
- Parameters
export_file (str) – The name of the export file
name_list (list) – List of device templates to export
template_type (str) – Template type: device or template
-
import_templates_from_file
(self, import_file, update=False, check_mode=False, name_list=None, template_type=None)[source]¶ Import templates from a file. All object Names will be translated to IDs.
- Parameters
import_file (str) – The name of the import file
name_list (list) – List of device templates to export
template_type (str) – Template type: device or template
check_mode (bool) – Try the import, but don’t make changes (default: False)
update (bool) – Update existing templates (default: False)
-
export_policy_to_file
(self, export_file)[source]¶ Export policy to a file. All object IDs will be translated to names. Use a ‘.yml’ extention to export as YAML and a ‘.json’ extension to export as JSON.
- Parameters
export_file (str) – The name of the export file
-
import_policy_from_file
(self, file, update=False, check_mode=False, push=False)[source]¶ Import policy from a file. All object Names will be translated to IDs.
- Parameters
import_file (str) – The name of the import file
check_mode (bool) – Try the import, but don’t make changes (default: False)
update (bool) – Update existing templates (default: False)
push (bool) – Push tempaltes to devices if changed (default: False)
-
export_attachments_to_file
(self, export_file, name_list=None, device_type=None)[source]¶ Export attachments to a file. All object IDs will be translated to names. Use a ‘.yml’ extention to export as YAML and a ‘.json’ extension to export as JSON.
- Parameters
export_file (str) – The name of the export file
-
import_attachments_from_file
(self, import_file, update=False, check_mode=False, name_list=None)[source]¶ Import attachments from a file. All object Names will be translated to IDs.
- Parameters
import_file (str) – The name of the import file
check_mode (bool) – Try the import, but don’t make changes (default: False)
update (bool) – Update existing templates (default: False)
-