~dstroppa/juju-core/joyent-provider-storage

« back to all changes in this revision

Viewing changes to environs/bootstrap/state.go

  • Committer: Daniele Stroppa
  • Date: 2014-01-08 15:58:10 UTC
  • mfrom: (1953.1.231 juju-core)
  • Revision ID: daniele.stroppa@joyent.com-20140108155810-xecbwrqkb5i0fyoe
Merging trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        // Characteristics reflect the hardware each state server is running on.
33
33
        // This is used at bootstrap time so the state server knows what hardware it has.
34
34
        // The state *may* be updated later without this information, but by then it's
35
 
        // served it's purpose.
 
35
        // served its purpose.
36
36
        Characteristics []instance.HardwareCharacteristics `yaml:"characteristics,omitempty"`
37
37
}
38
38
 
52
52
        return storage.URL(StateFile)
53
53
}
54
54
 
 
55
// DeleteStateFile deletes the state file on the given storage.
 
56
func DeleteStateFile(storage storage.Storage) error {
 
57
        return storage.Remove(StateFile)
 
58
}
 
59
 
55
60
// SaveState writes the given state to the given storage.
56
61
func SaveState(storage storage.StorageWriter, state *BootstrapState) error {
57
62
        data, err := goyaml.Marshal(state)