Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDirectory ¶
CheckDirectory checks to see if a given absolute path exists and is a directory.
Types ¶
type CreateArgs ¶
type CreateArgs struct { Name string WorkloadName string Debug bool Update bool CustomSpec VMSpec HTTPProxy string HTTPSProxy string NoProxy string GoPath string Kernel string KernelArgs string QEMUPath string CPU string }
CreateArgs contains all the information necessary to create a new ccloudvm instance.
type CreateResult ¶
CreateResult contains information about the status of an instance creation request. It has two fields. Finished, if true, indicates that the creation request has finished and Line containing a lines of output.
type InstanceDetails ¶
type InstanceDetails struct { Name string SSH SSHDetails Workload string VMSpec VMSpec }
InstanceDetails contains information about an instance
type Mount ¶
type Mount struct { Tag string `yaml:"tag"` SecurityModel string `yaml:"security_model"` Path string `yaml:"path"` }
Mount contains information about a host path to be mounted inside the guest
type PortMapping ¶
PortMapping exposes a guest resident service on the host
func (PortMapping) String ¶
func (p PortMapping) String() string
type SSHDetails ¶
SSHDetails contains SSH connection information for an instance
type VMSpec ¶
type VMSpec struct { MemMiB int `yaml:"mem_mib"` DiskGiB int `yaml:"disk_gib"` CPUs int `yaml:"cpus"` PortMappings []PortMapping `yaml:"ports"` Mounts []Mount `yaml:"mounts"` Drives []Drive `yaml:"drives"` Qemuport uint `yaml:"qemuport"` HostIP net.IP `yaml:"host_ip"` }
VMSpec holds the per-VM state.
func (*VMSpec) MergeCustom ¶
MergeCustom merges one VMSpec into another. In addition to merging mounts, drives and ports, other fields in the receiver VM spec, such as MemMiB, are also updated, with values provided by the customSpec parameter, if they are not already defined.
func (*VMSpec) MergeDrives ¶
MergeDrives merges a slice of drives into an existing VMSpec. Drives supplied in the d parameter override existing drives in the VMSpec.
func (*VMSpec) MergeMounts ¶
MergeMounts merges a slice of mounts into an existing VMSpec. Mounts supplied in the m parameter override existing mounts in the VMSpec.
func (*VMSpec) MergePorts ¶
func (in *VMSpec) MergePorts(p []PortMapping)
MergePorts merges a slice of ports into an existing VMSpec. Ports supplied in the p parameter override existing ports in the VMSpec.