Skip to content

Commit 3b738aa

Browse files
committed
feat: Update endpoint mappings for tunnels in netbox_utils
This commit updates the endpoint mappings in the `netbox_utils.py` file to include the "tunnels" endpoint. This change ensures that the correct API endpoint is used when interacting with tunnels in NetBox.
1 parent eea1aec commit 3b738aa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

plugins/module_utils/netbox_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@
399399
"tags": "tags",
400400
"tenants": "tenant",
401401
"tenant_groups": "tenant_group",
402+
"tunnels": "tunnel",
402403
"virtual_chassis": "virtual_chassis",
403404
"virtual_machines": "virtual_machine",
404405
"virtual_disks": "virtual_disk",
@@ -537,6 +538,7 @@
537538
"tenant_group": set(["slug"]),
538539
"termination_a": set(["name", "device", "virtual_machine"]),
539540
"termination_b": set(["name", "device", "virtual_machine"]),
541+
"tunnel": set(["name"]),
540542
"untagged_vlan": set(["group", "name", "site", "vid", "vlan_group", "tenant"]),
541543
"virtual_chassis": set(["name", "master"]),
542544
"virtual_machine": set(["name", "cluster"]),
@@ -630,6 +632,7 @@
630632
"tenant_group": "group",
631633
"termination_a": "termination_a_id",
632634
"termination_b": "termination_b_id",
635+
"tunnel_group": "group",
633636
"virtual_machine_role": "role",
634637
"vlan_role": "role",
635638
"vlan_group": "group",

plugins/module_utils/netbox_vpn.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
NB_L2VPNS = "l2vpns"
1919
NB_L2VPN_TERMINATIONS = "l2vpn_terminations"
20+
NB_TUNNELS = "tunnels"
2021

2122

2223
class NetboxVpnModule(NetboxModule):
@@ -30,6 +31,7 @@ def run(self):
3031
Supported endpoints:
3132
- l2vpns
3233
- l2vpn_terminations
34+
- tunnels
3335
"""
3436
# Used to dynamically set key when returning results
3537
endpoint_name = ENDPOINT_NAME_MAPPING[self.endpoint]

0 commit comments

Comments
 (0)