mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
VMware: Add folder option for vmware_dvswitch (#56707)
* Added folder param * Mark datacenter as optional parameter * Updated docs * Updated tests Fixes: #54986 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -5,9 +5,8 @@
|
||||
- import_role:
|
||||
name: prepare_vmware_tests
|
||||
|
||||
# Testcase 0001: Add Distributed vSwitch
|
||||
- &dvs_data
|
||||
name: add distributed vSwitch
|
||||
name: Add distributed vSwitch
|
||||
vmware_dvswitch:
|
||||
validate_certs: False
|
||||
hostname: "{{ vcenter_hostname }}"
|
||||
@@ -22,12 +21,31 @@
|
||||
discovery_operation: both
|
||||
register: dvs_result_0001
|
||||
|
||||
- name: ensure distributed vswitch is present
|
||||
- name: Ensure distributed vswitch is present
|
||||
assert:
|
||||
that:
|
||||
- dvs_result_0001.changed
|
||||
|
||||
# Testcase 0002: Add Distributed vSwitch again
|
||||
- name: Add distributed vSwitch using folder
|
||||
vmware_dvswitch:
|
||||
validate_certs: False
|
||||
hostname: "{{ vcenter_hostname }}"
|
||||
username: "{{ vcenter_username }}"
|
||||
password: "{{ vcenter_password }}"
|
||||
folder: "/F0/{{ dc1 }}/network/F0"
|
||||
state: present
|
||||
switch_name: dvswitch_0002
|
||||
mtu: 9000
|
||||
uplink_quantity: 2
|
||||
discovery_proto: lldp
|
||||
discovery_operation: both
|
||||
register: dvs_result_0002
|
||||
|
||||
- name: Ensure distributed vswitch is present
|
||||
assert:
|
||||
that:
|
||||
- dvs_result_0002.changed
|
||||
|
||||
# vcsim doesn't support ldp check (self.dvs.config.linkDiscoveryProtocolConfig.protocol)
|
||||
- when: vcsim is not defined
|
||||
block:
|
||||
@@ -40,7 +58,6 @@
|
||||
that:
|
||||
- not dvs_result_0002.changed
|
||||
|
||||
|
||||
# FIXME: Remove this testcase from block once vcsim supports distributed vswitch delete method
|
||||
# Currently, vcsim does not support distributed vswitch delete option,
|
||||
# Once this feature is available we can move this out of this block
|
||||
|
||||
Reference in New Issue
Block a user