Documentation ¶
Index ¶
- Constants
- Variables
- func AddConnection(uri fmt.Stringer, name, identity string, isDefault bool) error
- func AnyConnectionDefault(name ...string) (bool, error)
- func ChangeDefault(name string) error
- func CreateSSHKeys(writeLocation string) (string, error)
- func CreateSSHKeysPrefix(dir string, file string, passThru bool, skipExisting bool, prefix ...string) (string, error)
- func Decompress(localPath, uncompressedPath string) error
- func DownloadImage(d DistributionDownload) error
- func DownloadVMImage(downloadURL *url2.URL, localImagePath string) error
- func GetConfDir(vmType string) (string, error)
- func GetDataDir(vmType string) (string, error)
- func GetProxyVariables() map[string]string
- func NewIgnitionFile(ign DynamicIgnition) error
- func RemoveConnection(name string) error
- type Clevis
- type Config
- type Custom
- type Device
- type Directory
- type DirectoryEmbedded1
- type Disk
- type DistributionDownload
- type Download
- type Dropin
- type DynamicIgnition
- type FcosDownload
- type FedoraDownload
- type File
- type FileEmbedded1
- type Filesystem
- type FilesystemOption
- type GenericDownload
- type Group
- type HTTPHeader
- type HTTPHeaders
- type Ignition
- type IgnitionConfig
- type InitOptions
- type Link
- type LinkEmbedded1
- type ListOptions
- type ListResponse
- type Luks
- type LuksOption
- type MountOption
- type NoProxyItem
- type Node
- type NodeGroup
- type NodeUser
- type Partition
- type Passwd
- type PasswdGroup
- type PasswdUser
- type Provider
- type Proxy
- type QemuMachineStatus
- type Raid
- type RaidOption
- type RemoteConnectionType
- type RemoveOptions
- type Resource
- type SSHAuthorizedKey
- type SSHOptions
- type Security
- type SetOptions
- type StartOptions
- type StopOptions
- type Storage
- type Systemd
- type TLS
- type Tang
- type Timeouts
- type Unit
- type VM
- type Verification
Constants ¶
View Source
const ( // Running indicates the qemu vm is running Running QemuMachineStatus = "running" // Stopped indicates the vm has stopped Stopped QemuMachineStatus = "stopped" DefaultMachineName string = "podman-machine-default" )
View Source
const ( PodmanTestingHost = "fedorapeople.org" PodmanTestingURL = "groups/podman/testing" )
Variables ¶
View Source
var ( SSHRemoteConnection RemoteConnectionType = "ssh" DefaultIgnitionUserName = "core" ErrNoSuchVM = errors.New("VM does not exist") ErrVMAlreadyExists = errors.New("VM already exists") ErrVMAlreadyRunning = errors.New("VM already running") ErrMultipleActiveVM = errors.New("only one VM can be active at a time") ForwarderBinaryName = "gvproxy" )
View Source
var (
Format string = "qcow2.xz"
)
These should eventually be moved into machine/qemu as they are specific to running qemu
Functions ¶
func AddConnection ¶
func AnyConnectionDefault ¶
func ChangeDefault ¶
func CreateSSHKeys ¶
CreateSSHKeys makes a priv and pub ssh key for interacting the a VM.
func CreateSSHKeysPrefix ¶
func Decompress ¶
func DownloadImage ¶
func DownloadImage(d DistributionDownload) error
func DownloadVMImage ¶
DownloadVMImage downloads a VM image from url to given path with download status
func GetConfDir ¶
GetConfigDir returns the filepath to where configuration files for podman-machine should live
func GetDataDir ¶
GetDataDir returns the filepath where vm images should live for podman-machine
func GetProxyVariables ¶
func RemoveConnection ¶
Types ¶
type Directory ¶
type Directory struct { Node DirectoryEmbedded1 }
type DirectoryEmbedded1 ¶
type DirectoryEmbedded1 struct {
Mode *int `json:"mode,omitempty"`
}
type DistributionDownload ¶
func NewFcosDownloader ¶
func NewFcosDownloader(vmType, vmName, imageStream string) (DistributionDownload, error)
func NewFedoraDownloader ¶
func NewFedoraDownloader(vmType, vmName, releaseStream string) (DistributionDownload, error)
func NewGenericDownloader ¶
func NewGenericDownloader(vmType, vmName, pullPath string) (DistributionDownload, error)
NewGenericDownloader is used when the disk image is provided by the user
type DynamicIgnition ¶
type FcosDownload ¶
type FcosDownload struct {
Download
}
func (FcosDownload) Get ¶
func (f FcosDownload) Get() *Download
func (FcosDownload) HasUsableCache ¶
func (f FcosDownload) HasUsableCache() (bool, error)
type FedoraDownload ¶
type FedoraDownload struct {
Download
}
func (FedoraDownload) Get ¶
func (f FedoraDownload) Get() *Download
func (FedoraDownload) HasUsableCache ¶
func (f FedoraDownload) HasUsableCache() (bool, error)
type File ¶
type File struct { Node FileEmbedded1 }
type FileEmbedded1 ¶
type Filesystem ¶
type Filesystem struct { Device string `json:"device"` Format *string `json:"format,omitempty"` Label *string `json:"label,omitempty"` MountOptions []MountOption `json:"mountOptions,omitempty"` Options []FilesystemOption `json:"options,omitempty"` Path *string `json:"path,omitempty"` UUID *string `json:"uuid,omitempty"` WipeFilesystem *bool `json:"wipeFilesystem,omitempty"` }
type FilesystemOption ¶
type FilesystemOption string
type GenericDownload ¶
type GenericDownload struct {
Download
}
GenericDownload is used when a user provides a URL or path for an image
func (GenericDownload) Get ¶
func (g GenericDownload) Get() *Download
func (GenericDownload) HasUsableCache ¶
func (g GenericDownload) HasUsableCache() (bool, error)
type HTTPHeader ¶
type HTTPHeaders ¶
type HTTPHeaders []HTTPHeader
type Ignition ¶
type Ignition struct { Config IgnitionConfig `json:"config,omitempty"` Proxy Proxy `json:"proxy,omitempty"` Security Security `json:"security,omitempty"` Timeouts Timeouts `json:"timeouts,omitempty"` Version string `json:"version,omitempty"` }
type IgnitionConfig ¶
type InitOptions ¶
type Link ¶
type Link struct { Node LinkEmbedded1 }
type LinkEmbedded1 ¶
type ListOptions ¶
type ListOptions struct{}
type ListResponse ¶
type Luks ¶
type Luks struct { Clevis *Clevis `json:"clevis,omitempty"` Device *string `json:"device,omitempty"` KeyFile Resource `json:"keyFile,omitempty"` Label *string `json:"label,omitempty"` Name string `json:"name"` Options []LuksOption `json:"options,omitempty"` UUID *string `json:"uuid,omitempty"` WipeVolume *bool `json:"wipeVolume,omitempty"` }
type LuksOption ¶
type LuksOption string
type MountOption ¶
type MountOption string
type NoProxyItem ¶
type NoProxyItem string
type Partition ¶
type Partition struct { GUID *string `json:"guid,omitempty"` Label *string `json:"label,omitempty"` Number int `json:"number,omitempty"` Resize *bool `json:"resize,omitempty"` ShouldExist *bool `json:"shouldExist,omitempty"` SizeMiB *int `json:"sizeMiB,omitempty"` StartMiB *int `json:"startMiB,omitempty"` TypeGUID *string `json:"typeGuid,omitempty"` WipePartitionEntry *bool `json:"wipePartitionEntry,omitempty"` }
type Passwd ¶
type Passwd struct { Groups []PasswdGroup `json:"groups,omitempty"` Users []PasswdUser `json:"users,omitempty"` }
type PasswdGroup ¶
type PasswdUser ¶
type PasswdUser struct { Gecos *string `json:"gecos,omitempty"` Groups []Group `json:"groups,omitempty"` HomeDir *string `json:"homeDir,omitempty"` Name string `json:"name"` NoCreateHome *bool `json:"noCreateHome,omitempty"` NoLogInit *bool `json:"noLogInit,omitempty"` NoUserGroup *bool `json:"noUserGroup,omitempty"` PasswordHash *string `json:"passwordHash,omitempty"` PrimaryGroup *string `json:"primaryGroup,omitempty"` SSHAuthorizedKeys []SSHAuthorizedKey `json:"sshAuthorizedKeys,omitempty"` Shell *string `json:"shell,omitempty"` ShouldExist *bool `json:"shouldExist,omitempty"` System *bool `json:"system,omitempty"` UID *int `json:"uid,omitempty"` }
type Provider ¶
type Provider interface { NewMachine(opts InitOptions) (VM, error) LoadVMByName(name string) (VM, error) List(opts ListOptions) ([]*ListResponse, error) IsValidVMName(name string) (bool, error) CheckExclusiveActiveVM() (bool, string, error) }
type Proxy ¶
type Proxy struct { HTTPProxy *string `json:"httpProxy,omitempty"` HTTPSProxy *string `json:"httpsProxy,omitempty"` NoProxy []NoProxyItem `json:"noProxy,omitempty"` }
type QemuMachineStatus ¶
type QemuMachineStatus = string
type Raid ¶
type Raid struct { Devices []Device `json:"devices"` Level string `json:"level"` Name string `json:"name"` Options []RaidOption `json:"options,omitempty"` Spares *int `json:"spares,omitempty"` }
type RaidOption ¶
type RaidOption string
type RemoteConnectionType ¶
type RemoteConnectionType string
func (RemoteConnectionType) MakeSSHURL ¶
func (rc RemoteConnectionType) MakeSSHURL(host, path, port, userName string) url.URL
type RemoveOptions ¶
type Resource ¶
type Resource struct { Compression *string `json:"compression,omitempty"` HTTPHeaders HTTPHeaders `json:"httpHeaders,omitempty"` Source *string `json:"source,omitempty"` Verification Verification `json:"verification,omitempty"` }
type SSHAuthorizedKey ¶
type SSHAuthorizedKey string
type SSHOptions ¶
type SetOptions ¶
type SetOptions struct {
Rootful bool
}
type StartOptions ¶
type StartOptions struct{}
type StopOptions ¶
type StopOptions struct{}
type Storage ¶
type Storage struct { Directories []Directory `json:"directories,omitempty"` Disks []Disk `json:"disks,omitempty"` Files []File `json:"files,omitempty"` Filesystems []Filesystem `json:"filesystems,omitempty"` Links []Link `json:"links,omitempty"` Luks []Luks `json:"luks,omitempty"` Raid []Raid `json:"raid,omitempty"` }
type TLS ¶
type TLS struct {
CertificateAuthorities []Resource `json:"certificateAuthorities,omitempty"`
}
type VM ¶
type VM interface { Init(opts InitOptions) (bool, error) Remove(name string, opts RemoveOptions) (string, func() error, error) Set(name string, opts SetOptions) error SSH(name string, opts SSHOptions) error Start(name string, opts StartOptions) error Stop(name string, opts StopOptions) error }
type Verification ¶
type Verification struct {
Hash *string `json:"hash,omitempty"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.