openstack: implement api client and metadata list

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-03-07 11:37:25 +01:00
parent 418f08bf40
commit acbd70c741
9 changed files with 833 additions and 1 deletions

View file

@ -10,6 +10,9 @@ 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 {
@ -21,3 +24,12 @@ type imdsAPI interface {
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)
}