mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-15 14:10:49 +00:00
art: Drop provider from c3os code
Part of: https://github.com/c3os-io/c3os/issues/68
This commit is contained in:
@@ -11,8 +11,9 @@ import (
|
|||||||
"github.com/c3os-io/c3os/internal/bus"
|
"github.com/c3os-io/c3os/internal/bus"
|
||||||
|
|
||||||
cmd "github.com/c3os-io/c3os/internal/cmd"
|
cmd "github.com/c3os-io/c3os/internal/cmd"
|
||||||
machine "github.com/c3os-io/c3os/internal/machine"
|
|
||||||
providerConfig "github.com/c3os-io/c3os/internal/provider/config"
|
providerConfig "github.com/c3os-io/c3os/internal/provider/config"
|
||||||
|
machine "github.com/c3os-io/c3os/pkg/machine"
|
||||||
|
bundles "github.com/c3os-io/c3os/sdk/bundles"
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/internal/github"
|
"github.com/c3os-io/c3os/internal/github"
|
||||||
config "github.com/c3os-io/c3os/pkg/config"
|
config "github.com/c3os-io/c3os/pkg/config"
|
||||||
@@ -179,7 +180,7 @@ E.g. c3os-agent install-bundle container:quay.io/c3os/c3os...
|
|||||||
return fmt.Errorf("bundle name required")
|
return fmt.Errorf("bundle name required")
|
||||||
}
|
}
|
||||||
|
|
||||||
return machine.RunBundles([]machine.BundleOption{machine.WithRepository(c.String("repository")), machine.WithTarget(args[0])})
|
return bundles.RunBundles([]bundles.BundleOption{bundles.WithRepository(c.String("repository")), bundles.WithTarget(args[0])})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -6,8 +6,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/internal/utils"
|
|
||||||
"github.com/c3os-io/c3os/pkg/config"
|
"github.com/c3os-io/c3os/pkg/config"
|
||||||
|
"github.com/c3os-io/c3os/pkg/utils"
|
||||||
"github.com/ipfs/go-log"
|
"github.com/ipfs/go-log"
|
||||||
"github.com/mudler/edgevpn/api"
|
"github.com/mudler/edgevpn/api"
|
||||||
"github.com/mudler/edgevpn/pkg/logger"
|
"github.com/mudler/edgevpn/pkg/logger"
|
||||||
|
@@ -1,31 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/sdk/bus"
|
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/internal/provider"
|
|
||||||
"github.com/mudler/go-pluggable"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
factory := pluggable.NewPluginFactory()
|
|
||||||
|
|
||||||
// Input: bus.EventInstallPayload
|
|
||||||
// Expected output: map[string]string{}
|
|
||||||
factory.Add(bus.EventInstall, provider.Install)
|
|
||||||
|
|
||||||
factory.Add(bus.EventBootstrap, provider.Bootstrap)
|
|
||||||
|
|
||||||
// Input: config
|
|
||||||
// Expected output: string
|
|
||||||
factory.Add(bus.EventChallenge, provider.Challenge)
|
|
||||||
|
|
||||||
err := factory.Run(pluggable.EventType(os.Args[1]), os.Stdin, os.Stdout)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user