openstack

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountKey

type AccountKey struct {
	AuthURL           string
	Username          string
	Password          string
	ProjectID         string
	ProjectName       string
	UserDomainName    string
	ProjectDomainName string
	RegionName        string
}

AccountKey is a OpenStack account key.

func AccountKeyFromURI

func AccountKeyFromURI(serviceAccountURI string) (AccountKey, error)

AccountKeyFromURI parses ServiceAccountKey from URI.

func (AccountKey) CloudINI

func (k AccountKey) CloudINI() CloudINI

CloudINI converts the AccountKey into a CloudINI.

func (AccountKey) ToCloudServiceAccountURI

func (k AccountKey) ToCloudServiceAccountURI() string

ToCloudServiceAccountURI converts the AccountKey into a cloud service account URI.

type CloudINI

type CloudINI struct {
	AuthURL          string `` /* 141-byte string literal not displayed */
	Username         string `name:"os-userName" value:"optional" dependsOn:"os-password"`
	Password         string `name:"os-password" value:"optional" dependsOn:"os-domainID|os-domainName,os-projectID|os-projectName,os-userID|os-userName"`
	ProjectID        string `gcfg:"project-id" mapstructure:"project-id" name:"os-projectID" value:"optional" dependsOn:"os-password|os-clientCertPath"`
	TenantName       string `` /* 127-byte string literal not displayed */
	UserDomainName   string `gcfg:"user-domain-name" mapstructure:"user-domain-name" name:"os-userDomainName" value:"optional"`
	TenantDomainName string `gcfg:"tenant-domain-name" mapstructure:"project-domain-name" name:"os-projectDomainName" value:"optional"`
	Region           string `name:"os-region"`
}

CloudINI is a struct that represents the cloud.ini file used by OpenStack k8s deployments.

func (CloudINI) CinderCSIConfiguration added in v2.8.0

func (i CloudINI) CinderCSIConfiguration() string

CinderCSIConfiguration returns the string representation of the CloudINI subset cinder expects.

func (CloudINI) FullConfiguration added in v2.8.0

func (i CloudINI) FullConfiguration() string

FullConfiguration returns the string representation of the full CloudINI.

func (CloudINI) YawolConfiguration added in v2.8.0

func (i CloudINI) YawolConfiguration() string

YawolConfiguration returns the string representation of the CloudINI subset yawol expects.

type MetadataClient added in v2.16.1

type MetadataClient struct {
	// contains filtered or unexported fields
}

MetadataClient is the metadata client for OpenStack.

func New

func New(ctx context.Context) (*MetadataClient, error)

New creates a new OpenStack metadata client.

func (*MetadataClient) GetLoadBalancerEndpoint added in v2.16.1

func (c *MetadataClient) GetLoadBalancerEndpoint(ctx context.Context) (host, port string, err error)

GetLoadBalancerEndpoint returns the endpoint of the load balancer. For OpenStack, the load balancer is a floating ip attached to a control plane node. TODO(malt3): Rewrite to use real load balancer once it is available.

func (*MetadataClient) InitSecretHash added in v2.16.1

func (c *MetadataClient) InitSecretHash(ctx context.Context) ([]byte, error)

InitSecretHash retrieves the InitSecretHash of the current instance.

func (*MetadataClient) List added in v2.16.1

List returns the metadata of all instances belonging to the same Constellation cluster.

func (*MetadataClient) Self added in v2.16.1

Self returns the metadata of the current instance.

func (*MetadataClient) UID added in v2.16.1

func (c *MetadataClient) UID(ctx context.Context) (string, error)

UID retrieves the UID of the constellation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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