Also remove the Name field from templates, as the name in the resource suffices

pull/390/head
Dave Cunningham 10 years ago
parent f1b56e202b
commit 86fe388283

@ -414,7 +414,7 @@ func buildTemplateFromType(t string) *common.Template {
func marshalTemplate(template *common.Template) io.ReadCloser { func marshalTemplate(template *common.Template) io.ReadCloser {
j, err := json.Marshal(template) j, err := json.Marshal(template)
if err != nil { if err != nil {
panic(fmt.Errorf("cannot deploy configuration %s: %s\n", template.Name, err)) panic(fmt.Errorf("cannot deploy %s: %s\n", template.ChartInvocation.Name, err))
} }
return ioutil.NopCloser(bytes.NewReader(j)) return ioutil.NopCloser(bytes.NewReader(j))

@ -118,7 +118,6 @@ type Chart struct {
// Manager expands a Template into a Configuration, which // Manager expands a Template into a Configuration, which
// describes the set in a form that can be instantiated. // describes the set in a form that can be instantiated.
type Template struct { type Template struct {
Name string `json:"name"`
ChartInvocation *Resource `json:"content"` ChartInvocation *Resource `json:"content"`
Chart Chart `json:"chart"` Chart Chart `json:"chart"`
} }

Loading…
Cancel
Save