~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/worker/uniter/operation/factory.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        }, nil
106
106
}
107
107
 
 
108
// NewFailAction is part of the factory interface.
 
109
func (f *factory) NewFailAction(actionId string) (Operation, error) {
 
110
        if !names.IsValidAction(actionId) {
 
111
                return nil, errors.Errorf("invalid action id %q", actionId)
 
112
        }
 
113
        return &failAction{
 
114
                actionId:  actionId,
 
115
                callbacks: f.config.Callbacks,
 
116
        }, nil
 
117
}
 
118
 
108
119
// NewCommands is part of the Factory interface.
109
120
func (f *factory) NewCommands(args CommandArgs, sendResponse CommandResponseFunc) (Operation, error) {
110
121
        if args.Commands == "" {