ovirt

package
v1.15.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "ovirt"

ProviderName is the name of this cloud provider.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Connection struct {
		APIEntry string `gcfg:"uri"`
		Username string `gcfg:"username"`
		Password string `gcfg:"password"`
	}
	Filters struct {
		VmsQuery string `gcfg:"vms"`
	}
}

APIConfig wraps the api settings for the Ovirt.

type Cloud

type Cloud struct {
	VmsRequest   *url.URL
	HostsRequest *url.URL
}

Cloud is an implementation of the cloud provider interface for Ovirt.

func (*Cloud) AddSSHKeyToAllInstances

func (v *Cloud) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error

AddSSHKeyToAllInstances is currently not implemented.

func (*Cloud) Clusters

func (v *Cloud) Clusters() (cloudprovider.Clusters, bool)

Clusters returns the list of clusters.

func (*Cloud) CurrentNodeName

func (v *Cloud) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error)

CurrentNodeName is implementation of Instances.CurrentNodeName.

func (*Cloud) HasClusterID

func (v *Cloud) HasClusterID() bool

HasClusterID returns true if the cluster has a clusterID

func (*Cloud) Initialize

func (v *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})

Initialize passes a Kubernetes clientBuilder interface to the cloud provider

func (*Cloud) InstanceExistsByProviderID

func (v *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)

InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.

func (*Cloud) InstanceID

func (v *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string, error)

InstanceID returns the cloud provider ID of the node with the specified NodeName.

func (*Cloud) InstanceShutdownByProviderID

func (v *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)

InstanceShutdownByProviderID returns true if the instance is in safe state to detach volumes

func (*Cloud) InstanceType

func (v *Cloud) InstanceType(ctx context.Context, name types.NodeName) (string, error)

InstanceType returns the type of the specified instance.

func (*Cloud) InstanceTypeByProviderID

func (v *Cloud) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)

InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here

func (*Cloud) Instances

func (v *Cloud) Instances() (cloudprovider.Instances, bool)

Instances returns an implementation of Instances for oVirt cloud

func (*Cloud) LoadBalancer

func (v *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)

LoadBalancer returns an implementation of LoadBalancer for oVirt cloud

func (*Cloud) NodeAddresses

func (v *Cloud) NodeAddresses(ctx context.Context, nodeName types.NodeName) ([]v1.NodeAddress, error)

NodeAddresses returns the NodeAddresses of the instance with the specified nodeName.

func (*Cloud) NodeAddressesByProviderID

func (v *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error)

NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here

func (*Cloud) ProviderName

func (v *Cloud) ProviderName() string

ProviderName returns the cloud provider ID.

func (*Cloud) Routes

func (v *Cloud) Routes() (cloudprovider.Routes, bool)

Routes returns an implementation of Routes for oVirt cloud

func (*Cloud) Zones

func (v *Cloud) Zones() (cloudprovider.Zones, bool)

Zones returns an implementation of Zones for oVirt cloud

type Instance

type Instance struct {
	UUID      string
	Name      string
	IPAddress string
}

Instance specifies UUID, name and IP address of the instance.

type InstanceMap

type InstanceMap map[string]Instance

InstanceMap provides the map of Ovirt instances.

func (*InstanceMap) ListSortedNames

func (m *InstanceMap) ListSortedNames() []string

ListSortedNames returns the list of sorted Ovirt instances name.

type XMLVMAddress

type XMLVMAddress struct {
	Address string `xml:"address,attr"`
}

XMLVMAddress is an implementation for the Ovirt instance IP address in xml.

type XMLVMInfo

type XMLVMInfo struct {
	UUID      string         `xml:"id,attr"`
	Name      string         `xml:"name"`
	Hostname  string         `xml:"guest_info>fqdn"`
	Addresses []XMLVMAddress `xml:"guest_info>ips>ip"`
	State     string         `xml:"status>state"`
}

XMLVMInfo is an implementation for the Ovirt instance details in xml.

type XMLVmsList

type XMLVmsList struct {
	XMLName xml.Name    `xml:"vms"`
	VM      []XMLVMInfo `xml:"vm"`
}

XMLVmsList is an implementation to provide the list of Ovirt instances.

Jump to

Keyboard shortcuts

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