mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 06:40:03 -07:00
Improve vmware_dvswitch module (#48720)
This commit is contained in:
parent
93fd323457
commit
68cafbda2b
2 changed files with 642 additions and 148 deletions
|
@ -78,27 +78,28 @@
|
|||
|
||||
|
||||
# Testcase 0002: Add Distributed vSwitch again
|
||||
- name: add distributed vSwitch again
|
||||
vmware_dvswitch:
|
||||
validate_certs: False
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance['json']['username'] }}"
|
||||
password: "{{ vcsim_instance['json']['password'] }}"
|
||||
datacenter_name: "{{ item | basename }}"
|
||||
state: present
|
||||
switch_name: dvswitch_0001
|
||||
mtu: 9000
|
||||
uplink_quantity: 2
|
||||
discovery_proto: lldp
|
||||
discovery_operation: both
|
||||
register: dvs_result_0002
|
||||
with_items:
|
||||
- "{{ datacenters['json'] }}"
|
||||
|
||||
- name: ensure distributed vswitch is present
|
||||
assert:
|
||||
that:
|
||||
- "{{ dvs_result_0002.changed == false }}"
|
||||
# vcsim doesn't support ldp check (self.dvs.config.linkDiscoveryProtocolConfig.protocol)
|
||||
# - name: add distributed vSwitch again
|
||||
# vmware_dvswitch:
|
||||
# validate_certs: False
|
||||
# hostname: "{{ vcsim }}"
|
||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
||||
# datacenter_name: "{{ item | basename }}"
|
||||
# state: present
|
||||
# switch_name: dvswitch_0001
|
||||
# mtu: 9000
|
||||
# uplink_quantity: 2
|
||||
# discovery_proto: lldp
|
||||
# discovery_operation: both
|
||||
# register: dvs_result_0002
|
||||
# with_items:
|
||||
# - "{{ datacenters['json'] }}"
|
||||
#
|
||||
# - name: ensure distributed vswitch is present
|
||||
# assert:
|
||||
# that:
|
||||
# - "{{ dvs_result_0002.changed == false }}"
|
||||
|
||||
|
||||
# FIXME: Uncomment this testcase once vcsim supports distributed vswitch delete method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue