forked from cloudfoundry/bosh-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment_state_service.go
46 lines (40 loc) · 1.34 KB
/
deployment_state_service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package config
import (
biproperty "github.com/cloudfoundry/bosh-utils/property"
)
type DeploymentState struct {
DirectorID string `json:"director_id"`
InstallationID string `json:"installation_id"`
CurrentVMCID string `json:"current_vm_cid"`
CurrentStemcellID string `json:"current_stemcell_id"`
CurrentDiskID string `json:"current_disk_id"`
CurrentReleaseIDs []string `json:"current_release_ids"`
CurrentManifestSHA string `json:"current_manifest_sha"`
Disks []DiskRecord `json:"disks"`
Stemcells []StemcellRecord `json:"stemcells"`
Releases []ReleaseRecord `json:"releases"`
}
type StemcellRecord struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
CID string `json:"cid"`
}
type DiskRecord struct {
ID string `json:"id"`
CID string `json:"cid"`
Size int `json:"size"`
CloudProperties biproperty.Map `json:"cloud_properties"`
}
type ReleaseRecord struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
}
type DeploymentStateService interface {
Path() string
Exists() bool
Load() (DeploymentState, error)
Save(DeploymentState) error
Cleanup() error
}