Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support modifying custom fields on vm interfaces #273

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions plugins/modules/vm_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
extends_documentation_fragment:
- networktocode.nautobot.fragments.base
- networktocode.nautobot.fragments.tags
- networktocode.nautobot.fragments.custom_fields
options:
virtual_machine:
description:
Expand Down Expand Up @@ -126,6 +127,18 @@
mtu: 1600
mode: Tagged
state: present

- name: |
Create an interface and update custom_field data point,
setting the value to True
networktocode.nautobot.vm_interface:
url: http://nautobot.local
token: thisIsMyToken
virtual_machine: test100
name: GigabitEthernet26
enabled: false
custom_fields:
monitored: True
"""

RETURN = r"""
Expand Down Expand Up @@ -166,6 +179,7 @@ def main():
untagged_vlan=dict(required=False, type="raw"),
tagged_vlans=dict(required=False, type="raw"),
tags=dict(required=False, type="list", elements="raw"),
custom_fields=dict(required=False, type="dict"),
)
)

Expand Down