github.com/elopio/cli@v6.21.2-0.20160902224010-ea909d1fdb2f+incompatible/commands/v2/scale_command.go (about)

     1  package v2
     2  
     3  import (
     4  	"os"
     5  
     6  	"code.cloudfoundry.org/cli/cf/cmd"
     7  	"code.cloudfoundry.org/cli/commands"
     8  	"code.cloudfoundry.org/cli/commands/flags"
     9  )
    10  
    11  type ScaleCommand struct {
    12  	RequiredArgs    flags.AppName `positional-args:"yes"`
    13  	ForceRestart    bool          `short:"f" description:"Force restart of app without prompt"`
    14  	NumInstances    int           `short:"i" description:"Number of instances"`
    15  	DiskLimit       string        `short:"k" description:"Disk limit (e.g. 256M, 1024M, 1G)"`
    16  	MemoryLimit     string        `short:"m" description:"Memory limit (e.g. 256M, 1024M, 1G)"`
    17  	usage           interface{}   `usage:"CF_NAME scale APP_NAME [-i INSTANCES] [-k DISK] [-m MEMORY] [-f]"`
    18  	relatedCommands interface{}   `related_commands:"push"`
    19  }
    20  
    21  func (_ ScaleCommand) Setup(config commands.Config, ui commands.UI) error {
    22  	return nil
    23  }
    24  
    25  func (_ ScaleCommand) Execute(args []string) error {
    26  	cmd.Main(os.Getenv("CF_TRACE"), os.Args)
    27  	return nil
    28  }