ovirt

package
v0.0.0-...-e73b65a Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

The approach for providing VM policy-based integration has the following design constraints:

  • Validation must never block updating the data model.
  • Real-time validation is best effort.
  • A scheduled search for VMs that needs to be validated ensures that all VMs eventually get validated.

Real-time validation is triggered by VM create/update model events. If the validation service is unavailable or fails, the condition is only logged with the intent that the next scheduled search will validate the latest version of VM. The scheduled search is a goroutine that periodically queries the DB for VMs with: revision != revisionValidated. Each matched VM is validated. To reduce overlap between the scheduled validation and event-driven validation, Each model event is "reported" (though a channel) to the search (loop). Reported are omitted from the search result. Both Cluster and Host model events result in all of the VMs in their respective containment trees will be updated with: revisionValidated = 0 which triggers (re)validation.

Index

Constants

View Source
const (
	// Retry interval.
	RetryInterval = 5 * time.Second
	// Refresh interval.
	RefreshInterval = 10 * time.Second
)

Settings

View Source
const (
	Started = ""
	Load    = "load"
	Loaded  = "loaded"
	Parity  = "parity"
	Refresh = "refresh"
)

Phases

View Source
const (
	// DataCenter
	USER_ADD_STORAGE_POOL    = 950
	USER_UPDATE_STORAGE_POOL = 952
	USER_REMOVE_STORAGE_POOL = 954
	// Network
	NETWORK_ADD_NETWORK    = 942
	NETWORK_UPDATE_NETWORK = 1114
	NETWORK_REMOVE_NETWORK = 944
	// Storage Domain
	USER_ADD_STORAGE_DOMAIN              = 956
	USER_UPDATE_STORAGE_DOMAIN           = 958
	USER_REMOVE_STORAGE_DOMAIN           = 960
	USER_FORCE_REMOVE_STORAGE_DOMAIN     = 981
	USER_DETACH_STORAGE_DOMAIN_FROM_POOL = 964
	// vNIC Profile
	ADD_VNIC_PROFILE    = 1122
	UPDATE_VNIC_PROFILE = 1124
	REMOVE_VNIC_PROFILE = 1126
	// Disk Profile
	USER_ADD_DISK_PROFILE    = 10120
	USER_UPDATE_DISK_PROFILE = 10124
	USER_REMOVE_DISK_PROFILE = 10122
	// Cluster
	USER_ADD_CLUSTER    = 809
	USER_UPDATE_CLUSTER = 811
	USER_REMOVE_CLUSTER = 813
	// Host
	USER_ADD_VDS                        = 42
	USER_UPDATE_VDS                     = 43
	USER_REMOVE_VDS                     = 44
	USER_VDS_MAINTENANCE                = 600
	USER_VDS_MAINTENANCE_WITHOUT_REASON = 620
	USER_VDS_MAINTENANCE_MANUAL_HA      = 10453
	VDS_DETECTED                        = 13
	// VM
	USER_ADD_VM                                    = 34
	USER_ADD_VM_FINISHED_SUCCESS                   = 53
	USER_UPDATE_VM                                 = 35
	SYSTEM_UPDATE_VM                               = 253
	USER_REMOVE_VM                                 = 113
	USER_REMOVE_VM_FINISHED_INTERNAL               = 1130
	USER_REMOVE_VM_FINISHED_ILLEGAL_DISKS          = 172
	USER_REMOVE_VM_FINISHED_ILLEGAL_DISKS_INTERNAL = 1720
	IMPORTEXPORT_IMPORT_VM                         = 1152
	USER_ADD_DISK_TO_VM_SUCCESS                    = 97
	USER_UPDATE_VM_DISK                            = 88
	USER_REMOVE_DISK_FROM_VM                       = 80
	USER_ATTACH_DISK_TO_VM                         = 2016
	USER_DETACH_DISK_FROM_VM                       = 2018
	USER_EJECT_VM_DISK                             = 521
	USER_CHANGE_DISK_VM                            = 38
	NETWORK_USER_ADD_VM_INTERFACE                  = 932
	NETWORK_USER_UPDATE_VM_INTERFACE               = 934
	NETWORK_USER_REMOVE_VM_INTERFACE               = 930
	USER_CREATE_SNAPSHOT_FINISHED_SUCCESS          = 68
	USER_REMOVE_SNAPSHOT_FINISHED_SUCCESS          = 356
	VM_ADD_HOST_DEVICES                            = 10800
	VM_REMOVE_HOST_DEVICES                         = 10801
	USER_RUN_VM                                    = 32
	USER_SUSPEND_VM_OK                             = 503
	USER_PAUSE_VM                                  = 39
	USER_RESUME_VM                                 = 40
	VM_DOWN                                        = 61
	// Disk
	USER_ADD_DISK_FINISHED_SUCCESS            = 2021
	USER_REMOVE_DISK                          = 2014
	USER_FINISHED_REMOVE_DISK_ATTACHED_TO_VMS = 2042
)

