Skip to content

Commit

Permalink
Use charm v10 instead of v9.
Browse files Browse the repository at this point in the history
Picks up charm pkg removal of cs as a valid URL schema.
Remove charmrepo/v7 as it is no longer used.

Changes for removal of charm store support.
  • Loading branch information
hmlanigan committed Jan 13, 2023
1 parent f497a1f commit 8270414
Show file tree
Hide file tree
Showing 524 changed files with 625 additions and 630 deletions.
2 changes: 1 addition & 1 deletion api/agent/caasoperator/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package caasoperator

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/version/v2"
Expand Down
4 changes: 2 additions & 2 deletions api/agent/caasoperator/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (s *operatorSuite) TestCharm(c *gc.C) {
*(result.(*params.ApplicationCharmResults)) = params.ApplicationCharmResults{
Results: []params.ApplicationCharmResult{{
Result: &params.ApplicationCharm{
URL: "cs:foo/bar-1",
URL: "ch:foo/bar-1",
ForceUpgrade: true,
SHA256: "fake-sha256",
CharmModifiedVersion: 666,
Expand All @@ -93,7 +93,7 @@ func (s *operatorSuite) TestCharm(c *gc.C) {
info, err := client.Charm("gitlab")
c.Assert(err, jc.ErrorIsNil)
c.Assert(info.URL, gc.NotNil)
c.Assert(info.URL.String(), gc.Equals, "cs:foo/bar-1")
c.Assert(info.URL.String(), gc.Equals, "ch:foo/bar-1")
c.Assert(info.SHA256, gc.Equals, "fake-sha256")
c.Assert(info.ForceUpgrade, jc.IsTrue)
c.Assert(info.CharmModifiedVersion, gc.Equals, 666)
Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/charm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package uniter
import (
"fmt"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"

"github.com/juju/juju/rpc/params"
Expand Down
8 changes: 4 additions & 4 deletions api/agent/uniter/charm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package uniter_test

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
Expand Down Expand Up @@ -35,15 +35,15 @@ func (s *charmSuite) TestCharm(c *gc.C) {
return nil
})
client := uniter.NewState(apiCaller, names.NewUnitTag("mysql/0"))
curl := charm.MustParseURL("cs:mysql")
curl := charm.MustParseURL("ch:mysql")
ch, err := client.Charm(curl)
c.Assert(err, jc.ErrorIsNil)
c.Assert(ch.URL(), jc.DeepEquals, curl)
c.Assert(ch.String(), gc.Equals, curl.String())
}

func (s *charmSuite) TestArchiveSha256(c *gc.C) {
curl := charm.MustParseURL("cs:mysql")
curl := charm.MustParseURL("ch:mysql")
apiCaller := basetesting.APICallerFunc(func(objType string, version int, id, request string, arg, result interface{}) error {
c.Assert(objType, gc.Equals, "Uniter")
c.Assert(id, gc.Equals, "")
Expand All @@ -68,7 +68,7 @@ func (s *charmSuite) TestArchiveSha256(c *gc.C) {
}

func (s *charmSuite) TestLXDProfileRequired(c *gc.C) {
curl := charm.MustParseURL("cs:mysql")
curl := charm.MustParseURL("ch:mysql")
apiCaller := basetesting.APICallerFunc(func(objType string, version int, id, request string, arg, result interface{}) error {
c.Assert(objType, gc.Equals, "Uniter")
c.Assert(id, gc.Equals, "")
Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package uniter

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
)

// Endpoint represents one endpoint of a relation. It is just a wrapper
Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package uniter

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"

Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/relation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package uniter_test

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/relationunit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package uniter_test

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/names/v4"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package uniter
import (
"time"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"

Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package uniter_test
import (
"time"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/testing"
Expand Down
2 changes: 1 addition & 1 deletion api/agent/uniter/uniter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package uniter
import (
"fmt"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"

Expand Down
2 changes: 1 addition & 1 deletion api/client/application/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
Expand Down
2 changes: 1 addition & 1 deletion api/client/application/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
stderrors "errors"
"time"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/testing"
Expand Down
2 changes: 1 addition & 1 deletion api/client/applicationoffers/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package applicationoffers

import (
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/names/v4"
Expand Down
2 changes: 1 addition & 1 deletion api/client/applicationoffers/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"time"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
Expand Down
4 changes: 2 additions & 2 deletions api/client/charms/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strconv"
"strings"

"github.com/juju/charm/v9"
charmresource "github.com/juju/charm/v9/resource"
"github.com/juju/charm/v10"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/version/v2"

Expand Down
4 changes: 2 additions & 2 deletions api/client/charms/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"

"github.com/golang/mock/gomock"
"github.com/juju/charm/v9"
charmresource "github.com/juju/charm/v9/resource"
"github.com/juju/charm/v10"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
jc "github.com/juju/testing/checkers"
"github.com/juju/version/v2"
Expand Down
2 changes: 1 addition & 1 deletion api/client/charms/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io"
"net/url"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"

"github.com/juju/juju/api/base"
Expand Down
2 changes: 1 addition & 1 deletion api/client/charms/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"

"github.com/golang/mock/gomock"
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"gopkg.in/httprequest.v1"
Expand Down
2 changes: 1 addition & 1 deletion api/client/client/client_macaroon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"strings"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"

Expand Down
2 changes: 1 addition & 1 deletion api/client/payloads/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package payloads_test

import (
"github.com/golang/mock/gomock"
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/names/v4"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
Expand Down
2 changes: 1 addition & 1 deletion api/client/payloads/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package payloads

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"

Expand Down
2 changes: 1 addition & 1 deletion api/client/payloads/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package payloads

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/names/v4"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
Expand Down
4 changes: 2 additions & 2 deletions api/client/resources/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"io"
"strings"

"github.com/juju/charm/v9"
charmresource "github.com/juju/charm/v9/resource"
"github.com/juju/charm/v10"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/names/v4"

Expand Down
4 changes: 2 additions & 2 deletions api/client/resources/client_upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"

"github.com/golang/mock/gomock"
"github.com/juju/charm/v9"
charmresource "github.com/juju/charm/v9/resource"
"github.com/juju/charm/v10"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/v3"
Expand Down
2 changes: 1 addition & 1 deletion api/client/resources/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package resources

import (
charmresource "github.com/juju/charm/v9/resource"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/names/v4"

Expand Down
2 changes: 1 addition & 1 deletion api/client/resources/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

charmresource "github.com/juju/charm/v9/resource"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/testing"
Expand Down
2 changes: 1 addition & 1 deletion api/client/resources/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"mime"
"net/http"

charmresource "github.com/juju/charm/v9/resource"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/names/v4"

Expand Down
2 changes: 1 addition & 1 deletion api/common/charm/charmorigin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package charm

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"

corecharm "github.com/juju/juju/core/charm"
Expand Down
2 changes: 1 addition & 1 deletion api/common/charm/charmorigin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package charm_test

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
gc "gopkg.in/check.v1"

commoncharm "github.com/juju/juju/api/common/charm"
Expand Down
4 changes: 2 additions & 2 deletions api/common/charms/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package charms
import (
"fmt"

"github.com/juju/charm/v9"
"github.com/juju/charm/v9/resource"
"github.com/juju/charm/v10"
"github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/version/v2"
Expand Down
4 changes: 2 additions & 2 deletions api/common/charms/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package charms_test

import (
"github.com/golang/mock/gomock"
"github.com/juju/charm/v9"
"github.com/juju/charm/v9/resource"
"github.com/juju/charm/v10"
"github.com/juju/charm/v10/resource"
"github.com/juju/version/v2"
gc "gopkg.in/check.v1"

Expand Down
2 changes: 1 addition & 1 deletion api/controller/caasapplicationprovisioner/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package caasapplicationprovisioner
import (
"fmt"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/version/v2"
Expand Down
2 changes: 1 addition & 1 deletion api/controller/caasapplicationprovisioner/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package caasapplicationprovisioner_test

import (
"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/testing"
Expand Down
2 changes: 1 addition & 1 deletion api/controller/migrationmaster/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/http"
"time"

charmresource "github.com/juju/charm/v9/resource"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/version/v2"
Expand Down
2 changes: 1 addition & 1 deletion api/controller/migrationmaster/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
"time"

charmresource "github.com/juju/charm/v9/resource"
charmresource "github.com/juju/charm/v10/resource"
"github.com/juju/errors"
"github.com/juju/names/v4"
jujutesting "github.com/juju/testing"
Expand Down
3 changes: 1 addition & 2 deletions api/controller/migrationtarget/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strconv"
"time"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/version/v2"
Expand Down Expand Up @@ -78,7 +78,6 @@ func (c *Client) UploadCharm(modelUUID string, curl *charm.URL, content io.ReadS
args.Add("name", curl.Name)
args.Add("schema", curl.Schema)
args.Add("arch", curl.Architecture)
args.Add("user", curl.User)
args.Add("series", curl.Series)
args.Add("revision", strconv.Itoa(curl.Revision))

Expand Down
2 changes: 1 addition & 1 deletion api/controller/migrationtarget/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strings"
"time"

"github.com/juju/charm/v9"
"github.com/juju/charm/v10"
"github.com/juju/errors"
"github.com/juju/names/v4"
jujutesting "github.com/juju/testing"
Expand Down
Loading

0 comments on commit 8270414

Please sign in to comment.