vmwareclouddirector

package
v1.56.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a VMware Cloud Director provider.

Types

type Auth

type Auth struct {
	Username      string
	Password      string
	Organization  string
	URL           string
	VDC           string
	AllowInsecure bool
}

type Client

type Client struct {
	Auth      *Auth
	VCDClient *govcd.VCDClient
}

func NewClient

func NewClient(username, password, org, url, vdc string, allowInsecure bool) (*Client, error)

func (*Client) GetAuthenticatedClient

func (c *Client) GetAuthenticatedClient() (*govcd.VCDClient, error)

func (*Client) GetOrganization

func (c *Client) GetOrganization() (*govcd.Org, error)

func (*Client) GetOrganizationVDCAndVapp

func (c *Client) GetOrganizationVDCAndVapp(vappName string) (*govcd.Org, *govcd.Vdc, *govcd.VApp, error)

func (*Client) GetVDCForOrg

func (c *Client) GetVDCForOrg(org govcd.Org) (*govcd.Vdc, error)

func (*Client) GetVMByName

func (c *Client) GetVMByName(vappName, vmName string) (*govcd.VM, error)

type Config

type Config struct {
	Auth `json:",inline"`

	// VM configuration.
	VApp            string
	Template        string
	Catalog         string
	PlacementPolicy *string
	SizingPolicy    *string

	// Network configuration.
	Network          string
	IPAllocationMode vcdtypes.IPAllocationMode

	// Compute configuration.
	CPUs     int64
	CPUCores int64
	MemoryMB int64

	// Storage configuration.
	DiskSizeGB     *int64
	DiskBusType    *string
	DiskIOPS       *int64
	StorageProfile *string

	// Metadata configuration.
	Metadata *map[string]string
}

type NetworkType

type NetworkType string
const (
	VAppNetworkType NetworkType = "vapp"
	OrgNetworkType  NetworkType = "org"
	// Network with a NIC that is not attached to any network.
	NoneNetworkType NetworkType = "none"
)

func GetVappNetworkType

func GetVappNetworkType(networkName string, vapp govcd.VApp) (NetworkType, error)

GetVappNetworkType checks if the network exists and returns the network type.

type Server

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

Server holds VMware Cloud Director VM information.

func (Server) Addresses

func (s Server) Addresses() map[string]corev1.NodeAddressType

func (Server) ID

func (s Server) ID() string

func (Server) Name

func (s Server) Name() string

func (Server) ProviderID added in v1.53.0

func (s Server) ProviderID() string

TODO: Implement once we start supporting vCloud Director CCM.

func (Server) Status

func (s Server) Status() instance.Status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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