Skip to content

Commit

Permalink
Use VM name when listing tunnels in case multiple VMs have same hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
activeshadow committed Sep 11, 2023
1 parent eff2ec1 commit 963858a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/minimega/cc_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,12 @@ func cliCCTunnel(ns *Namespace, c *minicli.Command, resp *minicli.Response) erro
clients := ns.ccServer.GetClients()

for _, client := range clients {
vms[client.Hostname] = client.UUID
vm := ns.FindVM(client.UUID)
if vm == nil {
return vmNotFound(client.UUID)
}

vms[vm.GetName()] = client.UUID
}
} else {
vm := ns.FindVM(v)
Expand Down

0 comments on commit 963858a

Please sign in to comment.