From 1a79e72c4044658301aad56966c5067ec9d99a73 Mon Sep 17 00:00:00 2001 From: sky-joker Date: Thu, 5 Dec 2024 23:52:14 +0900 Subject: [PATCH 1/2] The VLAN ID type has been updated to be handled as an integer --- plugins/modules/vmware_dvswitch_pvlans.py | 37 +++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/plugins/modules/vmware_dvswitch_pvlans.py b/plugins/modules/vmware_dvswitch_pvlans.py index 703a19aff..80c01858b 100644 --- a/plugins/modules/vmware_dvswitch_pvlans.py +++ b/plugins/modules/vmware_dvswitch_pvlans.py @@ -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. @@ -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''' @@ -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']) + )), ) ) From 124c37e7c13cc0e735da57b6a168c7ebc3d84bfd Mon Sep 17 00:00:00 2001 From: sky-joker Date: Fri, 6 Dec 2024 00:06:09 +0900 Subject: [PATCH 2/2] Add changelogs of vmware_dvswitch_pvlans --- changelogs/fragments/2216-vmware_dvswitch_pvlans.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/2216-vmware_dvswitch_pvlans.yml diff --git a/changelogs/fragments/2216-vmware_dvswitch_pvlans.yml b/changelogs/fragments/2216-vmware_dvswitch_pvlans.yml new file mode 100644 index 000000000..123a5c385 --- /dev/null +++ b/changelogs/fragments/2216-vmware_dvswitch_pvlans.yml @@ -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).