diff --git a/plugins/modules/vmware_dvs_portgroup.py b/plugins/modules/vmware_dvs_portgroup.py index f3fd293e53..11a0418a74 100644 --- a/plugins/modules/vmware_dvs_portgroup.py +++ b/plugins/modules/vmware_dvs_portgroup.py @@ -111,24 +111,19 @@ description: - Dictionary which configures the different security values for portgroup. suboptions: + inherited: + type: bool + description: Inherit the settings from the switch or not. promiscuous: type: bool - description: Indicates whether promiscuous mode is allowed. - default: False + description: Indicates whether promiscuous mode is allowed. Ignored if C(inherited) is true. forged_transmits: type: bool - description: Indicates whether forged transmits are allowed. - default: False + description: Indicates whether forged transmits are allowed. Ignored if C(inherited) is true. mac_changes: type: bool - description: Indicates whether mac changes are allowed. - default: False + description: Indicates whether mac changes are allowed. Ignored if C(inherited) is true. required: False - default: { - promiscuous: False, - forged_transmits: False, - mac_changes: False, - } type: dict teaming_policy: description: @@ -855,15 +850,14 @@ def main(): network_policy=dict( type='dict', options=dict( - promiscuous=dict(type='bool', default=False), - forged_transmits=dict(type='bool', default=False), - mac_changes=dict(type='bool', default=False) + inherited=dict(type='bool'), + promiscuous=dict(type='bool'), + forged_transmits=dict(type='bool'), + mac_changes=dict(type='bool') ), - default=dict( - promiscuous=False, - forged_transmits=False, - mac_changes=False - ) + required_if=[ + ('inherited', False, ('promiscuous', 'forged_transmits', 'mac_changes')) + ], ), in_traffic_shaping=dict( type='dict',