|
@@ -5,16 +5,19 @@ import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+var force bool
|
|
|
|
+
|
|
var nodeDeleteCmd = &cobra.Command{
|
|
var nodeDeleteCmd = &cobra.Command{
|
|
Use: "delete [NETWORK NAME] [NODE ID]",
|
|
Use: "delete [NETWORK NAME] [NODE ID]",
|
|
Args: cobra.ExactArgs(2),
|
|
Args: cobra.ExactArgs(2),
|
|
Short: "Delete a Node",
|
|
Short: "Delete a Node",
|
|
Long: `Delete a Node`,
|
|
Long: `Delete a Node`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
- functions.PrettyPrint(functions.DeleteNode(args[0], args[1]))
|
|
|
|
|
|
+ functions.PrettyPrint(functions.DeleteNode(args[0], args[1], force))
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
|
|
func init() {
|
|
func init() {
|
|
rootCmd.AddCommand(nodeDeleteCmd)
|
|
rootCmd.AddCommand(nodeDeleteCmd)
|
|
|
|
+ nodeDeleteCmd.PersistentFlags().BoolVarP(&force, "force", "f", false, "force delete a node")
|
|
}
|
|
}
|