Skip to content

Commit

Permalink
Svsaut 20739: Updating docstrings (#87)
Browse files Browse the repository at this point in the history
* is master edited needs to be seperate value from is edited

* updating docstrings

* clean up docstrings

Co-authored-by: David Mulveney <[email protected]>
Co-authored-by: Matt Tarkington <[email protected]>
  • Loading branch information
3 people authored Jul 10, 2021
1 parent ddeba3c commit 47c82c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 7 additions & 4 deletions vmanage/api/device_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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.
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions vmanage/api/feature_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 47c82c0

Please sign in to comment.