veyron/services/mgmt/node/impl: implement Resume and Suspend
Details:
- factor out common code shared between Resume and Start, and between Suspend
and Stop respectively; break up creating and running a command, and also
creating an instance from running the instance
- introduce a different way to track the state of the instance; instead of
renaming the instance dir to "stopped-<>", we now have a status file inside
each instance dir, whose name reflects the current state of the instance
("suspended", "started", "stopped", "starting", "suspending",
"stopping"). Transition between these states is marked with os.Rename, which
should be atomic.
- add version link from each instance to the installation version it was created
from; needed by Resume
Change-Id: I3bc9cc8eada505edebb8117b0bf9313bbe81898d
2 files changed