From f7df5ff1145d9a056df2fc914da3bb2ac3c62fea Mon Sep 17 00:00:00 2001 From: mwilliams-mex <52012938+mwilliams-mex@users.noreply.github.com> Date: Tue, 27 Apr 2021 14:15:16 -0700 Subject: [PATCH] EDGECLOUD-4853 test vapp has VM[0] before asking for vapp con sec (#1460) --- crm-platforms/vcd/vcd.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crm-platforms/vcd/vcd.go b/crm-platforms/vcd/vcd.go index 54e352d6d..7beaf657a 100644 --- a/crm-platforms/vcd/vcd.go +++ b/crm-platforms/vcd/vcd.go @@ -354,6 +354,9 @@ func (v *VcdPlatform) GetAllVAppsForVdcByIntAddr(ctx context.Context, vcdClient if v.Verbose { log.SpanLog(ctx, log.DebugLevelInfra, "GetAllVappsByIntAddr consider ", "vapp", res.Name) } + if vapp.VApp.Children == nil || len(vapp.VApp.Children.VM) == 0 { + continue + } ncs, err := vapp.GetNetworkConnectionSection() if err != nil { log.SpanLog(ctx, log.DebugLevelInfra, "GetAllVappsByIntAddr ", "error", err)