incus

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2020-2026 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IncusExecutor

type IncusExecutor struct {
	*base.BaseExecutor

	Client incus.InstanceServer
	Config *incus_config.Config
}

func NewIncusExecutorWithEmitter

func NewIncusExecutorWithEmitter(endpoint, configdir string,
	entrypoint []string, ephemeral, showCmdsOutput,
	runtimeCmdsOutput bool, emitter base.LxdCExecutorEmitter) *IncusExecutor

func (*IncusExecutor) AddAlias2Image

func (e *IncusExecutor) AddAlias2Image(fingerprint string, alias incus_api.ImageAlias,
	server incus.InstanceServer) error

func (*IncusExecutor) AddProfiles2Instance

func (e *IncusExecutor) AddProfiles2Instance(name string, profiles []string) error

func (*IncusExecutor) CopyContainerOnInstance

func (e *IncusExecutor) CopyContainerOnInstance(
	containerName, newContainerName string) error

func (*IncusExecutor) CopyImage

func (e *IncusExecutor) CopyImage(imageFingerprint string, remote incus.ImageServer, to incus.InstanceServer) error

func (*IncusExecutor) CreateACL

func (e *IncusExecutor) CreateACL(acl *specs.LxdCAcl) error

func (*IncusExecutor) CreateCertificate

func (e *IncusExecutor) CreateCertificate(cert *specs.LxdCCertificate) error

func (*IncusExecutor) CreateContainer

func (e *IncusExecutor) CreateContainer(name, fingerprint, imageServer string, profiles []string) error

func (*IncusExecutor) CreateContainerWithConfig

func (e *IncusExecutor) CreateContainerWithConfig(name, fingerprint, imageServer string, profiles []string, configMap map[string]string) error

func (*IncusExecutor) CreateImageFromContainer

func (l *IncusExecutor) CreateImageFromContainer(containerName string, aliases []string,
	properties map[string]string, compressionAlgorithm string, public bool) (string, error)

func (*IncusExecutor) CreateNetwork

func (e *IncusExecutor) CreateNetwork(net specs.LxdCNetwork) error

func (*IncusExecutor) CreateProfile

func (e *IncusExecutor) CreateProfile(profile specs.LxdCProfile) error

func (*IncusExecutor) CreateStorage

func (e *IncusExecutor) CreateStorage(sto specs.LxdCStorage) error

func (*IncusExecutor) DeleteCertificate

func (e *IncusExecutor) DeleteCertificate(fingerprint string) error

func (*IncusExecutor) DeleteContainer

func (e *IncusExecutor) DeleteContainer(containerName string) error

func (*IncusExecutor) DeleteContainerDir

func (e *IncusExecutor) DeleteContainerDir(name, dir string) error

func (*IncusExecutor) DeleteImageAliases

func (e *IncusExecutor) DeleteImageAliases(image *incus_api.Image, server incus.InstanceServer) error

Delete all local alias defined on input Image to avoid conflict on pull.

func (*IncusExecutor) DeleteImageAliases4Alias

func (e *IncusExecutor) DeleteImageAliases4Alias(imageAlias string, server incus.InstanceServer) error

Delete alias from image of a specific ContainerServer if available

func (*IncusExecutor) DeleteImageByFingerprint

func (e *IncusExecutor) DeleteImageByFingerprint(f string) error

func (*IncusExecutor) DoAction2Container

func (e *IncusExecutor) DoAction2Container(name, action string) error

func (*IncusExecutor) DownloadImage

func (e *IncusExecutor) DownloadImage(imageFingerprint string, remote incus.ImageServer) error

func (*IncusExecutor) FindImage

func (e *IncusExecutor) FindImage(image, imageRemoteServer string) (string, incus.ImageServer, string, error)

func (*IncusExecutor) GetAclList

func (e *IncusExecutor) GetAclList() ([]string, error)

func (*IncusExecutor) GetCertificates

func (e *IncusExecutor) GetCertificates() ([]*specs.LxdCCertificate, error)

func (*IncusExecutor) GetContainerList

func (e *IncusExecutor) GetContainerList() ([]string, error)

func (*IncusExecutor) GetImage

func (e *IncusExecutor) GetImage(image string, remote incus.ImageServer) (*incus_api.Image, error)

Retrieve Image from alias or fingerprint to a specific remote.

func (*IncusExecutor) GetInstance

func (e *IncusExecutor) GetInstance(name string) (*incus_api.Instance, string, error)

Get instance data and the ETag

func (*IncusExecutor) GetNetworkList

func (e *IncusExecutor) GetNetworkList() ([]string, error)

func (*IncusExecutor) GetProfilesList

func (e *IncusExecutor) GetProfilesList() ([]string, error)

func (*IncusExecutor) GetStorageList

func (e *IncusExecutor) GetStorageList() ([]string, error)

func (*IncusExecutor) GetType

func (e *IncusExecutor) GetType() string

func (*IncusExecutor) IsEphemeralContainer

