mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-03 14:54:53 -04:00
openstack: find node CIDR with multiple subnets
This commit is contained in:
parent
d8185fdafb
commit
31f65fb486
6 changed files with 124 additions and 36 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/edgelesssys/constellation/v2/internal/role"
|
||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
|
||||
"github.com/gophercloud/gophercloud/openstack/networking/v2/networks"
|
||||
"github.com/gophercloud/gophercloud/openstack/networking/v2/subnets"
|
||||
"github.com/gophercloud/gophercloud/pagination"
|
||||
)
|
||||
|
@ -62,6 +63,7 @@ func (c *stubIMDSClient) vpcIP(_ context.Context) (string, error) {
|
|||
|
||||
type stubServersClient struct {
|
||||
serversPager stubPager
|
||||
netsPager stubPager
|
||||
subnetsPager stubPager
|
||||
}
|
||||
|
||||
|
@ -69,6 +71,10 @@ func (c *stubServersClient) ListServers(_ servers.ListOptsBuilder) pagerAPI {
|
|||
return &c.serversPager
|
||||
}
|
||||
|
||||
func (c *stubServersClient) ListNetworks(_ networks.ListOptsBuilder) pagerAPI {
|
||||
return &c.netsPager
|
||||
}
|
||||
|
||||
func (c *stubServersClient) ListSubnets(_ subnets.ListOpts) pagerAPI {
|
||||
return &c.subnetsPager
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue