Documentation ¶
Index ¶
Constants ¶
const BuilderID = "ganto.ovirt"
BuilderID defines the unique id for the builder.
Variables ¶
This section is empty.
Functions ¶
func WaitForState ¶
func WaitForState(conf *StateChangeConf) (i interface{}, err error)
WaitForState watches an object and waits for it to achieve a certain state.
Types ¶
type AccessConfig ¶
type AccessConfig struct { OvirtURLRaw string `mapstructure:"ovirt_url"` OvirtURL *url.URL SkipCertValidation bool `mapstructure:"insecure_skip_tls_verify"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` }
AccessConfig contains the oVirt API access and authentication configuration
func (*AccessConfig) Prepare ¶
func (c *AccessConfig) Prepare(ctx *interpolate.Context) []error
Prepare performs basic validation on the AccessConfig
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
Artifact is an artifact implementation that contains built disk.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a builder implementation that creates oVirt custom images.
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` AccessConfig `mapstructure:",squash"` SourceConfig `mapstructure:",squash"` Comm communicator.Config `mapstructure:",squash"` VMName string `mapstructure:"vm_name"` IPAddress string `mapstructure:"address"` Netmask string `mapstructure:"netmask"` Gateway string `mapstructure:"gateway"` DiskName string `mapstructure:"disk_name"` DiskDescription string `mapstructure:"disk_description"` // contains filtered or unexported fields }
type SourceConfig ¶
type SourceConfig struct { Cluster string `mapstructure:"cluster"` SourceType string `mapstructure:"source_type"` SourceTemplateName string `mapstructure:"source_template_name"` SourceTemplateVersion int `mapstructure:"source_template_version"` SourceTemplateID string `mapstructure:"source_template_id"` }
SourceConfig contains the various source properties for an oVirt image
func (*SourceConfig) Prepare ¶
func (c *SourceConfig) Prepare(ctx *interpolate.Context) []error
Prepare performs basic validation on the SourceConfig
type StateChangeConf ¶
type StateChangeConf struct { Pending []string Refresh StateRefreshFunc StepState multistep.StateBag Target []string }
StateChangeConf is the configuration struct used for `WaitForState`.
type StateRefreshFunc ¶
StateRefreshFunc is a function type used for StateChangeConf that is responsible for refreshing the item being watched for a state change.
It returns three results: `result` is any object that will be returned as the final object after waiting for state change. This allows you to return the final updated object. `state` is the latest state of that object. `err` is any error that may have happened while refreshing the state.
func DiskAttachmentStateRefreshFunc ¶
func DiskAttachmentStateRefreshFunc( conn *ovirtsdk4.Connection, vmID string, diskID string) StateRefreshFunc
DiskAttachmentStateRefreshFunc returns a StateRefreshFunc that is used to watch a oVirt disk attachment.
func DiskStateRefreshFunc ¶
func DiskStateRefreshFunc( conn *ovirtsdk4.Connection, diskID string) StateRefreshFunc
DiskStateRefreshFunc returns a StateRefreshFunc that is used to watch a oVirt disk.
func VMStateRefreshFunc ¶
func VMStateRefreshFunc( conn *ovirtsdk4.Connection, vmID string) StateRefreshFunc
VMStateRefreshFunc returns a StateRefreshFunc that is used to watch a oVirt virtual machine.