func (e *IncusExecutor) IsEphemeralContainer(containerName string) (bool, error)

func (*IncusExecutor) IsPresentACL

func (e *IncusExecutor) IsPresentACL(name string) (bool, error)

func (*IncusExecutor) IsPresentCertificate

func (e *IncusExecutor) IsPresentCertificate(certName string) (bool, error)

func (*IncusExecutor) IsPresentContainer

func (e *IncusExecutor) IsPresentContainer(containerName string) (bool, error)

func (*IncusExecutor) IsPresentNetwork

func (e *IncusExecutor) IsPresentNetwork(name string) (bool, error)

func (*IncusExecutor) IsPresentProfile

func (e *IncusExecutor) IsPresentProfile(profileName string) (bool, error)

func (*IncusExecutor) IsPresentStorage

func (e *IncusExecutor) IsPresentStorage(name string) (bool, error)

func (*IncusExecutor) IsRunningContainer

func (e *IncusExecutor) IsRunningContainer(name string) (bool, error)

func (*IncusExecutor) LaunchContainer

func (e *IncusExecutor) LaunchContainer(name, fingerprint string, profiles []string) error

func (*IncusExecutor) LaunchContainerType

func (e *IncusExecutor) LaunchContainerType(name, fingerprint string, profiles []string, configMap map[string]string, ephemeral bool) error

func (*IncusExecutor) LaunchContainerWithConfig

func (e *IncusExecutor) LaunchContainerWithConfig(name, fingerprint string, profiles []string, configMap map[string]string) error

func (*IncusExecutor) PullImage

func (e *IncusExecutor) PullImage(imageAlias, imageRemoteServer string) (string, error)

func (*IncusExecutor) PurgeImages

func (e *IncusExecutor) PurgeImages(opts *base.PurgeOpts) error

func (*IncusExecutor) RecursiveMkdir

func (e *IncusExecutor) RecursiveMkdir(nameContainer string, dir string, mode *os.FileMode, uid int64, gid int64) error

Based on code of lxc client tool https://github.com/canonical/lxd/blob/master/lxc/file.go

func (*IncusExecutor) RecursivePullFile

func (l *IncusExecutor) RecursivePullFile(nameContainer string, destPath string, localPath string, localAsTarget bool) error

Based on code of lxc client tool https://github.com/canonical/lxd/blob/master/lxc/file.go

func (*IncusExecutor) RecursivePushFile

func (e *IncusExecutor) RecursivePushFile(nameContainer, source, target string) error

Based on code of lxc client tool https://github.com/canonical/lxd/blob/master/lxc/file.go

func (*IncusExecutor) RemoveProfilesFromInstance

func (e *IncusExecutor) RemoveProfilesFromInstance(name string, profiles []string) error

func (*IncusExecutor) RunCommand

func (e *IncusExecutor) RunCommand(containerName, command string, envs map[string]string,
	entryPoint []string, uid, gid *uint32, cwd string) (int, error)

func (*IncusExecutor) RunCommandWithOutput

func (e *IncusExecutor) RunCommandWithOutput(containerName, command string,
	envs map[string]string, outBuffer, errBuffer io.WriteCloser, entryPoint []string,
	uid, gid *uint32, cwd string) (int, error)

func (*IncusExecutor) RunCommandWithOutput4Var

func (e *IncusExecutor) RunCommandWithOutput4Var(containerName, command, outVar,
	errVar string, envs *map[string]string, entryPoint []string, uid, gid *uint32, cwd string) (int, error)

func (*IncusExecutor) Setup

func (e *IncusExecutor) Setup() error

func (*IncusExecutor) StartContainer

func (e *IncusExecutor) StartContainer(name string) error

func (*IncusExecutor) StopContainer

func (e *IncusExecutor) StopContainer(name string) error

func (*IncusExecutor) SyncNetworkForwarders

func (e *IncusExecutor) SyncNetworkForwarders(net *specs.LxdCNetwork) error

func (*IncusExecutor) UpdateACL

func (e *IncusExecutor) UpdateACL(acl *specs.LxdCAcl) error

func (*IncusExecutor) UpdateInstance

func (e *IncusExecutor) UpdateInstance(
	name string, idata *incus_api.InstancePut,
	etag string) error

func (*IncusExecutor) UpdateNetwork

func (e *IncusExecutor) UpdateNetwork(net specs.LxdCNetwork) error

func (*IncusExecutor) UpdateProfile

func (e *IncusExecutor) UpdateProfile(profile specs.LxdCProfile) error

func (*IncusExecutor) UpdateStorage

func (e *IncusExecutor) UpdateStorage(sto specs.LxdCStorage) error

func (*IncusExecutor) WaitIpOfContainer

func (e *IncusExecutor) WaitIpOfContainer(containerName string, timeout int64) error

func (*IncusExecutor) WaitOperation

func (e *IncusExecutor) WaitOperation(rawOp interface{}, p *incus_cli.ProgressRenderer) error

Jump to

Keyboard shortcuts

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