Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCanNotLoadOvirtConfig error = errors.New("can not load ovirt config")
ErrCanNotLoadOvirtConfig is returned when the config file fails to load.
Functions ¶
func LoadOvirtConfig ¶
LoadOvirtConfig from the following location (first wins): 1. OVIRT_CONFIG env variable 2 $defaultOvirtConfigPath
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetConnection ¶
func (o *Client) GetConnection() (*ovirtsdk.Connection, error)
GetConnection validates the connection we have is valid and either returns it, or creates a new one in case the connection isn't present or it was invalidated.
type Config ¶
type Config struct { URL string `yaml:"ovirt_url"` Username string `yaml:"ovirt_username"` Password string `yaml:"ovirt_password"` CAFile string `yaml:"ovirt_cafile,omitempty"` Insecure bool `yaml:"ovirt_insecure,omitempty"` }
Config holds oVirt api access details.
func GetOvirtConfig ¶
GetOvirtConfig will return an Config by loading the configuration from locations specified in @LoadOvirtConfig error is return if the configuration could not be retained.
Click to show internal directories.
Click to hide internal directories.