Skip to content

Commit

Permalink
Add description to Rack Role (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-d-smith authored Jan 6, 2024
1 parent 75dcaf1 commit 57fe0ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions plugins/modules/netbox_rack_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
- Hexidecimal code for a color, ex. FFFFFF
required: false
type: str
description:
description:
- Description of the rack role
required: false
type: str
version_added: "3.17.0"
tags:
description:
- The tags to add/update
Expand Down Expand Up @@ -77,6 +83,16 @@
color: FFFFFF
state: present
- name: Create rack role within NetBox with a description
netbox.netbox.netbox_rack_role:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: Test rack role
color: FFFFFF
description: This is a test rack role
state: present
- name: Delete rack role within netbox
netbox.netbox.netbox_rack_role:
netbox_url: http://netbox.local
Expand Down Expand Up @@ -122,6 +138,7 @@ def main():
name=dict(required=True, type="str"),
slug=dict(required=False, type="str"),
color=dict(required=False, type="str"),
description=dict(required=False, type="str"),
tags=dict(required=False, type="list", elements="raw"),
custom_fields=dict(required=False, type="dict"),
),
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/v3.6/tasks/netbox_rack_role.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
data:
name: Rack Role
color: "003EFF"
description: "This is a Rack Role test"
state: present
register: test_three

Expand All @@ -61,6 +62,7 @@
- test_three['rack_role']['name'] == "Rack Role"
- test_three['rack_role']['slug'] == "rack-role"
- test_three['rack_role']['color'] == "003eff"
- test_three['rack_role']['description'] == "This is a Rack Role test"
- test_three['msg'] == "rack_role Rack Role updated"

- name: "RACK_ROLE 4: Delete"
Expand Down

0 comments on commit 57fe0ef

Please sign in to comment.