From 69cdb39f8cafea6d029c20f269ddb646d36ec175 Mon Sep 17 00:00:00 2001 From: adisos Date: Thu, 9 Nov 2023 17:00:48 +0200 Subject: [PATCH] update fip warning msg Signed-off-by: adisos --- pkg/ibmvpc/parser.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/ibmvpc/parser.go b/pkg/ibmvpc/parser.go index a15514230..6eaf64843 100644 --- a/pkg/ibmvpc/parser.go +++ b/pkg/ibmvpc/parser.go @@ -516,8 +516,8 @@ func getPgwConfig( return nil } -func ignoreFIPWarning(fipName string) string { - return "warning: ignoring floatingIP " + fipName +func ignoreFIPWarning(fipName, details string) string { + return fmt.Sprintf("warning: ignoring floatingIP %s: %s", fipName, details) } func getFipConfig( @@ -533,12 +533,14 @@ func getFipConfig( targetUID = *target.PrimaryIP.ID case *vpc1.FloatingIPTarget: if *target.ResourceType != networkInterfaceResourceType { - fmt.Println(ignoreFIPWarning(*fip.Name)) + fmt.Println(ignoreFIPWarning(*fip.Name, + fmt.Sprintf("target.ResourceType %s is not supported (only networkInterfaceResourceType supported)", + *target.ResourceType))) continue } targetUID = *target.PrimaryIP.ID default: - fmt.Println(ignoreFIPWarning(*fip.Name)) + fmt.Println(ignoreFIPWarning(*fip.Name, "target (FloatingIPTargetIntf) is not of the expected type")) continue }