The filter to retrieve the networks with the target VDC was wrong, as it was using ownerRef.id instead of orgVdc.id:
UI plugin uses orgVdc.id and _context==includeAccessible so this patch mimics this logic here
The problem was, when the network is from an Edge Gateway that belongs to a VDC Group, the ownerRef.id is not a VDC anymore (urn:vcloud:vdc), but a VDC Group (urn:vcloud:vdcGroup). Hence the filter returned 0 networks with the desired VDC ID.
Related to https://github.com/vmware/terraform-provider-vcd/issues/1258, fixing it in PR https://github.com/vmware/terraform-provider-vcd/pull/1266
The filter to retrieve the networks with the target VDC was wrong, as it was using
ownerRef.id
instead oforgVdc.id
:orgVdc.id
and_context==includeAccessible
so this patch mimics this logic hereownerRef.id
is not a VDC anymore (urn:vcloud:vdc
), but a VDC Group (urn:vcloud:vdcGroup
). Hence the filter returned 0 networks with the desired VDC ID.CSE tests passed in VCD 10.5.1 with CSE 4.2.1