mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
087855ec00
* deps: update module github.com/gophercloud/gophercloud to v2 * update module github.com/gophercloud/utils to v2 and add context Signed-off-by: Daniel Weiße <dw@edgeless.systems> --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Weiße <dw@edgeless.systems>
39 lines
1.1 KiB
Go
39 lines
1.1 KiB
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/v2/openstack/compute/v2/servers"
|
|
"github.com/gophercloud/gophercloud/v2/openstack/networking/v2/networks"
|
|
"github.com/gophercloud/gophercloud/v2/openstack/networking/v2/subnets"
|
|
"github.com/gophercloud/gophercloud/v2/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)
|
|
loadBalancerEndpoint(ctx context.Context) (string, error)
|
|
}
|
|
|
|
type serversAPI interface {
|
|
ListServers(opts servers.ListOptsBuilder) pagerAPI
|
|
ListNetworks(opts networks.ListOptsBuilder) pagerAPI
|
|
ListSubnets(opts subnets.ListOpts) pagerAPI
|
|
}
|
|
|
|
type pagerAPI interface {
|
|
AllPages(context.Context) (pagination.Page, error)
|
|
}
|