If the OVDC network is a DC group network, vdc.GetNsxtEdgeGatewayByName(edgeGatewayName) will return "EntityNotFound" error. This is because the govcd function will internally filter with "ownerRef.id=="+vdc.Vdc.ID and the ownerRef.id in case of a DC group network is the ID of the DC group.
The solution used in this PR is to use the org GoVCD object to fetch the edgeGateway object.
Testing: Used this code in CAPVCD and saw that a right response is given for IsUsingIPSpace() function
If the OVDC network is a DC group network,
vdc.GetNsxtEdgeGatewayByName(edgeGatewayName)
will return "EntityNotFound" error. This is because the govcd function will internally filter with"ownerRef.id=="+vdc.Vdc.ID
and theownerRef.id
in case of a DC group network is the ID of the DC group.The solution used in this PR is to use the
org
GoVCD object to fetch theedgeGateway
object.Testing: Used this code in CAPVCD and saw that a right response is given for
IsUsingIPSpace()
function