Skip to content

Update lookup_lookup.rst#321

Merged
joewesch merged 3 commits intonautobot:developfrom
teunvink:patch-1
Mar 5, 2024
Merged

Update lookup_lookup.rst#321
joewesch merged 3 commits intonautobot:developfrom
teunvink:patch-1

Conversation

@teunvink
Copy link
Copy Markdown
Contributor

@teunvink teunvink commented Mar 5, 2024

in nautobot v2, the filter for looking up tags is tags instead of tag. As it is, this example gives an error message that this is an unknown search filter:

fatal: [localhost]: FAILED! =>
  msg: 'An unhandled exception occurred while running the lookup plugin ''networktocode.nautobot.lookup''. Error was a <class ''ansible.errors.AnsibleError''>, original message: {"tag":["Unknown filter field"]}. {"tag":["Unknown filter field"]}'

in nautobot v2, the filter for looking up tags is 'tags' instead of 'tag'.
Comment thread docs/plugins/lookup_lookup.rst Outdated
@@ -490,7 +490,7 @@ Examples
loop: "{{ query('networktocode.nautobot.lookup', 'devices',
api_endpoint='http://localhost/',
api_version='1.3',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update all api_version='1.3' to api_version='2.0' in this file (x3) as well as the examples (x3) in the lookup plugin file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be it.

teunvink added 2 commits March 5, 2024 22:31
fix tag vs tags and version
@joewesch joewesch merged commit dd71712 into nautobot:develop Mar 5, 2024
@teunvink teunvink deleted the patch-1 branch March 5, 2024 22:58
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

Successfully merging this pull request may close these issues.

2 participants