client

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
}

type OpenstackClient

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

func NewClient

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

func (*OpenstackClient) CreateServerFromImage

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

CreateServerFromImage creates a new server from an image.

func (*OpenstackClient) CreateServerFromVolume

func (o *OpenstackClient) CreateServerFromVolume(ctx context.Context, createOpts servers.CreateOpts, name string) (srv ServerWithExt, err error)

CreateServerFromVolume creates a new server from a volume.

func (*OpenstackClient) DeleteServer

func (o *OpenstackClient) DeleteServer(ctx context.Context, 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(ctx context.Context, nameOrId string) (*flavors.Flavor, error)

GetFlavor resolves a flavor name or ID to a flavor.

func (*OpenstackClient) GetImage

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

GetImage gets details of an image passed in by ID.

func (*OpenstackClient) GetNetwork

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

GetNetwork returns network details

func (*OpenstackClient) GetServer

func (o *OpenstackClient) GetServer(ctx context.Context, nameOrId string) (ServerWithExt, error)

GetServer creates a new server.

func (*OpenstackClient) ListServers

func (o *OpenstackClient) ListServers(ctx context.Context, poolID string) ([]ServerWithExt, error)

ListServers creates a new server.

func (*OpenstackClient) ListServersWithNameOrID

func (o *OpenstackClient) ListServersWithNameOrID(ctx context.Context, 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(ctx context.Context, tags []string) ([]ServerWithExt, error)

func (*OpenstackClient) StartServer

func (o *OpenstackClient) StartServer(ctx context.Context, nameOrID string) error

func (*OpenstackClient) StopServer

func (o *OpenstackClient) StopServer(ctx context.Context, nameOrID string) error

type ServerWithExt

type ServerWithExt struct {
	servers.Server
}

Jump to

Keyboard shortcuts

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