openstack

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func New

func New(opts *Options) (*API, error)

func (*API) AddKey

func (a *API) AddKey(name, key string) error

func (*API) CreateServer

func (a *API) CreateServer(name, sshKeyID, userdata string) (*Server, error)

func (*API) DeleteImage

func (a *API) DeleteImage(imageID string, force bool) error

func (*API) DeleteKey

func (a *API) DeleteKey(name string) error

func (*API) DeleteServer

func (a *API) DeleteServer(id string) error

Deletes the server, and disassociates & deletes any floating IP associated with the given server.

func (*API) GC

func (a *API) GC(gracePeriod time.Duration) error

func (*API) GetConsoleOutput

func (a *API) GetConsoleOutput(id string) (string, error)

func (*API) PreflightCheck

func (a *API) PreflightCheck() error

func (*API) ResolveImage

func (a *API) ResolveImage(img string) (string, error)

func (*API) UploadImage

func (a *API) UploadImage(name, path, arch, visibility string, protected bool) (string, error)

type Options

type Options struct {
	*platform.Options

	// Config file. The path to a clouds.yaml file.
	ConfigPath string
	// Profile name
	Profile string

	// Region (e.g. "regionOne")
	Region string
	// Instance Flavor ID
	Flavor string
	// Image ID
	Image string
	// Network ID
	Network string
	// Domain ID
	Domain string
	// Network to use when creating a Floating IP
	FloatingIPNetwork string
}

func (Options) LoadCloudsYAML

func (opts Options) LoadCloudsYAML() (map[string]clientconfig.Cloud, error)

LoadCloudsYAML defines how to load a clouds.yaml file. By default, this calls the local LoadCloudsYAML function. See https://github.com/gophercloud/utils/blob/master/openstack/clientconfig/requests.go

func (Options) LoadPublicCloudsYAML

func (opts Options) LoadPublicCloudsYAML() (map[string]clientconfig.Cloud, error)

LoadPublicCloudsYAML defines how to load a public-secure.yaml file. By default, this calls the local LoadPublicCloudsYAML function.

func (Options) LoadSecureCloudsYAML

func (opts Options) LoadSecureCloudsYAML() (map[string]clientconfig.Cloud, error)

LoadSecureCloudsYAML defines how to load a secure.yaml file. By default, this calls the local LoadSecureCloudsYAML function.

type Server

type Server struct {
	Server     *servers.Server
	FloatingIP *networkFloatingIPs.FloatingIP
}

Jump to

Keyboard shortcuts

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