ovirt

package
v1.4.17 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 24 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchVNICProfileByClusterNetwork

func FetchVNICProfileByClusterNetwork(con *ovirtsdk.Connection, clusterID string, networkName string) ([]*ovirtsdk.VnicProfile, error)

FetchVNICProfileByClusterNetwork returns a list of profiles for the given cluster and network name.

func FindHostsInCluster

func FindHostsInCluster(con *ovirtsdk.Connection, cName string) ([]*ovirtsdk.Host, error)

FindHostsInCluster returns a list of the hosts that exists in the specified cluster

func GetClusterName

func GetClusterName(con *ovirtsdk.Connection, clusterID string) (string, error)

GetClusterName returns the name of the ovirt cluster with the specified Cluster ID

func LoadOvirtConfig

func LoadOvirtConfig() ([]byte, error)

LoadOvirtConfig from the following location (first wins): 1. OVIRT_CONFIG env variable 2 $defaultOvirtConfigPath See #@Config for the expected format

func NewConnection

func NewConnection() (*ovirtsdk.Connection, error)

NewConnection returns a new client connection to oVirt's API endpoint. It is the responsibility of the caller to close the connection.

func Platform

func Platform() (*ovirt.Platform, error)

Platform collects ovirt-specific configuration.

func Validate

func Validate(ic *types.InstallConfig) error

Validate executes ovirt specific validation

func ValidateForProvisioning

func ValidateForProvisioning(ic *types.InstallConfig) error

ValidateForProvisioning validates that the install config is valid for provisioning the cluster.

Types

type Config

type Config struct {
	URL      string `yaml:"ovirt_url"`
	FQDN     string `yaml:"ovirt_fqdn"`
	PemURL   string `yaml:"ovirt_pem_url"`
	Username string `yaml:"ovirt_username"`
	Password string `yaml:"ovirt_password"`
	CAFile   string `yaml:"ovirt_cafile,omitempty"`
	Insecure bool   `yaml:"ovirt_insecure,omitempty"`
	CABundle string `yaml:"ovirt_ca_bundle,omitempty"`
}

Config holds oVirt api access details

func NewConfig

func NewConfig() (Config, error)

NewConfig will return an Config by loading the configuration from locations specified in @LoadOvirtConfig

func (*Config) Save

func (c *Config) Save() error

Save will serialize the config back into the locations specified in @LoadOvirtConfig, first location with a file, wins.

Jump to

Keyboard shortcuts

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