treewide: introduce osbase package and move things around
All except localregistry moved from metropolis/pkg to osbase,
localregistry moved to metropolis/test as its only used there anyway.
Change-Id: If1a4bf377364bef0ac23169e1b90379c71b06d72
Reviewed-on: https://review.monogon.dev/c/monogon/+/3079
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/test/launch/cli/launch/main.go b/metropolis/test/launch/cli/launch/main.go
index 2ae3a0c..71c7aa2 100644
--- a/metropolis/test/launch/cli/launch/main.go
+++ b/metropolis/test/launch/cli/launch/main.go
@@ -24,8 +24,9 @@
"path/filepath"
apb "source.monogon.dev/metropolis/proto/api"
- "source.monogon.dev/metropolis/test/launch"
- "source.monogon.dev/metropolis/test/launch/cluster"
+
+ mlaunch "source.monogon.dev/metropolis/test/launch"
+ "source.monogon.dev/osbase/test/launch"
)
func main() {
@@ -45,22 +46,22 @@
defer os.RemoveAll(sd)
var ports []uint16
- for _, p := range cluster.NodePorts {
+ for _, p := range mlaunch.NodePorts {
ports = append(ports, uint16(p))
}
ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt)
doneC := make(chan error)
- tpmf, err := cluster.NewTPMFactory(filepath.Join(ld, "tpm"))
+ tpmf, err := mlaunch.NewTPMFactory(filepath.Join(ld, "tpm"))
if err != nil {
log.Fatalf("NewTPMFactory: %v", err)
}
- err = cluster.LaunchNode(ctx, ld, sd, tpmf, &cluster.NodeOptions{
+ err = mlaunch.LaunchNode(ctx, ld, sd, tpmf, &mlaunch.NodeOptions{
Name: "test-node",
Ports: launch.IdentityPortMap(ports),
SerialPort: os.Stdout,
NodeParameters: &apb.NodeParameters{
Cluster: &apb.NodeParameters_ClusterBootstrap_{
- ClusterBootstrap: cluster.InsecureClusterBootstrap,
+ ClusterBootstrap: mlaunch.InsecureClusterBootstrap,
},
},
}, doneC)