Event codes.

View Source
const (
	// The (max) number of batched task results.
	MaxBatch = 1024
	// Transaction label.
	ValidationLabel = "VM-validated"
)
View Source
const (
	BaseEndpoint       = "/v1/data/io/konveyor/forklift/ovirt/"
	VersionEndpoint    = BaseEndpoint + "rules_version"
	ValidationEndpoint = BaseEndpoint + "validate"
)

Endpoints.

Variables

View Source
var Settings = &settings.Settings

Application settings.

Functions

func GetInsecureSkipVerifyFlag

func GetInsecureSkipVerifyFlag(secret *core.Secret) bool

GetInsecureSkipVerifyFlag gets the insecureSkipVerify boolean flag value from the ovirt connection secret.

Types

type Adapter

type Adapter interface {
	// List REST collections.
	List(ctx *Context) (itr fb.Iterator, err error)
	// Apply an event to the inventory model.
	Apply(ctx *Context, event *Event) (updater Updater, err error)
	// List handled event (codes).
	Event() []int
}

Model adapter. Provides integration between the REST resource model and the inventory model.

type Base

type Base struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type BaseAdapter

type BaseAdapter struct {
}

Base adapter.

type Client

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

Client.

type Cluster

type Cluster struct {
	Base
	DataCenter    Ref    `json:"data_center"`
	HaReservation string `json:"ha_reservation"`
	KSM           struct {
		Enabled string `json:"enabled"`
	} `json:"ksm"`
	BiosType string `json:"bios_type"`
}

Cluster.

func (*Cluster) ApplyTo

func (r *Cluster) ApplyTo(m *model.Cluster)

Apply to (update) the model.

type ClusterAdapter

type ClusterAdapter struct {
	BaseAdapter
}

Cluster adapter.

func (*ClusterAdapter) Apply

