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/cli/metroctl/cmd_node.go b/metropolis/cli/metroctl/cmd_node.go
index d7a23ee..30dd965 100644
--- a/metropolis/cli/metroctl/cmd_node.go
+++ b/metropolis/cli/metroctl/cmd_node.go
@@ -17,7 +17,6 @@
 
 	"source.monogon.dev/go/clitable"
 	"source.monogon.dev/metropolis/cli/metroctl/core"
-	"source.monogon.dev/metropolis/node/core/identity"
 	"source.monogon.dev/version"
 
 	apb "source.monogon.dev/metropolis/proto/api"
@@ -154,13 +153,12 @@
 
 		for _, n := range nodes {
 			// Filter the information we want client-side.
-			nid := identity.NodeID(n.Pubkey)
 			if len(qids) != 0 {
-				if _, e := qids[nid]; !e {
+				if _, e := qids[n.Id]; !e {
 					continue
 				}
 			}
-			if excludedNodes[nid] {
+			if excludedNodes[n.Id] {
 				continue
 			}
 
@@ -450,8 +448,7 @@
 	for _, n := range nodes {
 		// Filter the information we want client-side.
 		if len(qids) != 0 {
-			nid := identity.NodeID(n.Pubkey)
-			if _, e := qids[nid]; !e {
+			if _, e := qids[n.Id]; !e {
 				continue
 			}
 		}