openstack: implement imds and metadata self

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-03-07 11:37:08 +01:00
parent 630016d1b3
commit 418f08bf40
6 changed files with 890 additions and 0 deletions

View file

@ -0,0 +1,23 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package openstack
import (
"context"
"github.com/edgelesssys/constellation/v2/internal/role"
)
type imdsAPI interface {
providerID(ctx context.Context) (string, error)
name(ctx context.Context) (string, error)
projectID(ctx context.Context) (string, error)
uid(ctx context.Context) (string, error)
initSecretHash(ctx context.Context) (string, error)
role(ctx context.Context) (role.Role, error)
vpcIP(ctx context.Context) (string, error)
}