Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device_templates.py: attach_to_template fails when two variable names are similar #151

Open
robertdemeyer opened this issue Nov 19, 2021 · 0 comments

Comments

@robertdemeyer
Copy link

Dear Team,

I´ve faced an issue where a similar variable caused an deployment error when trying to attach a device to a devicetemplate.
The naming is not enforced to be unique inside the vManage GUI and the function in the SDK takes the none unique variable name rather the unique "property" field.

for entry in template_variables['columns']:
                if entry['variable']:
                    if **entry['variable']** in uuid[device_uuid]['variables']:
                        device_template_variables[entry['property']] = uuid[device_uuid]['variables'][**entry['variable']**]
                    else:
                        raise Exception(f"{entry['variable']} is missing for template {uuid[device_uuid]['host_name']}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant