clouddirector

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: Apache-2.0 Imports: 9 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
}

Client wraps the govcd client

func New

func New(c Config, ctx context.Context) (*Client, error)

New initializes a new cloudDirector client

func (*Client) Create

func (c *Client) Create(ctx context.Context, imageURL string, imageName string, loc string) error

Create imports and processes an OVF image to cloudDirector

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, name string, loc string) error

Delete deletes an image from cloudDirector

func (*Client) Exists

func (c *Client) Exists(ctx context.Context, name string, loc string) (bool, error)

Exists checks if an image already exists in cloudDirector

func (*Client) GetLocations

func (c *Client) GetLocations() map[string]interface{}

GetLocations returns all configured cloudDirector locations

type Config

type Config struct {
	CredentialsFile string
	LocationsFile   string
	DownloadDir     string
}

Config holds the configuration for the cloudDirector client

type Credentials

type Credentials struct {
	URL      string `yaml:"url"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Org      string `yaml:"org"`
	Insecure bool   `yaml:"insecure"`
}

type ImporterConfig

type ImporterConfig struct {
	Name    string
	Path    string
	Catalog *govcd.Catalog
}

ImporterConfig holds the configuration for the OVF importer

type Location

type Location struct {
	Name    string `yaml:"name"`
	Org     string `yaml:"org"`
	VDC     string `yaml:"vdc"`
	Catalog string `yaml:"catalog"`
}

Location holds a single location configuration

Jump to

Keyboard shortcuts

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