Description of problem: If a RHV VM's NIC has both IPv4 and IPv6 addresses, they are visible correctly as: $evm.root['vm'].hardware.ipaddresses = ["10.19.137.131", "fe80::bcef:feff:feed:1cc", "2620:52:0:1388:bcef:feff:feed:1cc"] (type: Array) However these 3 addresses are each represented as hardware.network objects, and appear to store the addresses incorrectly: $evm.root['vm'].hardware.network[0].ipaddress = 10.19.137.131 $evm.root['vm'].hardware.network[0].ipv6address = nil $evm.root['vm'].hardware.network[1].ipaddress = fe80::bcef:feff:feed:1cc $evm.root['vm'].hardware.network[1].ipv6address = nil $evm.root['vm'].hardware.network[2].ipaddress = 2620:52:0:1388:bcef:feff:feed:1cc $evm.root['vm'].hardware.network[2].ipv6address = nil By contrast a VMware VM stores the details differently in a single hardware.network object $evm.root['vm'].hardware.ipaddresses = ["10.39.167.137", "2620:52:0:27a7:250:56ff:febf:84a2"] $evm.root['vm'].hardware.network[0].ipaddress = 10.39.167.137 $evm.root['vm'].hardware.network[0].ipv6address = 2620:52:0:27a7:250:56ff:febf:84a2 Version-Release number of selected component (if applicable): 5.8.2.3 How reproducible: Every time Steps to Reproduce: 1. Find a RHV VM that contains both an IPv4 and IP6 address 2. Examine the $evm.root['vm'].hardware.networks association from automate Actual results: The IPv6 addresses is stored as an ipaddresses attribute and the ipv6address attribute is nil Expected results: The IPv6 addresses should be stored as an ipv6address attribute Additional info: For consistency between providers we should have a predictable number of hardware.network objects per NIC, either 1 for each address as currently in RHV, or one for the NIC as currently in VMware. Currently it seems to be implemented differently for providers which can create ambiguity when trying to access the details from automate.
Hi Peter, I changed the rhev implementation to be consistent with the vmware one. Please notice the same nic can have multiple ipv4/6 addresses. The new representation will be the following (the order is determined by alphabetic sort)- $evm.root['vm'].hardware.ipaddresses = ["10.19.137.131", "fe80::bcef:feff:feed:1cc", "2620:52:0:1388:bcef:feff:feed:1cc"] $evm.root['vm'].hardware.network[0].ipaddress = 10.19.137.131 $evm.root['vm'].hardware.network[0].ipv6address = 2620:52:0:1388:bcef:feff:feed:1cc $evm.root['vm'].hardware.network[1].ipaddress = nil $evm.root['vm'].hardware.network[1].ipv6address = fe80::bcef:feff:feed:1cc Please notice that the guest device can have only one network. So it will link only to the first network. The second network won't have guest device. $evm.root['vm'].hardware.guest_devices[?].network = $evm.root['vm'].hardware.network[0]
looks good
Peter, one more question. It was fixed for regular refresh v4 and graph refresh. Should regular refresh v3 be fixed as well?
Hi Ideally yes, it should be fixed for v3 as well. Thanks
The fix was merged without v3. Fixing v3 has lower priority, if you think it worth it, please open a separate bug.