mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-11 00:44:20 -05:00
acbd70c741
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
36 lines
915 B
Go
36 lines
915 B
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
package openstack
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/edgelesssys/constellation/v2/internal/role"
|
|
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
|
|
"github.com/gophercloud/gophercloud/openstack/networking/v2/subnets"
|
|
"github.com/gophercloud/gophercloud/pagination"
|
|
)
|
|
|
|
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)
|
|
}
|
|
|
|
type serversAPI interface {
|
|
ListServers(opts servers.ListOptsBuilder) pagerAPI
|
|
ListSubnets(opts subnets.ListOpts) pagerAPI
|
|
}
|
|
|
|
type pagerAPI interface {
|
|
AllPages() (pagination.Page, error)
|
|
}
|