Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: state/machine.go

Issue 9820043: Add dirty flag to machine state (Closed)
Patch Set: Add dirty flag to machine state Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « state/assign_test.go ('k') | state/machine_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+}
« no previous file with comments | « state/assign_test.go ('k') | state/machine_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b