From 33eddc74e10b49867f011d9dfced0627c9bb97e5 Mon Sep 17 00:00:00 2001 From: Malte Poll Date: Fri, 17 Mar 2023 09:27:27 +0100 Subject: [PATCH] debugd: add OpenStack support --- debugd/cmd/debugd/BUILD.bazel | 1 + debugd/cmd/debugd/debugd.go | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debugd/cmd/debugd/BUILD.bazel b/debugd/cmd/debugd/BUILD.bazel index 6e6e1b8bd..aaa3b4cf9 100644 --- a/debugd/cmd/debugd/BUILD.bazel +++ b/debugd/cmd/debugd/BUILD.bazel @@ -20,6 +20,7 @@ go_library( "//internal/cloud/azure", "//internal/cloud/cloudprovider", "//internal/cloud/gcp", + "//internal/cloud/openstack", "//internal/cloud/qemu", "//internal/logger", "@com_github_spf13_afero//:afero", diff --git a/debugd/cmd/debugd/debugd.go b/debugd/cmd/debugd/debugd.go index 73a84bd95..652b29baf 100644 --- a/debugd/cmd/debugd/debugd.go +++ b/debugd/cmd/debugd/debugd.go @@ -27,6 +27,7 @@ import ( azurecloud "github.com/edgelesssys/constellation/v2/internal/cloud/azure" platform "github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider" gcpcloud "github.com/edgelesssys/constellation/v2/internal/cloud/gcp" + openstackcloud "github.com/edgelesssys/constellation/v2/internal/cloud/openstack" qemucloud "github.com/edgelesssys/constellation/v2/internal/cloud/qemu" "github.com/edgelesssys/constellation/v2/internal/logger" "github.com/spf13/afero" @@ -81,9 +82,12 @@ func main() { defer meta.Close() fetcher = cloudprovider.New(meta) - // TODO(malt3): implement OpenStack - // case platform.OpenStack: - + case platform.OpenStack: + meta, err := openstackcloud.New(ctx) + if err != nil { + log.With(zap.Error(err)).Fatalf("Failed to initialize OpenStack metadata") + } + fetcher = cloudprovider.New(meta) case platform.QEMU: fetcher = cloudprovider.New(qemucloud.New())