Skip to content

Commit

Permalink
update fip warning msg
Browse files Browse the repository at this point in the history
Signed-off-by: adisos <[email protected]>
  • Loading branch information
adisos committed Nov 9, 2023
1 parent 200ec31 commit 69cdb39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/ibmvpc/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
}

Expand Down

0 comments on commit 69cdb39

Please sign in to comment.