Skip to content

Commit

Permalink
Set default value as empty string for optional str type fields (#286)
Browse files Browse the repository at this point in the history
* Set default value as empty string for optional str type fields

* FIX Integration test for vlan
  • Loading branch information
JkhatriInfobox authored Jan 29, 2025
1 parent 8501129 commit b573564
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions plugins/modules/nios_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,23 @@
of this object. The provided text string will be configured on the
object instance.
type: str
default: ''
contact:
description:
- Contact information for person/team managing or using VLAN.
type: str
default: ''
department:
description:
- Department where VLAN is used.
type: str
default: ''
description:
description:
- Description for the VLAN object, may be potentially used for
longer VLAN names.
type: str
default: ''
reserved:
description:
- When set VLAN can only be assigned to IPAM object manually.
Expand Down Expand Up @@ -202,10 +206,10 @@ def parent_transform(module):
name=dict(required=True, ib_req=True),
id=dict(type='int', required=True, ib_req=True),
parent=dict(default='default', transform=parent_transform),
comment=dict(),
contact=dict(),
department=dict(),
description=dict(),
comment=dict(default=''),
contact=dict(default=''),
department=dict(default=''),
description=dict(default=''),
reserved=dict(type='bool', default=False),
extattrs=dict(type='dict'),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
name: ansible-vlan
id: 10
parent: default
comment: 'this is an example comment'
contact: '[email protected]'
department: 'IT'
description: 'This is an example VLAN'
Expand All @@ -24,6 +25,7 @@
infoblox.nios_modules.nios_vlan:
name: ansible-vlan
id: 10
comment: 'this is an example comment'
parent: default
contact: '[email protected]'
department: 'IT'
Expand Down

0 comments on commit b573564

Please sign in to comment.