client

package
v0.0.0-...-b915449 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenstackClient

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

func NewClient

func NewClient(cfg *config.Config, controllerID string) (*OpenstackClient, error)

func (*OpenstackClient) CreateServerFromImage

func (o *OpenstackClient) CreateServerFromImage(createOpts servers.CreateOpts) (srv ServerWithExt, err error)

CreateServerFromImage creates a new server from an image.

func (*OpenstackClient) CreateServerFromVolume

func (o *OpenstackClient) CreateServerFromVolume(createOpts bootfromvolume.CreateOptsExt, name string) (srv ServerWithExt, err error)

CreateServerFromVolume creates a new server from a volume.

func (*OpenstackClient) DeleteServer

func (o *OpenstackClient) DeleteServer(nameOrID string, waitForDelete bool) error

DeleteServer server deletes servers that match nameOrID. Warning: If a name is passed in, all servers with the same name, that match the controller ID set in the tags, will be deleted

func (*OpenstackClient) GetFlavor

func (o *OpenstackClient) GetFlavor(nameOrId string) (*flavors.Flavor, error)

GetFlavor resolves a flavor name or ID to a flavor.

func (*OpenstackClient) GetImage

func (o *OpenstackClient) GetImage(nameOrID, imageVisibility string) (*images.Image, error)

GetImage gets details of an image passed in by ID.

func (*OpenstackClient) GetNetwork

func (o *OpenstackClient) GetNetwork(nameOrID string) (*networks.Network, error)

GetNetwork returns network details

func (*OpenstackClient) GetServer

func (o *OpenstackClient) GetServer(nameOrId string) (ServerWithExt, error)

GetServer creates a new server.

func (*OpenstackClient) ListServers

func (o *OpenstackClient) ListServers(poolID string) ([]ServerWithExt, error)

ListServers creates a new server.

func (*OpenstackClient) ListServersWithNameOrID

func (o *OpenstackClient) ListServersWithNameOrID(nameOrId string) ([]ServerWithExt, error)

ListServersWithNameOrID will return an array of servers that match a name or ID. When passing in an ID, there is no chance that this function will return an array larger than one element. When passing in a name, the function may return an array larger than 1 element.

func (*OpenstackClient) ListServersWithTags

func (o *OpenstackClient) ListServersWithTags(tags []string) ([]ServerWithExt, error)

func (*OpenstackClient) StartServer

func (o *OpenstackClient) StartServer(nameOrID string) error

func (*OpenstackClient) StopServer

func (o *OpenstackClient) StopServer(nameOrID string) error

Jump to

Keyboard shortcuts

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