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

Set default value as empty string for optional str type fields #286

Merged
Merged
Show file tree
Hide file tree
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
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
Loading