Adding skeleton for the drain command.

This commit is contained in:
Renan DelValle 2017-12-02 15:53:45 -08:00
parent a097ba092d
commit 51ff20165e

27
cmd/drain.go Normal file
View file

@ -0,0 +1,27 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(drainCmd)
}
var drainCmd = &cobra.Command{
Use: "drain [space separated host list]",
Short: "Place a list of space separated Mesos Agents into maintenance mode.",
Long: `Adds a Mesos Agent to Aurora's Drain list. Agents in this list
are not allowed to schedule new tasks and any tasks already running on this Agent
are killed and rescheduled in an Agent that is not in maintenance mode. Command
expects a space separated list of hosts to place into maintenance mode.`,
Args: cobra.MinimumNArgs(1),
Run: drain,
}
func drain(cmd *cobra.Command, args []string) {
fmt.Print(args)
}