Open
Description
SUMMARY
Network names with |
inside will be parsed incorrectly with vmware_guest_network
and pyvmomi 7.0.1
.
The network name A|B|C
for example will be parsed to A|7CB|7CC
(seen in the *.vmx
file of the vm under ethernet0.networkName
).
The described behavior does not occur with pyvmomi 7.0
.
ISSUE TYPE
- Bug Report
COMPONENT NAME
vmware_guest_network
ANSIBLE VERSION
ansible 2.9.5
config file = None
configured module search path = [u'/home/%username%/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 7.4.0]
CONFIGURATION
OS / ENVIRONMENT
- pyvmomi version: 7.0.1
- os: Ubuntu 18.04.4 LTS
- vSphere Client version: 6.7.0.44000
STEPS TO REPRODUCE
Try to add a network with a |
inside the name like bellow.
---
- name: vmware_guest_network test
hosts: localhost
gather_facts: no
tasks:
- name: set network
vmware_guest_network:
hostname: hostname
username: username
password: password
validate_certs: no
name: vm-name
networks:
- name: A|B|C
state: new
device_type: vmxnet3
connected: yes
start_connected: yes
delegate_to: localhost
EXPECTED RESULTS
The *.vmx
shows the correct configuration.
ethernet0.virtualDev = "vmxnet3"
ethernet0.dvs.switchId = "10 0e 0e 67 de ce 68 64-5b 7c 4e 5f 1f 09 10 90"
ethernet0.dvs.portId = "1686"
ethernet0.dvs.portgroupId = "dvportgroup-2924"
ethernet0.dvs.connectionId = "1876388225"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:20:56:8a:10:c9"
ethernet0.uptCompatibility = "TRUE"
ethernet0.present = "TRUE"
ACTUAL RESULTS
The |
in the name will be parsed incorrectly and the *.vmx
shows the following output.
ethernet0.virtualDev = "vmxnet3"
ethernet0.networkName = "A|7CB|7CC"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:20:56:8a:10:c9"
ethernet0.uptCompatibility = "TRUE"
ethernet0.present = "TRUE"