Index: state/machine.go |
=== modified file 'state/machine.go' |
--- state/machine.go 2013-06-07 10:54:03 +0000 |
+++ state/machine.go 2013-06-10 10:27:31 +0000 |
@@ -64,6 +64,7 @@ |
TxnRevno int64 `bson:"txn-revno"` |
Jobs []MachineJob |
PasswordHash string |
+ Clean bool |
} |
func newMachine(st *State, doc *machineDoc) *Machine { |
@@ -529,3 +530,8 @@ |
} |
return nil |
} |
+ |
+// Clean returns true if the machine does not have any deployed units or containers. |
+func (m *Machine) Clean() bool { |
+ return m.doc.Clean |
+} |