github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/command/v2/ssh_command.go (about) 1 package v2 2 3 import ( 4 "os" 5 6 "code.cloudfoundry.org/cli/cf/cmd" 7 "code.cloudfoundry.org/cli/command" 8 "code.cloudfoundry.org/cli/command/flag" 9 ) 10 11 type SSHCommand struct { 12 RequiredArgs flag.AppName `positional-args:"yes"` 13 AppInstanceIndex int `long:"app-instance-index" short:"i" description:"Application instance index"` 14 Command string `long:"command" short:"c" description:"Command to run. This flag can be defined more than once."` 15 DisablePseudoTTY bool `long:"disable-pseudo-tty" short:"T" description:"Disable pseudo-tty allocation"` 16 ForcePseudoTTY bool `long:"force-pseudo-tty" description:"Force pseudo-tty allocation"` 17 LocalPort string `short:"L" description:"Local port forward specification. This flag can be defined more than once."` 18 RemotePseudoTTY bool `long:"request-pseudo-tty" short:"t" description:"Request pseudo-tty allocation"` 19 SkipHostValidation bool `long:"skip-host-validation" short:"k" description:"Skip host key validation"` 20 SkipRemoteExecution bool `long:"skip-remote-execution" short:"N" description:"Do not execute a remote command"` 21 usage interface{} `usage:"CF_NAME ssh APP_NAME [-i app-instance-index] [-c command] [-L [bind_address:]port:host:hostport] [--skip-host-validation] [--skip-remote-execution] [--request-pseudo-tty] [--force-pseudo-tty] [--disable-pseudo-tty]"` 22 relatedCommands interface{} `related_commands:"allow-space-ssh, enable-ssh, space-ssh-allowed, ssh-code, ssh-enabled"` 23 } 24 25 func (_ SSHCommand) Setup(config command.Config, ui command.UI) error { 26 return nil 27 } 28 29 func (_ SSHCommand) Execute(args []string) error { 30 cmd.Main(os.Getenv("CF_TRACE"), os.Args) 31 return nil 32 }