From e53d03fe1652724df743189102241eafec4db8e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 20 Aug 2024 21:55:56 +0200 Subject: [PATCH] compute/gcp: add guest OS features for el10/c10s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Hozza --- internal/cloud/gcp/compute.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/cloud/gcp/compute.go b/internal/cloud/gcp/compute.go index bb922c62d..f64aa0b9e 100644 --- a/internal/cloud/gcp/compute.go +++ b/internal/cloud/gcp/compute.go @@ -50,6 +50,9 @@ var GuestOsFeaturesRHEL90 []*computepb.GuestOsFeature = []*computepb.GuestOsFeat {Type: common.ToPtr(computepb.GuestOsFeature_GVNIC.String())}, } +// Guest OS Features for RHEL-10 images. +var GuestOsFeaturesRHEL10 []*computepb.GuestOsFeature = GuestOsFeaturesRHEL9 + // GuestOsFeaturesByDistro returns the the list of Guest OS Features, which // should be used when importing an image of the specified distribution. // @@ -62,8 +65,10 @@ func GuestOsFeaturesByDistro(distroName string) []*computepb.GuestOsFeature { case strings.HasPrefix(distroName, "rhel-8"): return GuestOsFeaturesRHEL8 + // TODO: this should be updated for the dot-notation case distroName == "rhel-90": return GuestOsFeaturesRHEL90 + // TODO: this should be updated for the dot-notation case distroName == "rhel-91": return GuestOsFeaturesRHEL91 case strings.HasPrefix(distroName, "centos-9"): @@ -71,6 +76,11 @@ func GuestOsFeaturesByDistro(distroName string) []*computepb.GuestOsFeature { case strings.HasPrefix(distroName, "rhel-9"): return GuestOsFeaturesRHEL9 + case strings.HasPrefix(distroName, "centos-10"): + fallthrough + case strings.HasPrefix(distroName, "rhel-10"): + return GuestOsFeaturesRHEL10 + default: return nil }