Skip to content

installers.virt.lima #

lima

To get started



import incubaid.herolib.installers.virt.lima as lima_installer

heroscript:='
!!lima.install
'

lima_installer.play(heroscript=heroscript)!

//or we can call the default and do a start with reset
mut installer:= lima_installer.get()!
installer.start(reset:true)!

Constants #

const version = '1.2.1'

fn delete #

fn delete(args ArgsGet) !

fn exists #

fn exists(args ArgsGet) !bool

does the config exists?

fn get #

fn get(args ArgsGet) !&LimaInstaller

fn heroscript_loads #

fn heroscript_loads(heroscript string) !LimaInstaller

///////////NORMALLY NO NEED TO TOUCH

fn list #

fn list(args ArgsList) ![]&LimaInstaller

if fromdb set: load from filesystem, and not from mem, will also reset what is in mem

fn new #

fn new(args ArgsGet) !&LimaInstaller

fn play #

fn play(mut plbook PlayBook) !

fn set #

fn set(o LimaInstaller) !

register the config for the future

fn switch #

fn switch(name string)

switch instance to be used for lima

struct ArgsGet #

@[params]
struct ArgsGet {
pub mut:
	name   string = 'default'
	fromdb bool // will load from filesystem
	create bool // default will not create if not exist
}

///////FACTORY

struct ArgsList #

@[params]
struct ArgsList {
pub mut:
	fromdb bool // will load from filesystem
}

struct InstallArgs #

@[params]
struct InstallArgs {
pub mut:
	reset bool
}

struct LimaInstaller #

@[heap]
struct LimaInstaller {
pub mut:
	name    string = 'default'
	homedir string
	extra   bool   // do we want to extra's
	sshkey  string // name of the key to use
}

THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED

fn (LimaInstaller) destroy #

fn (mut self LimaInstaller) destroy() !

fn (LimaInstaller) install #

fn (mut self LimaInstaller) install(args InstallArgs) !

fn (LimaInstaller) install_start #

fn (mut self LimaInstaller) install_start(args InstallArgs) !

fn (LimaInstaller) reload #

fn (mut self LimaInstaller) reload() !

load from disk and make sure is properly intialized

fn (LimaInstaller) restart #

fn (mut self LimaInstaller) restart() !

fn (LimaInstaller) running #

fn (mut self LimaInstaller) running() !bool

fn (LimaInstaller) start #

fn (mut self LimaInstaller) start() !

fn (LimaInstaller) stop #

fn (mut self LimaInstaller) stop() !