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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/commands/resolved.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:
21
21
type resolvedCommand struct {
22
22
        modelcmd.ModelCommandBase
23
23
        UnitName string
24
 
        Retry    bool
 
24
        NoRetry  bool
25
25
}
26
26
 
27
27
func (c *resolvedCommand) Info() *cmd.Info {
28
28
        return &cmd.Info{
29
29
                Name:    "resolved",
30
30
                Args:    "<unit>",
31
 
                Purpose: "Marks unit errors resolved.",
 
31
                Purpose: "Marks unit errors resolved and re-executes failed hooks",
32
32
        }
33
33
}
34
34
 
35
35
func (c *resolvedCommand) SetFlags(f *gnuflag.FlagSet) {
36
36
        c.ModelCommandBase.SetFlags(f)
37
 
        f.BoolVar(&c.Retry, "r", false, "Re-execute failed hooks")
38
 
        f.BoolVar(&c.Retry, "retry", false, "")
 
37
        f.BoolVar(&c.NoRetry, "no-retry", false, "Do not re-execute failed hooks on the unit")
39
38
}
40
39
 
41
40
func (c *resolvedCommand) Init(args []string) error {
57
56
                return err
58
57
        }
59
58
        defer client.Close()
60
 
        return block.ProcessBlockedError(client.Resolved(c.UnitName, c.Retry), block.BlockChange)
 
59
        return block.ProcessBlockedError(client.Resolved(c.UnitName, c.NoRetry), block.BlockChange)
61
60
}