Golang client SDK to interact with canonical's multipass.
instance, err := multipass.Launch(&multipass.LaunchReq{
CPU: 2,
Name: "instanceName",
})
if err != nil {
t.Fatal(err)
}
if err := multipass.Delete(&multipass.DeleteRequest{Name:instance.Name}); err != nil {
t.Fatal(err)
}
instanceInfo, err := multipass.Info(&multipass.InfoRequest{Name:instance.Name})
if err != nil {
t.Fatal(err)
}
err = multipass.Exec(&multipass.ExecRequest{Name:instanceInfo.Name, Command:"ls"})
if err != nil {
t.Fatal(err)
}
- Cover all the commandline parameters of multipass
- More documentation and examples to be added