Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Fix for feature "expose all notes manifest attributes in '.service_nodes'" #70

Merged
merged 1 commit into from
Feb 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions work/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ type HookInfo struct {
}

type ServiceManifest struct {
GgnMinimalVersion common.Version `yaml:"ggnMinimalVersion"`
ConcurrentUpdater int `yaml:"concurrentUpdater"`
Containers []common.ACFullname `yaml:"containers"`
ExecStartPre []string `yaml:"execStartPre"`
ExecStart []string `yaml:"execStart"`
Nodes interface{} `yaml:"nodes"`
ExposeNodesInUnitEnv bool `yaml:"exposeNodesInUnitEnv"`
GgnMinimalVersion common.Version `yaml:"ggnMinimalVersion"`
ConcurrentUpdater int `yaml:"concurrentUpdater"`
Containers []common.ACFullname `yaml:"containers"`
ExecStartPre []string `yaml:"execStartPre"`
ExecStart []string `yaml:"execStart"`
Nodes interface{} `yaml:"nodes"`
}

type UnitType int
Expand Down
4 changes: 3 additions & 1 deletion work/unit-generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func (u *Unit) Generate(tmpl *template.Templating) error {
}
data["aciList"] = aciList
data["acis"] = acis
data["service_nodes"] = u.Service.nodesAsJsonMap
if u.Service.manifest.ExposeNodesInUnitEnv {
data["service_nodes"] = u.Service.nodesAsJsonMap
}

out, err := json.Marshal(data)
if err != nil {
Expand Down