mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-10 07:50:08 -04:00
openstack: implement api client and metadata list
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
418f08bf40
commit
acbd70c741
9 changed files with 833 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue