Example #1
0
func rollbackAppVersion(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(cmd.Usage, args, 2) {
		return
	}

	wait, _ := cmd.Flags().GetBool(WAIT_FLAG)

	update := marathon.NewApplication(args[0]).RollbackVersion(args[1])
	v, e := client(cmd).UpdateApplication(update, wait)
	cli.Output(Application{v}, e)
}
Example #2
0
func updateAppMemory(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(cmd.Usage, args, 2) {
		return
	}

	wait, _ := cmd.Flags().GetBool(WAIT_FLAG)
	mem, err := strconv.ParseFloat(args[1], 64)

	if err != nil {
		cli.Output(nil, err)
		return
	}
	update := marathon.NewApplication(args[0]).Memory(mem)
	v, e := client(cmd).UpdateApplication(update, wait)
	cli.Output(Application{v}, e)
}