Documentation
¶
Index ¶
- type Config
- type Definition
- type Driver
- func (d *Driver) Allocate(definition string, metadata map[string]interface{}) (string, string, error)
- func (d *Driver) Deallocate(hwaddr string) error
- func (d *Driver) Name() string
- func (d *Driver) Prepare(config []byte) error
- func (d *Driver) Snapshot(hwaddr string, full bool) (string, error)
- func (d *Driver) Status(hwaddr string) string
- func (d *Driver) ValidateDefinition(definition string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
VmrunPath string `json:"vmrun_path"` // '/Applications/VMware Fusion.app/Contents/Library/vmrun'
VdiskmanagerPath string `json:"vdiskmanager_path"` // '/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager'
ImagesPath string `json:"images_path"` // Where to look/store VM images
WorkspacePath string `json:"workspace_path"` // Where to place the cloned VM and disks
DownloadUser string `json:"download_user"` // The user will be used in download operations
DownloadPassword string `json:"download_password"` // The password will be used in download operations
LogMonitor bool `json:"log_monitor"` // Actively monitor the vmware.log of VM and reset it on halt
}
type Definition ¶
type Definition struct {
Image string `json:"image"` // Main image to use as reference
Images map[string]string `json:"images"` // List of image dependencies
Requirements drivers.Requirements `json:"requirements"` // Required resources to allocate
}
*
- Definition example:
- image: macos1015-xcode122-ci
- images:
- macos1015: https://artifact-storage/aquarium/image/vmx/macos1015-VERSION/macos1015-VERSION.tar.xz
- macos1015-xcode122: https://artifact-storage/aquarium/image/vmx/macos1015-xcode122-VERSION/macos1015-xcode122-VERSION.tar.xz
- macos1015-xcode122-ci: https://artifact-storage/aquarium/image/vmx/macos1015-xcode122-ci-VERSION/macos1015-xcode122-ci-VERSION.tar.xz
- requirements:
- cpu: 14
- ram: 14
- disks:
- xcode122_workspace:
- type: exfat
- size: 100
- reuse: true
- network: ""
- metadata:
- JENKINS_AGENT_WORKDIR: /Users/jenkins/workdir
func (*Definition) Apply ¶
func (d *Definition) Apply(definition string) error
func (*Definition) Validate ¶
func (d *Definition) Validate() error
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Implements drivers.ResourceDriver interface
func (*Driver) Allocate ¶
func (d *Driver) Allocate(definition string, metadata map[string]interface{}) (string, string, error)
*
- Allocate VM with provided images *
- It automatically download the required images, unpack them and runs the VM.
- Not using metadata because there is no good interfaces to pass it to VM.
func (*Driver) Deallocate ¶
func (*Driver) ValidateDefinition ¶
Click to show internal directories.
Click to hide internal directories.