Skip to content

Commit 646cef4

Browse files
Enhancement: Adds tenant option to netbox_cluster (#230)
1 parent 8c85ca8 commit 646cef4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

plugins/modules/netbox_cluster.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
- Comments that may include additional information in regards to the cluster
7070
required: false
7171
type: str
72+
tenant:
73+
description:
74+
- Tenant the cluster will be assigned to.
75+
required: false
76+
type: raw
7277
tags:
7378
description:
7479
- Any tags that the cluster may need to be associated with
@@ -176,6 +181,7 @@ def main():
176181
cluster_type=dict(required=False, type="raw"),
177182
cluster_group=dict(required=False, type="raw"),
178183
site=dict(required=False, type="raw"),
184+
tenant=dict(required=False, type="raw"),
179185
comments=dict(required=False, type="str"),
180186
tags=dict(required=False, type="list"),
181187
custom_fields=dict(required=False, type="dict"),

tests/integration/targets/latest/tasks/netbox_cluster.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
cluster_group: "Test Cluster Group"
5353
site: "Test Site"
5454
comments: "Updated cluster"
55+
tenant: "Test Tenant"
5556
tags:
5657
- Schnozzberry
5758
state: present
@@ -65,12 +66,14 @@
6566
- test_three['diff']['after']['site'] == 1
6667
- test_three['diff']['after']['comments'] == "Updated cluster"
6768
- test_three['diff']['after']['tags'][0] == "Schnozzberry"
69+
- test_three['diff']['after']['tenant'] == 1
6870
- test_three['cluster']['name'] == "Test Cluster One"
6971
- test_three['cluster']['type'] == 1
7072
- test_three['cluster']['group'] == 1
7173
- test_three['cluster']['site'] == 1
7274
- test_three['cluster']['comments'] == "Updated cluster"
7375
- test_three['cluster']['tags'][0] == "Schnozzberry"
76+
- test_three['cluster']['tenant'] == 1
7477
- test_three['msg'] == "cluster Test Cluster One updated"
7578

7679
- name: "CLUSTER 4: ASSERT - Delete"

0 commit comments

Comments
 (0)