github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/core/migration/minionreports.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package migration 5 6 // MinionReports returns information about the migration minion 7 // reports received so far for a given migration phase. 8 type MinionReports struct { 9 // ModelUUID holds the unique identifier for the model migration. 10 MigrationId string 11 12 // Phases indicates the migration phase the reports relate to. 13 Phase Phase 14 15 // SuccesCount indicates how many agents have successfully 16 // completed the migration phase. 17 SuccessCount int 18 19 // UnknownCount indicates how many agents are yet to report 20 // regarding the migration phase. 21 UnknownCount int 22 23 // SomeUnknownMachines holds the ids of some of the machines which 24 // have not yet reported in. 25 SomeUnknownMachines []string 26 27 // SomeUnknownUnits holds the names of some of the units which 28 // have not yet reported in. 29 SomeUnknownUnits []string 30 31 // FailedMachines holds the ids of machines which have failed to 32 // complete the migration phase. 33 FailedMachines []string 34 35 // FailedUnits holds the names of units which have failed to 36 // complete the migration phase. 37 FailedUnits []string 38 } 39 40 // IsZero returns true if the MinionReports instance hasn't been set. 41 func (r *MinionReports) IsZero() bool { 42 return r.MigrationId == "" && r.Phase == UNKNOWN 43 }