Help us shape the future of Go! Take the 2026 Go Developer Survey

openstack

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const OpenStackServiceType = "kubernetes"

OpenStackServiceType is the service type for the client (e.g., "compute", "object-store"), as defined by the OpenStack Service Types Authority.

Variables

View Source
var FakeE2EOptions = fakeE2EOptions{}

Functions

func GetDefaultServiceUserRoles

func GetDefaultServiceUserRoles() []string

GetDefaultServiceUserRoles returns the default user roles used for the service users.

func GetFakeE2EClient

func GetFakeE2EClient(ctx context.Context, authOptions gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)

func GetPersephoneEndpoint

func GetPersephoneEndpoint(endpointLocator gophercloud.EndpointLocator, catalogExtractor OpenStackServiceCatalogExtractor, persephoneOpts PersephoneEndpointOpts) (tokens.Endpoint, error)

GetPersephoneEndpoint locates a Persephone endpoint matching the provided search criteria.

Types

type ClientSet

type ClientSet struct {
	// ProviderClient is a provider client.
	ProviderClient *gophercloud.ProviderClient
	// IdentityClient is an identity v3 client.
	IdentityClient *gophercloud.ServiceClient
	// NetworkClient is a network v2 client.
	NetworkClient *gophercloud.ServiceClient

	// DomainID is the OpenStack domain ID.
	DomainID string
}

ClientSet contains multiple OpenStack clients.

func NewClientSet

func NewClientSet(ctx context.Context, providerClient *gophercloud.ProviderClient, domainName string) (*ClientSet, error)

NewClientSet returns a new ClientSet based on the provided provider client and OpenStack domain name.

func (*ClientSet) DeleteClusterServiceUser

func (c *ClientSet) DeleteClusterServiceUser(ctx context.Context, username string) error

DeleteClusterServiceUser deletes the service user created for a specific shoot cluster.

func (*ClientSet) GetUserByName

func (c *ClientSet) GetUserByName(ctx context.Context, username string) (*users.User, error)

GetUserByName returns the *users.User object for the given OpenStack username and domain ID. It returns <nil> if no such user is found, or an error if multiple users are found.

type ClusterUserClientSet

type ClusterUserClientSet struct {
	// ClientSet is the OpenStack ClientSet created for the cluster user.
	ClientSet

	// ProjectID is the ID of the project for the user.
	ProjectID string
	// User is the users.User object for the user.
	User *users.User
}

ClusterUserClientSet is a ClientSet for a specific cluster user (a dedicated OpenStack user created for a Shoot). This cluster user will be used to manage application credentials (that are used for the related shoot cluster).

func NewClusterUserClientSet

func NewClusterUserClientSet(ctx context.Context, clientSet *ClientSet, username, projectID string) (*ClusterUserClientSet, error)

NewClusterUserClientSet creates a new ClusterUserClientSet for the given username and project ID.

func (*ClusterUserClientSet) CreateApplicationCredential

func (c *ClusterUserClientSet) CreateApplicationCredential(ctx context.Context, name string, roleList []string) (*applicationcredentials.ApplicationCredential, error)

CreateApplicationCredential creates new application credentials with the given name and roles.

func (*ClusterUserClientSet) DeleteApplicationCredential

func (c *ClusterUserClientSet) DeleteApplicationCredential(ctx context.Context, id string) error

DeleteApplicationCredential deletes application credentials with the given ID.

func (*ClusterUserClientSet) GetValidApplicationCredential

func (c *ClusterUserClientSet) GetValidApplicationCredential(ctx context.Context, namePrefix string) (*applicationcredentials.ApplicationCredential, error)

GetValidApplicationCredential gets valid application credentials for the given user ID. It filters all existing credentials by the given name prefix. If multiple valid credentials exist, the one with the earliest expiration is returned, provided it does not expire within the next 24 hours. If there is no such credential or no credentials at all for this user, <nil> is returned.

type OpenStackServiceCatalogExtractor

type OpenStackServiceCatalogExtractor func() (*tokens.ServiceCatalog, error)

OpenStackServiceCatalogExtractor extracts/retrieves the entire OpenStack service catalog.

type PersephoneEndpointOpts

type PersephoneEndpointOpts struct {
	// Landscape is a mandatory landscape filter.
	Landscape string
	// Region is an optional region filter.
	Region string
}

PersephoneEndpointOpts specifies search criteria for Persephone in an OpenStack service catalog.

type RegionOpenStackClientSet

type RegionOpenStackClientSet map[string]*ClientSet

RegionOpenStackClientSet is a set of OpenStack clients for multiple regions. The key is the region name, the value is the ClientSet for this region.

func NewRegionOpenStackClientSet

func NewRegionOpenStackClientSet(ctx context.Context, regions map[string]config.RegionalConfig, clusterUsersDomain string) (RegionOpenStackClientSet, error)

NewRegionOpenStackClientSet creates a new RegionOpenStackClientSet for the provided regions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL