openstack

package
v0.0.0-...-47d8c88 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCloudConfig

func GenerateCloudConfig(options *CloudConfigOpts) ([]byte, error)

Types

type CloudConfigOpts

type CloudConfigOpts struct {
	AuthorizedKeys    []string
	PostScripts       config.PostScriptsOpts
	DNS               string
	Search            string
	CustomCloudConfig string
}

type DataSource

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

func New

func New(
	endpoint string,
	username string,
	password string,
	tenantID string,
	tenantName string,
	region string,
	domainID string,
) *DataSource

func (*DataSource) Create

func (s *DataSource) Create(
	ctx context.Context,
	host *config.Host,
	cloud *config.Cloud,
) error

Create an instance

func (*DataSource) CreatePort

func (s *DataSource) CreatePort(ip string, networkID string, subnetID string) (string, error)

CreatePort connected to a network

func (*DataSource) Delete

func (s *DataSource) Delete(ctx context.Context, name string) error

func (*DataSource) DeletePort

func (s *DataSource) DeletePort(id string) error

func (*DataSource) FindFlavorID

func (s *DataSource) FindFlavorID(name string) (string, error)

FindFlavorID retrieves the flavor UUID from name

func (*DataSource) FindImageID

func (s *DataSource) FindImageID(name string) (string, error)

FindImageID retrieves the image UUID from name

func (*DataSource) FindNetworkID

func (s *DataSource) FindNetworkID(name string) (string, error)

FindNetworkID retrieves the network from name

func (*DataSource) FindPortByDeviceID

func (s *DataSource) FindPortByDeviceID(deviceID string) (string, error)

FindPortByDeviceID retrieves the port UUID attached to an instance

func (*DataSource) FindServerID

func (s *DataSource) FindServerID(name string) (string, error)

FindServerID retrieves the instance UUID by name

func (*DataSource) FindSubnetIDByNetwork

func (s *DataSource) FindSubnetIDByNetwork(cidr string, networkID string) (string, error)

FindSubnetIDByNetwork retrieves the subnet UUID from CIDR by Network

Jump to

Keyboard shortcuts

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