From 71dfd6c34d261bfd75a28923685252c8d76910f5 Mon Sep 17 00:00:00 2001 From: Enrique Llorente Date: Thu, 4 Jul 2024 17:28:36 +0200 Subject: [PATCH] ipamclaim: Add key composer Signed-off-by: Enrique Llorente --- pkg/claims/claims.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/claims/claims.go b/pkg/claims/claims.go index 8c8a5370..699ecbf2 100644 --- a/pkg/claims/claims.go +++ b/pkg/claims/claims.go @@ -41,3 +41,7 @@ func OwnedByVMLabel(vmiName string) client.MatchingLabels { virtv1.VirtualMachineLabel: vmiName, } } + +func ComposeKey(vmName, networkName string) string { + return fmt.Sprintf("%s.%s", vmName, networkName) +}