mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 08:53:05 +00:00
Update command with new fields
This commit is contained in:
parent
06c928bc52
commit
79704dc9b0
1 changed files with 6 additions and 6 deletions
|
@ -215,8 +215,8 @@ var expireNodeCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
var renameNodeCmd = &cobra.Command{
|
var renameNodeCmd = &cobra.Command{
|
||||||
Use: "rename NEW_NAME",
|
Use: "rename NEW_NAME",
|
||||||
Short: "Renames a machine in your network",
|
Short: "Renames a machine in your network",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
output, _ := cmd.Flags().GetString("output")
|
output, _ := cmd.Flags().GetString("output")
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ var renameNodeCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
request := &v1.RenameMachineRequest{
|
request := &v1.RenameMachineRequest{
|
||||||
MachineId: identifier,
|
MachineId: identifier,
|
||||||
NewName: newName,
|
NewName: newName,
|
||||||
}
|
}
|
||||||
|
|
||||||
response, err := client.RenameMachine(ctx, request)
|
response, err := client.RenameMachine(ctx, request)
|
||||||
|
@ -358,8 +358,8 @@ func nodesToPtables(
|
||||||
tableData := pterm.TableData{
|
tableData := pterm.TableData{
|
||||||
{
|
{
|
||||||
"ID",
|
"ID",
|
||||||
"Name",
|
"Hostname",
|
||||||
"Nickname",
|
"Friendly name",
|
||||||
"NodeKey",
|
"NodeKey",
|
||||||
"Namespace",
|
"Namespace",
|
||||||
"IP addresses",
|
"IP addresses",
|
||||||
|
@ -424,7 +424,7 @@ func nodesToPtables(
|
||||||
[]string{
|
[]string{
|
||||||
strconv.FormatUint(machine.Id, headscale.Base10),
|
strconv.FormatUint(machine.Id, headscale.Base10),
|
||||||
machine.Name,
|
machine.Name,
|
||||||
machine.Nickname,
|
machine.GivenName,
|
||||||
nodeKey.ShortString(),
|
nodeKey.ShortString(),
|
||||||
namespace,
|
namespace,
|
||||||
strings.Join(machine.IpAddresses, ", "),
|
strings.Join(machine.IpAddresses, ", "),
|
||||||
|
|
Loading…
Reference in a new issue