Example #1
0
File: app.go Project: tsuru/tsuru
func (app *App) Shell(opts provision.ShellOptions) error {
	opts.App = app
	prov, err := app.getProvisioner()
	if err != nil {
		return err
	}
	if shellProv, ok := prov.(provision.ShellProvisioner); ok {
		return shellProv.Shell(opts)
	} else {
		return provision.ProvisionerNotSupported{Prov: prov, Action: "running shell"}
	}
}
Example #2
0
func (app *App) Shell(opts provision.ShellOptions) error {
	opts.App = app
	return Provisioner.Shell(opts)
}