metropolis: reduce usage of identity.NodeID

Eventually, we want to be able to rotate node keypairs. To allow this,
the node ID needs to become independent of the public key. This change
is a refactoring which starts this work by reducing the usage of
identity.NodeID, the function which derives a node ID from a public key.

Change-Id: I5231ed0a7be37c23327fec93481b00c74374af07
Reviewed-on: https://review.monogon.dev/c/monogon/+/3445
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/test/launch/BUILD.bazel b/metropolis/test/launch/BUILD.bazel
index 7c6c6d0..50f0ede 100644
--- a/metropolis/test/launch/BUILD.bazel
+++ b/metropolis/test/launch/BUILD.bazel
@@ -44,7 +44,6 @@
         "//metropolis/cli/metroctl/core",
         "//metropolis/node",
         "//metropolis/node/core/curator/proto/api",
-        "//metropolis/node/core/identity",
         "//metropolis/node/core/rpc",
         "//metropolis/node/core/rpc/resolver",
         "//metropolis/proto/api",
diff --git a/metropolis/test/launch/cluster.go b/metropolis/test/launch/cluster.go
index 8be6736..ce9d246 100644
--- a/metropolis/test/launch/cluster.go
+++ b/metropolis/test/launch/cluster.go
@@ -45,7 +45,6 @@
 	"source.monogon.dev/go/qcow2"
 	metroctl "source.monogon.dev/metropolis/cli/metroctl/core"
 	"source.monogon.dev/metropolis/node"
-	"source.monogon.dev/metropolis/node/core/identity"
 	"source.monogon.dev/metropolis/node/core/rpc"
 	"source.monogon.dev/metropolis/node/core/rpc/resolver"
 	"source.monogon.dev/metropolis/test/localregistry"
@@ -525,11 +524,9 @@
 		return nil, fmt.Errorf("could not get nodes: %w", err)
 	}
 	for _, n := range nodes {
-		eid := identity.NodeID(n.Pubkey)
-		if eid != id {
-			continue
+		if n.Id == id {
+			return n, nil
 		}
-		return n, nil
 	}
 	return nil, fmt.Errorf("no such node")
 }
@@ -725,7 +722,7 @@
 			return fmt.Errorf("node has no status and/or address")
 		}
 		node = &NodeInCluster{
-			ID:                identity.NodeID(n.Pubkey),
+			ID:                n.Id,
 			ManagementAddress: n.Status.ExternalAddress,
 		}
 		return nil