Skip to content

Commit

Permalink
Merge pull request #518 from fabricematrat/add-xenial
Browse files Browse the repository at this point in the history
Add support to Xenial
  • Loading branch information
jujugui committed Jan 25, 2016
2 parents 2ffb927 + 87c90eb commit ef8e5e8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 21 deletions.
43 changes: 22 additions & 21 deletions internal/series/series.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,32 @@ type SeriesInfo struct {
// Series contains the data charmstore knows about series names
var Series = map[string]SeriesInfo{
// Bundle
"bundle": SeriesInfo{false, "", true, 1.1255},
"bundle": {false, "", true, 1.1255},

// Ubuntu
"oneiric": SeriesInfo{true, Ubuntu, false, 0},
"precise": SeriesInfo{true, Ubuntu, true, 1.1125},
"quantal": SeriesInfo{true, Ubuntu, false, 0},
"raring": SeriesInfo{true, Ubuntu, false, 0},
"saucy": SeriesInfo{true, Ubuntu, false, 0},
"trusty": SeriesInfo{true, Ubuntu, true, 1.125},
"utopic": SeriesInfo{true, Ubuntu, false, 0},
"vivid": SeriesInfo{true, Ubuntu, true, 1.101},
"wily": SeriesInfo{true, Ubuntu, true, 1.102},
"oneiric": {true, Ubuntu, false, 0},
"precise": {true, Ubuntu, true, 1.1125},
"quantal": {true, Ubuntu, false, 0},
"raring": {true, Ubuntu, false, 0},
"saucy": {true, Ubuntu, false, 0},
"trusty": {true, Ubuntu, true, 1.125},
"utopic": {true, Ubuntu, false, 0},
"vivid": {true, Ubuntu, true, 1.101},
"wily": {true, Ubuntu, true, 1.102},
"xenial": {true, Ubuntu, true, 1.103},

// Windows
"win2012hvr2": SeriesInfo{true, Windows, true, 1.1},
"win2012hv": SeriesInfo{true, Windows, true, 1.1},
"win2012r2": SeriesInfo{true, Windows, true, 1.1},
"win2012": SeriesInfo{true, Windows, true, 1.1},
"win7": SeriesInfo{true, Windows, true, 1.1},
"win8": SeriesInfo{true, Windows, true, 1.1},
"win81": SeriesInfo{true, Windows, true, 1.1},
"win10": SeriesInfo{true, Windows, true, 1.1},
"win2016": SeriesInfo{true, Windows, true, 1.1},
"win2016nano": SeriesInfo{true, Windows, true, 1.1},
"win2012hvr2": {true, Windows, true, 1.1},
"win2012hv": {true, Windows, true, 1.1},
"win2012r2": {true, Windows, true, 1.1},
"win2012": {true, Windows, true, 1.1},
"win7": {true, Windows, true, 1.1},
"win8": {true, Windows, true, 1.1},
"win81": {true, Windows, true, 1.1},
"win10": {true, Windows, true, 1.1},
"win2016": {true, Windows, true, 1.1},
"win2016nano": {true, Windows, true, 1.1},

// Centos
"centos7": SeriesInfo{true, CentOS, true, 1.1},
"centos7": {true, CentOS, true, 1.1},
}
17 changes: 17 additions & 0 deletions internal/v5/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
"gopkg.in/juju/charmstore.v5-unstable/internal/entitycache"
"gopkg.in/juju/charmstore.v5-unstable/internal/mongodoc"
"gopkg.in/juju/charmstore.v5-unstable/internal/router"
"gopkg.in/juju/charmstore.v5-unstable/internal/series"
"gopkg.in/juju/charmstore.v5-unstable/internal/storetesting"
"gopkg.in/juju/charmstore.v5-unstable/internal/storetesting/hashtesting"
"gopkg.in/juju/charmstore.v5-unstable/internal/v5"
Expand Down Expand Up @@ -896,6 +897,22 @@ func (s *APISuite) TestMetaTermsBundle(c *gc.C) {
})
}

func (s *APISuite) TestSeries(c *gc.C) {
for k := range series.Series {
if k == "bundle" {
continue
}
id := k + "/wordpress-23"
s.addPublicCharm(c, "wordpress", newResolvedURL("~charmers/"+id, 23))
s.assertGet(c, id+"/meta/id", map[string]interface{}{
"Id": "cs:" + k + "/wordpress-23",
"Series": k,
"Name": "wordpress",
"Revision": 23,
})
}
}

func (s *APISuite) TestExtraInfo(c *gc.C) {
id := "precise/wordpress-23"
s.addPublicCharm(c, "wordpress", newResolvedURL("~charmers/"+id, 23))
Expand Down

0 comments on commit ef8e5e8

Please sign in to comment.