Example #1
0
// NewDestroyCommand returns a DestroyCommand with the systemmanager and client
// endpoints mocked out.
func NewDestroyCommand(api destroySystemAPI, clientapi destroyClientAPI, apierr error) cmd.Command {
	return envcmd.WrapBase(&destroyCommand{
		destroyCommandBase: destroyCommandBase{
			api:       api,
			clientapi: clientapi,
			apierr:    apierr,
		},
	})
}
Example #2
0
// NewKillCommand returns a killCommand with the systemmanager and client
// endpoints mocked out.
func NewKillCommand(api destroySystemAPI,
	clientapi destroyClientAPI,
	apierr error,
	dialFunc func(string) (api.Connection, error)) cmd.Command {
	return envcmd.WrapBase(&killCommand{
		destroyCommandBase{
			api:       api,
			clientapi: clientapi,
			apierr:    apierr,
		},
		dialFunc,
	})
}
Example #3
0
func newKillCommand() cmd.Command {
	return envcmd.WrapBase(&killCommand{})
}
Example #4
0
// NewLoginCommand returns a command to allow the user to login to a controller.
func NewLoginCommand() cmd.Command {
	return envcmd.WrapBase(&loginCommand{})
}
Example #5
0
func newDestroyCommand() cmd.Command {
	return envcmd.WrapBase(&destroyCommand{})
}
Example #6
0
File: list.go Project: imoapps/juju
// NewListCommand returns a command to list the controllers the user knows about.
func NewListCommand() cmd.Command {
	return envcmd.WrapBase(&listCommand{})
}