Skip to content

Commit

Permalink
Merge pull request #323 from subutai-io/sysnet
Browse files Browse the repository at this point in the history
Sysnet
  • Loading branch information
emli authored Mar 19, 2018
2 parents e49909c + 6481d99 commit 5a6aac2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 8 additions & 6 deletions libgorjun/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,14 @@ func TestListPriority(t *testing.T) {
g := NewGorjunServer()
g.Register(g.Username)

artifactType := "template"
v.Upload("data/postgres-subutai-template_4.0.0_amd64.tar.gz", "template", "false")
err := g.Uploads(artifactType, "false")
if err != nil {
t.Errorf("Failed to uploads %s: %v", err, artifactType)
}
//artifactType := "template"
v.Upload("data/ceph-subutai-template_4.0.0_amd64.tar.gz", "template", "false")
v.Upload("data/master-subutai-template_4.0.0_amd64.tar.gz", "template", "false")

//err := g.Uploads(artifactType, "false")
//if err != nil {
// t.Errorf("Failed to uploads %s: %v", err, artifactType)
//}
fmt.Println("Token for user " + g.Username + " = " + g.Token)
fmt.Println("Token for user " + v.Username + " = " + v.Token)

Expand Down
5 changes: 4 additions & 1 deletion template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,16 @@ func appendConfig(confPath string, item download.ListItem) error {
if latestVerified.ID == "" {
return errors.New("Can't find parent of template")
}
SetContainerConf(confPath, [][]string{
err := SetContainerConf(confPath, [][]string{
{"subutai.template", item.Name},
{"subutai.template.owner", item.Owner[0]},
{"subutai.parent", latestVerified.Name},
{"subutai.parent.owner", latestVerified.Owner[0]},
{"subutai.parent.version", latestVerified.Version},
})
if err != nil {
return errors.New("Can't set configs")
}
return nil
}

Expand Down

0 comments on commit 5a6aac2

Please sign in to comment.