func (r *ClusterAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model.

func (*ClusterAdapter) Event

func (r *ClusterAdapter) Event() []int

Handled events.

func (*ClusterAdapter) List

func (r *ClusterAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type ClusterEventHandler

type ClusterEventHandler struct {
	libmodel.StockEventHandler
	// DB.
	DB libmodel.DB
	// contains filtered or unexported fields
}

Watch for cluster changes and validate as needed.

func (*ClusterEventHandler) Error

func (r *ClusterEventHandler) Error(err error)

Report errors.

func (*ClusterEventHandler) Updated

func (r *ClusterEventHandler) Updated(event libmodel.Event)

Cluster updated. Analyze all related VMs.

type ClusterList

type ClusterList struct {
	Items []Cluster `json:"cluster"`
}

Cluster (list).

type Collector

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

oVirt data collector.

func New

func New(db libmodel.DB, provider *api.Provider, secret *core.Secret) (r *Collector)

New collector.

func (*Collector) DB

func (r *Collector) DB() libmodel.DB

Get the DB.

func (*Collector) HasParity

func (r *Collector) HasParity() bool

Reset.

func (*Collector) Name

func (r *Collector) Name() string

The name.

func (*Collector) Owner

func (r *Collector) Owner() meta.Object

The owner.

func (*Collector) Reset

func (r *Collector) Reset()

Reset.

func (*Collector) Shutdown

func (r *Collector) Shutdown()

Shutdown the collector.

func (*Collector) Start

func (r *Collector) Start() error

Start the collector.

func (*Collector) Test

func (r *Collector) Test() (err error)

Test connect/logout.

type Context

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

Adapter context.

type DataCenter

type DataCenter struct {
	Base
}

DataCenter.

func (*DataCenter) ApplyTo

func (r *DataCenter) ApplyTo(m *model.DataCenter)

Apply to (update) the model.

type DataCenterAdapter

type DataCenterAdapter struct {
	BaseAdapter
}

DataCenter.

func (*DataCenterAdapter) Apply

func (r *DataCenterAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply events to the inventory model.

func (*DataCenterAdapter) Event

func (r *DataCenterAdapter) Event() []int

Handled events.

func (*DataCenterAdapter) List

func (r *DataCenterAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type DataCenterList

type DataCenterList struct {
	Items []DataCenter `json:"data_center"`
}

DataCenter (list).

type Disk

type Disk struct {
	Base
	Sharable        string `json:"sharable"`
	Profile         Ref    `json:"disk_profile"`
	ProvisionedSize string `json:"provisioned_size"`
	StorageDomains  struct {
		List []Ref `json:"storage_domain"`
	} `json:"storage_domains"`
	Status      string `json:"status"`
	ActualSize  string `json:"actual_size"`
	Backup      string `json:"backup"`
	StorageType string `json:"storage_type"`
}

Disk.

func (*Disk) ApplyTo

func (r *Disk) ApplyTo(m *model.Disk)

Apply to (update) the model.

type DiskAdapter

type DiskAdapter struct {
	BaseAdapter
}

Disk adapter.

func (*DiskAdapter) Apply

func (r *DiskAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model. Disks may be added and deleted when VMs are created and deleted without generating any disk events.

func (*DiskAdapter) Event

func (r *DiskAdapter) Event() []int

Handled events.

func (*DiskAdapter) List

func (r *DiskAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type DiskList

type DiskList struct {
	Items []Disk `json:"disk"`
}

Disk (list).

type DiskProfile

type DiskProfile struct {
	Base
	StorageDomain Ref `json:"storage_domain"`
	QoS           Ref `json:"qos"`
}

Disk profile.

func (*DiskProfile) ApplyTo

func (r *DiskProfile) ApplyTo(m *model.DiskProfile)

Apply to (update) the model.

type DiskProfileAdapter

type DiskProfileAdapter struct {
	BaseAdapter
}

DiskProfile adapter.

func (*DiskProfileAdapter) Apply

func (r *DiskProfileAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model.

func (*DiskProfileAdapter) Event

func (r *DiskProfileAdapter) Event() []int

Handled events.

func (*DiskProfileAdapter) List

func (r *DiskProfileAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type DiskProfileHandler

type DiskProfileHandler struct {
	libmodel.StockEventHandler
	// DB.
	DB libmodel.DB
	// contains filtered or unexported fields
}

Watch for DiskProfile changes and validate VMs as needed.

func (*DiskProfileHandler) Error

func (r *DiskProfileHandler) Error(err error)

Report errors.

func (*DiskProfileHandler) Updated

func (r *DiskProfileHandler) Updated(event libmodel.Event)

Profile updated. Analyze all referencing VMs.

type DiskProfileList

type DiskProfileList struct {
	Items []DiskProfile `json:"disk_profile"`
}

NICProfile (list).

type Event

type Event struct {
	ID          string `json:"id"`
	Code        string `json:"code"`
	Description string `json:"description"`
	DataCenter  struct {
		Ref string `json:"href"`
		ID  string `json:"id"`
	} `json:"data_center"`
	Cluster struct {
		Ref string `json:"href"`
		ID  string `json:"id"`
	} `json:"cluster"`
	Host struct {
		Ref string `json:"href"`
		ID  string `json:"id"`
	} `json:"host"`
	VM struct {
		Ref string `json:"href"`
		ID  string `json:"id"`
	} `json:"vm"`
}

Event.

type EventList

type EventList struct {
	Items []Event `json:"event"`
}

EVent (list).

type Host

type Host struct {
	Base
	Cluster Ref    `json:"cluster"`
	Status  string `json:"status"`
	OS      struct {
		Type    string `json:"type"`
		Version struct {
			Full string `json:"full_version"`
		} `json:"version"`
	} `json:"os"`
	CPU struct {
		Topology struct {
			Sockets string `json:"sockets"`
			Cores   string `json:"cores"`
		} `json:"topology"`
	} `json:"cpu"`
	SSH struct {
		Thumbprint string `json:"thumbprint"`
	} `json:"ssh"`
	NICs struct {
		List []struct {
			ID        string `json:"id"`
			Name      string `json:"name"`
			LinkSpeed string `json:"speed"`
			MTU       string `json:"mtu"`
			VLan      struct {
				ID string `json:"id"`
			} `json:"vlan"`
		} `json:"host_nic"`
	} `json:"nics"`
	Networks struct {
		Attachment []struct {
			ID      string `json:"id"`
			Network Ref    `json:"network"`
		} `json:"network_attachment"`
	} `json:"network_attachments"`
}

Host.

func (*Host) ApplyTo

func (r *Host) ApplyTo(m *model.Host)

Apply to (update) the model.

type HostAdapter

type HostAdapter struct {
	BaseAdapter
}

Host (VDS) adapter.

func (*HostAdapter) Apply

func (r *HostAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model.

func (*HostAdapter) Event

func (r *HostAdapter) Event() []int

Handled events.

func (*HostAdapter) List

func (r *HostAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type HostEventHandler

type HostEventHandler struct {
	libmodel.StockEventHandler
	// DB.
	DB libmodel.DB
	// contains filtered or unexported fields
}

Watch for host changes and validate as needed.

func (*HostEventHandler) Error

func (r *HostEventHandler) Error(err error)

Report errors.

func (*HostEventHandler) Updated

func (r *HostEventHandler) Updated(event libmodel.Event)

Host updated. Analyze all related VMs.

type HostList

type HostList struct {
	Items []Host `json:"host"`
}

Host (list).

type NICProfile

type NICProfile struct {
	Base
	Network       Ref    `json:"network"`
	QoS           Ref    `json:"qos"`
	NetworkFilter Ref    `json:"network_filter"`
	PortMirroring string `json:"port_mirroring"`
	Properties    struct {
		List []struct {
			Name  string `json:"name"`
			Value string `json:"value"`
		} `json:"custom_property"`
	} `json:"custom_properties"`
	PassThrough struct {
		Mode string `json:"mode"`
	} `json:"pass_through"`
}

vNIC profile.

func (*NICProfile) ApplyTo

func (r *NICProfile) ApplyTo(m *model.NICProfile)

Apply to (update) the model.

type NICProfileAdapter

type NICProfileAdapter struct {
	BaseAdapter
}

NICProfileAdapter adapter.

func (*NICProfileAdapter) Apply

func (r *NICProfileAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model.

func (*NICProfileAdapter) Event

func (r *NICProfileAdapter) Event() []int

Handled events.

func (*NICProfileAdapter) List

func (r *NICProfileAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type NICProfileHandler

type NICProfileHandler struct {
	libmodel.StockEventHandler
	// DB.
	DB libmodel.DB
	// contains filtered or unexported fields
}

Watch for NICProfile changes and validate VMs as needed.

func (*NICProfileHandler) Error

func (r *NICProfileHandler) Error(err error)

Report errors.

func (*NICProfileHandler) Updated

func (r *NICProfileHandler) Updated(event libmodel.Event)

Profile updated. Analyze all referencing VMs.

type NICProfileList

type NICProfileList struct {
	Items []NICProfile `json:"vnic_profile"`
}

NICProfile (list).

type Network

type Network struct {
	Base
	DataCenter Ref `json:"data_center"`
	VLan       Ref `json:"vlan"`
	Usages     struct {
		Usage []string `json:"usage"`
	} `json:"usages"`
	//
	Profiles struct {
		List []struct {
			ID string `json:"id"`
		} `json:"vnic_profile"`
	} `json:"vnic_profiles"`
}

Network.

func (*Network) ApplyTo

func (r *Network) ApplyTo(m *model.Network)

Apply to (update) the model.

type NetworkAdapter

type NetworkAdapter struct {
	BaseAdapter
}

Network adapter.

func (*NetworkAdapter) Apply

func (r *NetworkAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model.

func (*NetworkAdapter) Event

func (r *NetworkAdapter) Event() []int

Handled events.

func (*NetworkAdapter) List

func (r *NetworkAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type NetworkList

type NetworkList struct {
	Items []Network `json:"network"`
}

Network (list).

type NotFound

type NotFound struct {
}

Not found error.

func (*NotFound) Error

func (e *NotFound) Error() string

type Ref

type Ref struct {
	Ref string `json:"href"`
	ID  string `json:"id"`
}

Ref.

type StorageDomain

type StorageDomain struct {
	Base
	Type    string `json:"type"`
	Storage struct {
		Type string `json:"type"`
	} `json:"storage"`
	Available  string `json:"available"`
	Used       string `json:"used"`
	DataCenter struct {
		List []Ref `json:"data_center"`
	} `json:"data_centers"`
}

StorageDomain.

func (*StorageDomain) ApplyTo

func (r *StorageDomain) ApplyTo(m *model.StorageDomain)

Apply to (update) the model.

type StorageDomainAdapter

type StorageDomainAdapter struct {
	BaseAdapter
}

StorageDomain adapter.

func (*StorageDomainAdapter) Apply

func (r *StorageDomainAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model.

func (*StorageDomainAdapter) Event

func (r *StorageDomainAdapter) Event() []int

Handled events.

func (*StorageDomainAdapter) List

func (r *StorageDomainAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type StorageDomainList

type StorageDomainList struct {
	Items []StorageDomain `json:"storage_domain"`
}

StorageDomain (list).

type System

type System struct {
	Product struct {
		Name    string `json:"name"`
		Vendor  string `json:"vendor"`
		Version struct {
			Build    string `json:"build"`
			Major    string `json:"major"`
			Minor    string `json:"minor"`
			Revision string `json:"revision"`
		} `json:"version"`
	} `json:"product_info"`
}

System.

type Updater

type Updater func(tx *libmodel.Tx) error

Updates the DB based on changes described by an Event.

type VM

type VM struct {
	Base
	Cluster Ref `json:"cluster"`
	Host    Ref `json:"host"`
	Guest   struct {
		Distribution string `json:"distribution"`
		Version      struct {
			Full string `json:"full_version"`
		} `json:"version"`
	} `json:"guest_operating_system"`
	OS struct {
		Type    string `json:"type"`
		Version struct {
			Full string `json:"full_version"`
		} `json:"os"`
	}
	CPU struct {
		Tune struct {
			Pin struct {
				List []struct {
					Set string `json:"cpu_set"`
					Cpu string `json:"vcpu"`
				} `json:"vcpu_pin"`
			} `json:"vcpu_pins"`
		} `json:"cpu_tune"`
		Topology struct {
			Sockets string `json:"sockets"`
			Cores   string `json:"cores"`
			Threads string `json:"threads"`
		} `json:"topology"`
	} `json:"cpu"`
	CpuShares string `json:"cpu_shares"`
	USB       struct {
		Enabled string `json:"enabled"`
	} `json:"usb"`
	Timezone struct {
		Name string `json:"name"`
	} `json:"time_zone"`
	Status       string `json:"status"`
	Stateless    string `json:"stateless"`
	SerialNumber struct {
		Value string `json:"value"`
	} `json:"serial_number"`
	PlacementPolicy struct {
		Affinity string `json:"affinity"`
	} `json:"placement_policy"`
	Memory string `json:"memory"`
	IO     struct {
		Threads string `json:"threads"`
	} `json:"io"`
	BIOS struct {
		Type     string `json:"type"`
		BootMenu struct {
			Enabled string `json:"enabled"`
		} `json:"boot_menu"`
	} `json:"bios"`
	Display struct {
		Type string `json:"type"`
	} `json:"display"`
	HasIllegalImages string `json:"has_illegal_images"`
	Lease            struct {
		StorageDomain Ref `json:"storage_domain"`
	} `json:"lease"`
	StorageErrorResumeBehaviour string `json:"storage_error_resume_behaviour"`
	MemoryPolicy                struct {
		Ballooning string `json:"ballooning"`
	} `json:"memory_policy"`
	HA struct {
		Enabled string `json:"enabled"`
	} `json:"high_availability"`
	HostDevices struct {
		List []struct {
			Capability string `json:"capability"`
			Vendor     struct {
				Name string `json:"name"`
			} `json:"vendor"`
			Product struct {
				Name string `json:"name"`
			} `json:"product"`
		} `json:"host_device"`
	} `json:"host_devices"`
	CDROMs struct {
		List []struct {
			ID   string `json:"id"`
			File struct {
				ID string `json:"id"`
			} `json:"file"`
		} `json:"cdrom"`
	} `json:"cdroms"`
	NICs struct {
		List []struct {
			ID        string `json:"id"`
			Name      string `json:"name"`
			Interface string `json:"interface"`
			MAC       struct {
				Address string `json:"address"`
			} `json:"mac"`
			Plugged string `json:"plugged"`
			Profile Ref    `json:"vnic_profile"`
			Devices struct {
				List []struct {
					IPS struct {
						IP []struct {
							Address string `json:"address"`
							Version string `json:"version"`
						} `json:"ip"`
					} `json:"ips"`
				} `json:"reported_device"`
			} `json:"reported_devices"`
		} `json:"nic"`
	} `json:"nics"`
	Disks struct {
		Attachment []struct {
			ID              string `json:"id"`
			Name            string
			Interface       string `json:"interface"`
			SCSIReservation string `json:"uses_scsi_reservation"`
			Disk            Ref    `json:"disk"`
		} `json:"disk_attachment"`
	} `json:"disk_attachments"`
	WatchDogs struct {
		List []struct {
			ID     string `json:"id"`
			Action string `json:"action"`
			Model  string `json:"model"`
		} `json:"watchdog"`
	} `json:"watchdogs"`
	Properties struct {
		List []struct {
			Name  string `json:"name"`
			Value string `json:"value"`
		} `json:"custom_property"`
	} `json:"custom_properties"`
	Snapshots struct {
		List []struct {
			ID            string `json:"id"`
			Description   string `json:"description"`
			PersistMemory string `json:"persist_memorystate"`
			Type          string `json:"snapshot_type"`
		} `json:"snapshot"`
	} `json:"snapshots"`
}

VM.

func (*VM) ApplyTo

func (r *VM) ApplyTo(m *model.VM)

Apply to (update) the model.

type VMAdapter

type VMAdapter struct {
	BaseAdapter
}

VM adapter.

func (*VMAdapter) Apply

func (r *VMAdapter) Apply(ctx *Context, event *Event) (updater Updater, err error)

Apply and event tot the inventory model.

func (*VMAdapter) Event

func (r *VMAdapter) Event() []int

Handled events.

func (*VMAdapter) List

func (r *VMAdapter) List(ctx *Context) (itr fb.Iterator, err error)

List the collection.

type VMEventHandler

type VMEventHandler struct {
	libmodel.StockEventHandler
	// Provider.
	Provider *api.Provider
	// DB.
	DB libmodel.DB
	// contains filtered or unexported fields
}

Watch for VM changes and validate as needed.

func (*VMEventHandler) Created

func (r *VMEventHandler) Created(event libmodel.Event)

VM Created. The VM is scheduled (and reported as scheduled). This is best-effort. If the validate() fails, it wil be picked up in the next search().

func (*VMEventHandler) End

func (r *VMEventHandler) End()

Watch ended.

func (*VMEventHandler) Error

func (r *VMEventHandler) Error(err error)

Report errors.

func (*VMEventHandler) Started

func (r *VMEventHandler) Started(uint64)

Watch ended.

func (*VMEventHandler) Updated

func (r *VMEventHandler) Updated(event libmodel.Event)

VM Updated. The VM is scheduled (and reported as scheduled). This is best-effort. If the validate() fails, it wil be picked up in the next search().

type VMList

type VMList struct {
	Items []VM `json:"vm"`
}

VM (list).

Jump to

Keyboard shortcuts

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