Skip to content

Commit

Permalink
1333 feature update netbox device interface template (#1345)
Browse files Browse the repository at this point in the history
* Add new options for interface template creation

This commit adds new options for creating interface templates in NetBox. The new options include the ability to specify a label, enable or disable the template, and provide a description. These options were added in version 3.21.0 of the plugin.

* added changelog fragment

* Update 1333-feature-netbox_device_interface_template.yml

new line to fix linting
  • Loading branch information
richbibby authored Oct 27, 2024
1 parent 4b203df commit e0f3488
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Add `label`, `description` and `enabled` to `netbox_device_interface_template` (https://github.com/netbox-community/ansible_modules/issues/1333)
21 changes: 21 additions & 0 deletions plugins/modules/netbox_device_interface_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
- Name of the interface template to be created
required: true
type: str
label:
description:
- The label of the interface template
required: false
type: str
version_added: '3.21.0'
type:
description:
- |
Expand All @@ -47,11 +53,23 @@
This has to be specified exactly as what is found within UI
required: true
type: str
enabled:
description:
- Whether or not the interface template to be created should be enabled
required: false
type: bool
version_added: '3.21.0'
mgmt_only:
description:
- This interface template is used only for out-of-band management
required: false
type: bool
description:
description:
- Description of the interface template
required: false
type: str
version_added: '3.21.0'
poe_mode:
description:
- This interface has PoE ability (NetBox release 3.3 and later)
Expand Down Expand Up @@ -129,11 +147,14 @@ def main():
options=dict(
device_type=dict(required=True, type="raw"),
name=dict(required=True, type="str"),
label=dict(required=False, type="str"),
type=dict(
required=True,
type="str",
),
enabled=dict(required=False, type="bool"),
mgmt_only=dict(required=False, type="bool"),
description=dict(required=False, type="str"),
poe_type=dict(required=False, type="raw"),
poe_mode=dict(required=False, type="raw"),
),
Expand Down

0 comments on commit e0f3488

Please sign in to comment.