art: Drop provider from c3os code

Part of: https://github.com/c3os-io/c3os/issues/68
This commit is contained in:
mudler 2022-08-10 18:56:07 +02:00 committed by Itxaka
parent 43907c8d95
commit c2721eb53c
3 changed files with 4 additions and 34 deletions

View File

@ -11,8 +11,9 @@ import (
"github.com/c3os-io/c3os/internal/bus"
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"
machine "github.com/c3os-io/c3os/pkg/machine"
bundles "github.com/c3os-io/c3os/sdk/bundles"
"github.com/c3os-io/c3os/internal/github"
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 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])})
},
},
{

View File

@ -6,8 +6,8 @@ import (
"net"
"time"
"github.com/c3os-io/c3os/internal/utils"
"github.com/c3os-io/c3os/pkg/config"
"github.com/c3os-io/c3os/pkg/utils"
"github.com/ipfs/go-log"
"github.com/mudler/edgevpn/api"
"github.com/mudler/edgevpn/pkg/logger"

View File

@ -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)
}
}