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

vmware_dvswitch_pvlans: The VLAN ID type has been updated to be handled as an integer #2267

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions changelogs/fragments/2216-vmware_dvswitch_pvlans.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
major_changes:
- vmware_dvswitch_pvlans - The VLAN ID type has been updated to be handled as an integer
(https://github.com/ansible-collections/community.vmware/pull/2267).
37 changes: 34 additions & 3 deletions plugins/modules/vmware_dvswitch_pvlans.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
type: list
default: []
elements: dict
suboptions:
primary_pvlan_id:
description:
- The primary VLAN ID.
- The VLAN IDs of 0 and 4095 are reserved and cannot be used in this option.
type: int
secondary_pvlans:
description:
- A list of VLAN IDs that should be configured as Secondary PVLANs.
Expand All @@ -46,9 +52,26 @@
type: list
default: []
elements: dict
suboptions:
primary_pvlan_id:
description:
- The primary VLAN ID.
- The VLAN IDs of 0 and 4095 are reserved and cannot be used in this option.
type: int
secondary_pvlan_id:
description:
- The type of PVLAN.
type: int
pvlan_type:
description:
- The secondary VLAN ID.
- The VLAN IDs of 0 and 4095 are reserved and cannot be used in this option.
choices:
- community
- isolated
type: str
extends_documentation_fragment:
- community.vmware.vmware.documentation

'''

EXAMPLES = r'''
Expand Down Expand Up @@ -509,8 +532,16 @@ def main():
argument_spec.update(
dict(
switch=dict(required=True, aliases=['dvswitch']),
primary_pvlans=dict(type='list', default=list(), elements='dict'),
secondary_pvlans=dict(type='list', default=list(), elements='dict'),
primary_pvlans=dict(type='list', default=list(), elements='dict',
options=dict(
primary_pvlan_id=dict(type='int')
)),
secondary_pvlans=dict(type='list', default=list(), elements='dict',
options=dict(
primary_pvlan_id=dict(type='int'),
secondary_pvlan_id=dict(type='int'),
pvlan_type=dict(type='str', choices=['community', 'isolated'])
)),
)
)

Expand Down
Loading