Skip to content

Feat: Support config_template opt in platform #1119

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

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
15 changes: 15 additions & 0 deletions plugins/modules/netbox_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
- The manufacturer the platform will be tied to
required: false
type: raw
config_template:
description:
- The configuration template the platform will use
required: false
type: raw
napalm_driver:
description:
- The name of the NAPALM driver to be used when using the NAPALM plugin
Expand Down Expand Up @@ -90,6 +95,15 @@
data:
name: Test Platform
state: present

- name: Create platform within NetBox with a config template
netbox.netbox.netbox_platform:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test Platform
config_template: "my_config_template_slug"
state: present

- name: Create platform within NetBox with only required information
netbox.netbox.netbox_platform:
Expand Down Expand Up @@ -149,6 +163,7 @@ def main():
slug=dict(required=False, type="str"),
description=dict(required=False, type="str"),
manufacturer=dict(required=False, type="raw"),
config_template=dict(required=False, type="raw"),
napalm_driver=dict(required=False, type="str"),
napalm_args=dict(required=False, type="dict"),
tags=dict(required=False, type="list", elements="raw"),
Expand Down