-
Notifications
You must be signed in to change notification settings - Fork 33
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
Error creating rack_group with location name: Location needs a valid UUID #286
Comments
The location can be specified 2 different ways using nautobot api: 1.) Using location friendly name:
2.) Using location UUID:
Notice the location being a dictionary object with friendly name versus a string with the location uuid. I made some ansible to create the location using the api rather than the nautobot-ansible module as a temporary solution:
|
I see that there were a few lines added as part of the 2.0 migration: nautobot-ansible/plugins/module_utils/utils.py Lines 786 to 787 in 6fad2c7
There could be a valid reason, or it could have just been a misunderstanding. Let me investigate and either update the documentation or remove that limitation. |
Also, you may be interested to know we have many lookup plugins so you don't need to reinvent the wheel with the URI module:
|
@joewesch do you think we could handle this so the nice name can be provided? |
ISSUE TYPE
SOFTWARE VERSIONS
pynautobot
pynautobot==2.0.1
Ansible:
ansible==8.5.0
Nautobot:
2.0.5
SUMMARY
When I try to add a rack group using the location's friendly name, such as
Location1
, I get an error saying I need to use the Location UUID:msg: Location needs a valid UUID
.I'm using the example snippet for creating a rack group from: https://nautobot-ansible.readthedocs.io/en/latest/plugins/rack_group_module.html#examples
Related Slack thread: https://networktocode.slack.com/archives/C01NWPK6WHL/p1701378500094129
STEPS TO REPRODUCE
EXPECTED RESULTS
Expected the new rack group to be created and attached to the specified location.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: