~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/controller/listcontrollers.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:
82
82
        if err != nil {
83
83
                return errors.Annotate(err, "failed to list controllers")
84
84
        }
 
85
        if len(controllers) == 0 && c.out.Name() == "tabular" {
 
86
                ctx.Infof("%s", modelcmd.ErrNoControllersDefined)
 
87
                return nil
 
88
        }
85
89
        if c.refresh && len(controllers) > 0 {
86
90
                var wg sync.WaitGroup
87
91
                wg.Add(len(controllers))
173
177
                                continue
174
178
                        }
175
179
                        totalCount++
176
 
                        if m.Status != string(status.StatusDown) && m.HasVote {
 
180
                        if m.Status != string(status.Down) && m.HasVote {
177
181
                                activeCount++
178
182
                        }
179
183
                }