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

@ -0,0 +1,26 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package openstack
import (
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
"github.com/gophercloud/gophercloud/openstack/networking/v2/subnets"
)
type apiClient struct {
servers *gophercloud.ServiceClient
subnets *gophercloud.ServiceClient
}
func (c *apiClient) ListServers(opts servers.ListOptsBuilder) pagerAPI {
return servers.List(c.servers, opts)
}
func (c *apiClient) ListSubnets(opts subnets.ListOpts) pagerAPI {
return subnets.List(c.subnets, opts)
}