openstack

package module
v0.0.0-...-18a1a54 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 18 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 {
	Identity   *identity.IdentityClientV3
	Compute    *compute.ComputeClientV2
	Image      *image.ImageClientV2
	Storage    *storage.StorageClientV2
	Networking *networking.NeutronClientV2
}

func GetClientWithAuthToken

func GetClientWithAuthToken(passwordAuth *keystoneauth.PasswordAuthPlugin) *OpenstackClient

func NewOpenstackClient

func NewOpenstackClient(authUrl string, user keystoneauth.User, project keystoneauth.Project,
	regionName string, tokenExpireSecond int,
) (*OpenstackClient, error)

func (*OpenstackClient) ComputeClient

func (c *OpenstackClient) ComputeClient() *compute.ComputeClientV2

func (*OpenstackClient) ImageClient

func (c *OpenstackClient) ImageClient() *image.ImageClientV2

func (*OpenstackClient) MustGenerateComputeClient

func (c *OpenstackClient) MustGenerateComputeClient() *compute.ComputeClientV2

func (*OpenstackClient) NetworkingClient

func (c *OpenstackClient) NetworkingClient() *networking.NeutronClientV2

func (OpenstackClient) ServerInspect

func (client OpenstackClient) ServerInspect(serverId string) (*ServerInspect, error)

func (*OpenstackClient) StorageClient

func (c *OpenstackClient) StorageClient() *storage.StorageClientV2

func (OpenstackClient) WaitServerCreated

func (client OpenstackClient) WaitServerCreated(serverId string) (*compute.Server, error)

func (OpenstackClient) WaitServerDeleted

func (client OpenstackClient) WaitServerDeleted(serverId string) error

func (OpenstackClient) WaitServerRebooted

func (client OpenstackClient) WaitServerRebooted(serverId string) (*compute.Server, error)

func (OpenstackClient) WaitServerResized

func (client OpenstackClient) WaitServerResized(serverId string, newFlavorName string) error

func (OpenstackClient) WaitServerStatus

func (client OpenstackClient) WaitServerStatus(serverId string, status string, taskState string) (*compute.Server, error)

type ServerInspect

type ServerInspect struct {
	Server          compute.Server                `json:"server"`
	Interfaces      []compute.InterfaceAttachment `json:"interfaces"`
	Volumes         []compute.VolumeAttachment    `json:"volumes"`
	PowerState      string
	InterfaceDetail map[string]networking.Port `json:"interfaceDetail"`
	VolumeDetail    map[string]storage.Volume  `json:"volumeDetail"`
	Actions         []compute.InstanceAction   `json:"actions"`
}

func (*ServerInspect) Print

func (serverInspect *ServerInspect) Print()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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