openstack

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 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) 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 string) (string, error)

type Options

type Options struct {
	*platform.Options

	// Config file. Defaults to $HOME/.config/openstack.json.
	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
	// Floating IP Pool
	FloatingIPPool string
	// Host can be used to optionally SSH into deployed VMs from the OpenStack host
	Host string
	// User is the one used for the SSH connection to the Host
	User string
	// Keyfile is the abs. path to private SSH key file for the User on the Host
	Keyfile string
}

type Server

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

Jump to

Keyboard shortcuts

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