Skip to content

Commit

Permalink
Merge pull request #199 from jvanderaa/fix_vc_search
Browse files Browse the repository at this point in the history
Adds master to QUERY_TYPE.
  • Loading branch information
jvanderaa committed Mar 28, 2023
2 parents 731b9a5 + a1ec06f commit 93cdd80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace: networktocode
name: nautobot

# The version of the collection. Must be compatible with semantic versioning
version: 4.2.0
version: 4.3.1

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
5 changes: 5 additions & 0 deletions plugins/module_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
installed_device="name",
import_targets="name",
manufacturer="slug",
master="name",
nat_inside="address",
nat_outside="address",
parent_rack_group="slug",
Expand Down Expand Up @@ -852,6 +853,8 @@ def _find_ids(self, data, user_query_params):
id_list.append(list_item)
continue
else:
# Reminder: this get checks the QUERY_TYPES constant above, if the item is not in the list
# of approved query types, then it defaults to a q search
temp_dict = {QUERY_TYPES.get(k, "q"): search}

query_id = self._nb_endpoint_get(nb_endpoint, temp_dict, k)
Expand All @@ -863,6 +866,8 @@ def _find_ids(self, data, user_query_params):
if k in ["lag", "rear_port", "rear_port_template"]:
query_params = self._build_query_params(k, data, user_query_params)
else:
# Reminder: this get checks the QUERY_TYPES constant above, if the item is not in the list
# of approved query types, then it defaults to a q search
query_params = {QUERY_TYPES.get(k, "q"): search}
query_id = self._nb_endpoint_get(nb_endpoint, query_params, k)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nautobot_ansible_modules"
version = "4.3.0"
version = "4.3.1"
description = "Ansible collection to interact with Nautobot's API"
authors = ["Network to Code <opensource@networktocode.com"]
license = "Apache 2.0"
Expand Down

0 comments on commit 93cdd80

Please sign in to comment.