icenter

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// cloud-init metadata config
	METADATA string = `
{
    "hostname": "VM_HOST_NAME",
    "launch_index": 0,
    "name":"VM_HOST_NAME",
    "uuid":"VM_UUID"
}
`
	CLOUDINITTYPE string = "OPENSTACK"
)

Variables

This section is empty.

Functions

func CloneVM

func CloneVM(ctx *context.VMContext, userdata string) error

Clone kicks off a clone operation on vCenter to create a new virtual machine. nolint:gocognit

func CreateVM

func CreateVM(ctx *context.VMContext, userdata string) error

func ImportVM

func ImportVM(ctx *context.VMContext, userdata string) error

nolint:gocognit

func UpdateNicIPConfig added in v1.0.2

func UpdateNicIPConfig(ctx *context.VMContext, netSpec *basetypv1.Nic, deviceSpec *infrav1.NetworkDeviceSpec)

Types

type AuthInfo

type AuthInfo struct {
	// Token is a pre-generated authentication token.
	Token string `yaml:"token,omitempty" json:"token,omitempty"`

	// Username is the username of the user.
	Username string `yaml:"username,omitempty" json:"username,omitempty"`

	// Password is the password of the user.
	Password string `yaml:"password,omitempty" json:"password,omitempty"`

	// Credential ID to login with.
	CredentialId string `yaml:"credential_id,omitempty" json:"credential_id,omitempty"`

	// Credential secret to login with.
	CredentialSecret string `yaml:"credential_secret,omitempty" json:"credential_secret,omitempty"`

	// Reauth secret for delete options.
	ReauthSecret string `yaml:"reauth_secret,omitempty" json:"reauth_secret,omitempty"`

	// DomainName is the name of a domain which can be used to identify the
	// user domain.
	DomainName string `yaml:"domain,omitempty" json:"domain,omitempty"`

	// DefaultDomain is the domain ID to fall back on if no other domain has
	// been specified and a domain is required for scope.
	DefaultDomain string `yaml:"default_domain,omitempty" json:"default_domain,omitempty"`

	// Locale is the language of the user.
	Locale string `yaml:"locale,omitempty" json:"locale,omitempty"`

	// DefaultLocale is the default language of the user.
	DefaultLocale string `yaml:"default_locale,omitempty" json:"default_locale,omitempty"`
}

AuthInfo represents the auth section of a icenter entry or auth options entered explicitly in ClientOpts.

type AuthType

type AuthType string

AuthType respresents a valid method of authentication.

const (
	// AuthPassword defines an unknown version of the password
	AuthPassword AuthType = "password"
	// AuthAccessKey defined an unknown version of the accesskey
	AuthAccessKey AuthType = "accesskey"
)

type Clouds

type Clouds struct {
	Clouds map[string]ICenter `yaml:"clouds" json:"clouds"`
}

type ICenter

type ICenter struct {
	Cloud    string    `yaml:"cloud,omitempty" json:"cloud,omitempty"`
	AuthInfo *AuthInfo `yaml:"auth,omitempty" json:"auth,omitempty"`
	AuthType AuthType  `yaml:"auth_type,omitempty" json:"auth_type,omitempty"`

	// ICenterURL is the iCenter endpoint URL.
	ICenterURL string `yaml:"url,omitempty" json:"url,omitempty"`

	APIVersion string `yaml:"api_version,omitempty" json:"api_version,omitempty"`

	// Verify whether or not SSL API requests should be verified.
	Verify *bool `yaml:"verify,omitempty" json:"verify,omitempty"`

	// CACertFile a path to a CA Cert bundle that can be used as part of
	// verifying SSL API requests.
	CACertFile string `yaml:"cacert,omitempty" json:"cacert,omitempty"`

	// ClientCertFile a path to a client certificate to use as part of the SSL
	// transaction.
	ClientCertFile string `yaml:"cert,omitempty" json:"cert,omitempty"`

	// ClientKeyFile a path to a client key to use as part of the SSL
	// transaction.
	ClientKeyFile string `yaml:"key,omitempty" json:"key,omitempty"`
}

Cloud represents an entry in a clouds.yaml/secure.yaml file.

Jump to

Keyboard shortcuts

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