powervs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, options Options) (*Client, error)

func (*Client) CreateNetwork added in v0.2.0

func (s *Client) CreateNetwork(body *models.NetworkCreate) (*models.Network, error)

func (*Client) CreateVM added in v0.2.0

func (s *Client) CreateVM(opts *models.PVMInstanceCreate) (*models.PVMInstanceList, error)

func (*Client) DeleteVM added in v0.2.0

func (s *Client) DeleteVM(id string) error

func (*Client) GetAllDHCPServers

func (s *Client) GetAllDHCPServers() (models.DHCPServers, error)

GetAllDHCPServers returns all the DHCP servers in the Power VS service instance.

func (*Client) GetAllInstance

func (s *Client) GetAllInstance() (*models.PVMInstances, error)

GetAllInstance returns all the virtual machine in the Power VS service instance.

func (*Client) GetDHCPServer

func (s *Client) GetDHCPServer(id string) (*models.DHCPServerDetail, error)

GetDHCPServer returns the details for DHCP server associated with id.

func (*Client) GetImageByName added in v0.2.0

func (s *Client) GetImageByName(name string) (*models.ImageReference, error)

GetImageByName returns *models.ImageReference for given image name if exists, if not will return appropriate error

func (*Client) GetInstance added in v0.1.2

func (s *Client) GetInstance(id string) (*models.PVMInstance, error)

func (*Client) GetNetwork added in v0.2.0

func (s *Client) GetNetwork(id string) (*models.Network, error)

func (*Client) GetNetworkByName added in v0.2.0

func (s *Client) GetNetworkByName(name string) (*models.NetworkReference, error)

GetNetworkByName returns *models.NetworkReference for given network name if exists, if not will return appropriate error

func (*Client) GetNetworks added in v0.2.0

func (s *Client) GetNetworks() (*models.Networks, error)

func (*Client) GetVM added in v0.2.0

func (s *Client) GetVM(id string) (*models.PVMInstance, error)

type Options

type Options struct {
	AccountID       string
	CloudInstanceID string
	Zone            string
	Debug           bool
}

type PowerVS

type PowerVS interface {
	GetAllInstance() (*models.PVMInstances, error)
	GetAllDHCPServers() (models.DHCPServers, error)
	GetDHCPServer(id string) (*models.DHCPServerDetail, error)
	GetImageByName(name string) (*models.ImageReference, error)
	GetNetworkByName(name string) (*models.NetworkReference, error)
}

Jump to

Keyboard shortcuts

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