Skip to content

Commit b773c80

Browse files
authored
fix: nb_lookup plugin: Allow mac-addresses lookup (#1416)
* Allow mac-addresses lookup * Only add endpoint for NB version greater or equal 4.2
1 parent 60bb038 commit b773c80

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/lookup/nb_lookup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ def get_endpoint(netbox, term):
328328
}
329329
netbox_endpoint_map["l2vpns"] = {"endpoint": netbox.ipam.l2vpns}
330330

331+
if netbox_versiontuple >= (4, 2):
332+
netbox_endpoint_map["mac-addresses"] = {"endpoint": netbox.dcim.mac_addresses}
333+
331334
return netbox_endpoint_map[term]["endpoint"]
332335

333336

0 commit comments

Comments
 (0)