Ability to clear nickname

This commit is contained in:
bravechamp 2022-03-13 21:10:41 +00:00
parent 663e8384a3
commit 9901d6b2e7

View file

@ -235,9 +235,13 @@ var renameNodeCmd = &cobra.Command{
defer cancel()
defer conn.Close()
newName := ""
if len(args) > 0 {
newName = args[0]
}
request := &v1.RenameMachineRequest{
MachineId: identifier,
NewName: args[0],
NewName: newName,
}
response, err := client.RenameMachine(ctx, request)