diff --git a/vmanage/api/device_templates.py b/vmanage/api/device_templates.py index 7cf50ec..88a0229 100644 --- a/vmanage/api/device_templates.py +++ b/vmanage/api/device_templates.py @@ -70,9 +70,11 @@ def get_device_templates(self): def get_device_template_object(self, template_id): """Obtain a device template object. + Args: + template_id (str): Object ID for device template + Returns: result (dict): All data associated with a response. - """ api = f"template/device/object/{template_id}" @@ -123,6 +125,7 @@ def get_device_template_dict(self, factory_default=False, key_name='templateName factory_default (bool): Wheter to return factory default templates key_name (string): The name of the attribute to use as the dictionary key remove_key (boolean): remove the search key from the element + name_list (list of strings): A list of template names to retreive. Returns: result (dict): All data associated with a response. @@ -137,7 +140,6 @@ def get_device_template_dict(self, factory_default=False, key_name='templateName def get_template_attachments(self, template_id, key='host-name'): """Get the devices that a template is attached to. - Args: template_id (string): Template ID key (string): The key of the device to put in the list (default: host-name) @@ -203,7 +205,6 @@ def get_template_input(self, template_id, device_id_list=None): def add_device_template(self, device_template): """Add a single device template to Vmanage. - Args: device_template (dict): Device Template @@ -248,7 +249,6 @@ def add_device_template(self, device_template): def update_device_template(self, device_template): """Update a single device template to Vmanage. - Args: device_template (dict): Device Template @@ -279,6 +279,9 @@ def reattach_device_template(self, template_id, config_type, is_edited=True, is_ Args: template_id (str): The template ID to attach to config_type (str): Type of template i.e. device or CLI template + is_edited (bool): True if the template has been edited + is_master_edited (bool): For CLI device template needs to match is_edited. + For device templates using feature templates needs to be set to False. Returns: action_id (str): Returns the action id of the attachment diff --git a/vmanage/api/feature_templates.py b/vmanage/api/feature_templates.py index f6f851a..6743a56 100644 --- a/vmanage/api/feature_templates.py +++ b/vmanage/api/feature_templates.py @@ -106,7 +106,7 @@ def get_feature_template_list(self, factory_default=False, name_list=None): Args: - factory_default (bool): Wheter to return factory default templates + factory_default (bool): Whether to return factory default templates name_list (list of strings): A list of the template names to return Returns: @@ -138,9 +138,10 @@ def get_feature_template_dict(self, Args: - factory_default (bool): Wheter to return factory default templates + factory_default (bool): Whether to return factory default templates key_name (string): The name of the attribute to use as the dictionary key - remove_key (boolean): remove the search key from the element + remove_key (boolean): Remove the search key from the element + name_list (list of strings): A list of the template names to return Returns: result (dict): All data associated with a response.