Skip to content

Commit

Permalink
Issue CiscoDevNet#99 - added property names as opposed to just variab…
Browse files Browse the repository at this point in the history
…le names as acceptable identifiers for attach_to_device
  • Loading branch information
jeremypng committed Dec 21, 2020
1 parent 5f6a86e commit 59e90e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vmanage/api/device_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ def attach_to_template(self, template_id, config_type, uuid, wait=True):
if entry['variable']:
if entry['variable'] in uuid[device_uuid]['variables']:
device_template_variables[entry['property']] = uuid[device_uuid]['variables'][entry['variable']]
elif entry['property'] in uuid[device_uuid]['variables']:
device_template_variables[entry['property']] = uuid[device_uuid]['variables'][entry['property']]
else:
raise Exception(f"{entry['variable']} is missing for template {uuid[device_uuid]['host_name']}")

Expand Down

0 comments on commit 59e90e2

Please sign in to comment.