Skip to content

Commit

Permalink
Rename Machine to Node (juanfont#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfont authored Sep 24, 2023
1 parent 096ac31 commit 0030af3
Show file tree
Hide file tree
Showing 57 changed files with 5,223 additions and 5,239 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### BREAKING

- Code reorganisation, a lot of code has moved, please review the following PRs accordingly [#1444](https://github.com/juanfont/headscale/pull/1444)
- Rename Machine into Node [#1553](https://github.com/juanfont/headscale/pull/1553)

### Changes

Expand Down
10 changes: 5 additions & 5 deletions cmd/headscale/cli/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var debugCmd = &cobra.Command{

var createNodeCmd = &cobra.Command{
Use: "create-node",
Short: "Create a node (machine) that can be registered with `nodes register <>` command",
Short: "Create a node that can be registered with `nodes register <>` command",
Run: func(cmd *cobra.Command, args []string) {
output, _ := cmd.Flags().GetString("output")

Expand Down Expand Up @@ -115,24 +115,24 @@ var createNodeCmd = &cobra.Command{
return
}

request := &v1.DebugCreateMachineRequest{
request := &v1.DebugCreateNodeRequest{
Key: machineKey,
Name: name,
User: user,
Routes: routes,
}

response, err := client.DebugCreateMachine(ctx, request)
response, err := client.DebugCreateNode(ctx, request)
if err != nil {
ErrorOutput(
err,
fmt.Sprintf("Cannot create machine: %s", status.Convert(err).Message()),
fmt.Sprintf("Cannot create node: %s", status.Convert(err).Message()),
output,
)

return
}

SuccessOutput(response.Machine, "Machine created", output)
SuccessOutput(response.Node, "Node created", output)
},
}
Loading

0 comments on commit 0030af3

Please sign in to comment.