mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix netbox url with urljoin (#47655)
This commit is contained in:
parent
893c0dbba7
commit
7837497b0b
1 changed files with 4 additions and 5 deletions
|
@ -355,11 +355,10 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||||
if self.query_filters:
|
if self.query_filters:
|
||||||
query_parameters.extend(filter(lambda x: x,
|
query_parameters.extend(filter(lambda x: x,
|
||||||
map(self.validate_query_parameters, self.query_filters)))
|
map(self.validate_query_parameters, self.query_filters)))
|
||||||
self.device_url = self.api_endpoint + "/api/dcim/devices/" + "?" + urlencode(query_parameters)
|
self.device_url = urljoin(self.api_endpoint,
|
||||||
self.virtual_machines_url = "".join([self.api_endpoint,
|
"/api/dcim/devices/?" + urlencode(query_parameters))
|
||||||
"/api/virtualization/virtual-machines/",
|
self.virtual_machines_url = urljoin(self.api_endpoint,
|
||||||
"?",
|
"/api/virtualization/virtual-machines/?" + urlencode(query_parameters))
|
||||||
urlencode(query_parameters)])
|
|
||||||
|
|
||||||
def fetch_hosts(self):
|
def fetch_hosts(self):
|
||||||
return chain(
|
return chain(
|
||||||
|
|
Loading…
Reference in a new issue