Skip to content

Commit f80d6e1

Browse files
committed
Merge branch '3.1' into 3.1-into-3.2
2 parents 8cd6ec2 + a10ac36 commit f80d6e1

File tree

214 files changed

+1111
-1074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+1111
-1074
lines changed

agent/agentbootstrap/bootstrap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import (
2222
"github.com/juju/juju/cloud"
2323
"github.com/juju/juju/cloudconfig/instancecfg"
2424
"github.com/juju/juju/controller/modelmanager"
25+
corebase "github.com/juju/juju/core/base"
2526
coredatabase "github.com/juju/juju/core/database"
2627
"github.com/juju/juju/core/instance"
2728
"github.com/juju/juju/core/model"
2829
corenetwork "github.com/juju/juju/core/network"
29-
"github.com/juju/juju/core/series"
3030
"github.com/juju/juju/database"
3131
"github.com/juju/juju/environs"
3232
environscloudspec "github.com/juju/juju/environs/cloudspec"
@@ -444,7 +444,7 @@ func initBootstrapMachine(st *state.State, args InitializeStateParams) (bootstra
444444
return nil, errors.Trace(err)
445445
}
446446

447-
base, err := series.GetBaseFromSeries(hostSeries)
447+
base, err := corebase.GetBaseFromSeries(hostSeries)
448448
if err != nil {
449449
return nil, errors.Trace(err)
450450
}

agent/agentbootstrap/bootstrap_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import (
1919
"github.com/juju/juju/cloud"
2020
"github.com/juju/juju/cloudconfig/instancecfg"
2121
"github.com/juju/juju/controller"
22+
corebase "github.com/juju/juju/core/base"
2223
"github.com/juju/juju/core/constraints"
2324
"github.com/juju/juju/core/instance"
2425
"github.com/juju/juju/core/model"
2526
corenetwork "github.com/juju/juju/core/network"
26-
coreseries "github.com/juju/juju/core/series"
2727
"github.com/juju/juju/environs"
2828
environscloudspec "github.com/juju/juju/environs/cloudspec"
2929
"github.com/juju/juju/environs/config"
@@ -274,7 +274,7 @@ func (s *bootstrapSuite) TestInitializeState(c *gc.C) {
274274
c.Assert(err, jc.ErrorIsNil)
275275
c.Assert(m.Id(), gc.Equals, "0")
276276
c.Assert(m.Jobs(), gc.DeepEquals, []state.MachineJob{state.JobManageModel})
277-
base, err := coreseries.ParseBase(m.Base().OS, m.Base().Channel)
277+
base, err := corebase.ParseBase(m.Base().OS, m.Base().Channel)
278278
c.Assert(err, jc.ErrorIsNil)
279279
c.Assert(m.Base().String(), gc.Equals, base.String())
280280
c.Assert(m.CheckProvisioned(agent.BootstrapNonce), jc.IsTrue)

api/agent/upgradeseries/upgradeseries.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
"github.com/juju/juju/api/base"
1313
"github.com/juju/juju/api/common"
14+
corebase "github.com/juju/juju/core/base"
1415
"github.com/juju/juju/core/model"
15-
coreseries "github.com/juju/juju/core/series"
1616
"github.com/juju/juju/core/status"
1717
"github.com/juju/juju/rpc/params"
1818
)
@@ -213,7 +213,7 @@ func (s *Client) StartUnitCompletion(reason string) error {
213213
// "Complete" phases.
214214
func (s *Client) FinishUpgradeSeries(hostSeries string) error {
215215
var results params.ErrorResults
216-
base, err := coreseries.GetBaseFromSeries(hostSeries)
216+
base, err := corebase.GetBaseFromSeries(hostSeries)
217217
if err != nil {
218218
return errors.Trace(err)
219219
}

api/client/application/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import (
1717

1818
"github.com/juju/juju/api/base"
1919
apicharm "github.com/juju/juju/api/common/charm"
20+
corebase "github.com/juju/juju/core/base"
2021
"github.com/juju/juju/core/constraints"
2122
"github.com/juju/juju/core/crossmodel"
2223
"github.com/juju/juju/core/devices"
2324
"github.com/juju/juju/core/instance"
24-
coreseries "github.com/juju/juju/core/series"
2525
"github.com/juju/juju/rpc/params"
2626
"github.com/juju/juju/storage"
2727
)
@@ -350,7 +350,7 @@ func (c *Client) SetCharm(branchName string, cfg SetCharmConfig) error {
350350
}
351351

352352
// UpdateApplicationBase updates the application base in the db.
353-
func (c *Client) UpdateApplicationBase(appName string, base coreseries.Base, force bool) error {
353+
func (c *Client) UpdateApplicationBase(appName string, base corebase.Base, force bool) error {
354354
args := params.UpdateChannelArgs{
355355
Args: []params.UpdateChannelArg{{
356356
Entity: params.Entity{Tag: names.NewApplicationTag(appName).String()},
@@ -1038,7 +1038,7 @@ type DeployInfo struct {
10381038
// Architecture is the architecture used to deploy the charm.
10391039
Architecture string `json:"architecture"`
10401040
// Base is the base used to deploy the charm.
1041-
Base coreseries.Base `json:"base,omitempty"`
1041+
Base corebase.Base `json:"base,omitempty"`
10421042
// Channel is a string representation of the channel used to
10431043
// deploy the charm.
10441044
Channel string `json:"channel"`
@@ -1077,7 +1077,7 @@ type DeployFromRepositoryArg struct {
10771077
// may be non-empty only if NumUnits is 1.
10781078
AttachStorage []string
10791079
// Base describes the OS base intended to be used by the charm.
1080-
Base *coreseries.Base `json:"base,omitempty"`
1080+
Base *corebase.Base `json:"base,omitempty"`
10811081
// Channel is the channel in the repository to deploy from.
10821082
// This is an optional value. Required if revision is provided.
10831083
// Defaults to “stable” if not defined nor required.
@@ -1153,7 +1153,7 @@ func (c *Client) DeployFromRepository(arg DeployFromRepositoryArg) (DeployInfo,
11531153
}
11541154

11551155
func deployInfoFromParams(di params.DeployFromRepositoryInfo) (DeployInfo, error) {
1156-
base, err := coreseries.ParseBase(di.Base.Name, di.Base.Channel)
1156+
base, err := corebase.ParseBase(di.Base.Name, di.Base.Channel)
11571157
return DeployInfo{
11581158
Architecture: di.Architecture,
11591159
Base: base,

api/client/application/client_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import (
1919
apicharm "github.com/juju/juju/api/common/charm"
2020
apitesting "github.com/juju/juju/api/testing"
2121
apiservererrors "github.com/juju/juju/apiserver/errors"
22+
corebase "github.com/juju/juju/core/base"
2223
"github.com/juju/juju/core/constraints"
2324
"github.com/juju/juju/core/crossmodel"
2425
"github.com/juju/juju/core/instance"
25-
"github.com/juju/juju/core/series"
2626
"github.com/juju/juju/rpc/params"
2727
"github.com/juju/juju/storage"
2828
coretesting "github.com/juju/juju/testing"
@@ -1486,7 +1486,7 @@ func (s *applicationSuite) TestDeployFromRepository(c *gc.C) {
14861486
arg := application.DeployFromRepositoryArg{
14871487
CharmName: "ubuntu",
14881488
ApplicationName: "jammy",
1489-
Base: &series.Base{OS: "ubuntu", Channel: series.Channel{Track: "22.04"}},
1489+
Base: &corebase.Base{OS: "ubuntu", Channel: corebase.Channel{Track: "22.04"}},
14901490
}
14911491
client := application.NewClientFromCaller(mockFacadeCaller)
14921492
info, _, errs := client.DeployFromRepository(arg)
@@ -1498,9 +1498,9 @@ func (s *applicationSuite) TestDeployFromRepository(c *gc.C) {
14981498
c.Assert(info, gc.DeepEquals, application.DeployInfo{
14991499
Channel: candidate,
15001500
Architecture: "arm64",
1501-
Base: series.Base{
1501+
Base: corebase.Base{
15021502
OS: "ubuntu",
1503-
Channel: series.Channel{Track: "22.04", Risk: "stable"},
1503+
Channel: corebase.Channel{Track: "22.04", Risk: "stable"},
15041504
},
15051505
EffectiveChannel: &stable,
15061506
Name: "ubuntu",

api/client/charms/client_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
apicharm "github.com/juju/juju/api/common/charm"
2626
"github.com/juju/juju/api/http/mocks"
2727
"github.com/juju/juju/core/arch"
28-
"github.com/juju/juju/core/series"
28+
corebase "github.com/juju/juju/core/base"
2929
"github.com/juju/juju/rpc/params"
3030
"github.com/juju/juju/testcharms"
3131
coretesting "github.com/juju/juju/testing"
@@ -185,7 +185,7 @@ func (s *charmsMockSuite) TestAddCharm(c *gc.C) {
185185
Revision: &curl.Revision,
186186
Track: nil,
187187
Architecture: arch.DefaultArchitecture,
188-
Base: series.MakeDefaultBase("ubuntu", "18.04"),
188+
Base: corebase.MakeDefaultBase("ubuntu", "18.04"),
189189
}
190190
facadeArgs := params.AddCharmWithOrigin{
191191
URL: curl.String(),

api/client/imagemetadatamanager/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/juju/errors"
88

99
"github.com/juju/juju/api/base"
10-
"github.com/juju/juju/core/series"
10+
corebase "github.com/juju/juju/core/base"
1111
"github.com/juju/juju/rpc/params"
1212
)
1313

@@ -28,7 +28,7 @@ func NewClient(st base.APICallCloser) *Client {
2828
// Empty filter will return all image metadata.
2929
func (c *Client) List(
3030
stream, region string,
31-
bases []series.Base, arches []string,
31+
bases []corebase.Base, arches []string,
3232
virtType, rootStorageType string,
3333
) ([]params.CloudImageMetadata, error) {
3434
versions := make([]string, len(bases))

api/client/imagemetadatamanager/client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
basemocks "github.com/juju/juju/api/base/mocks"
1515
"github.com/juju/juju/api/client/imagemetadatamanager"
16-
"github.com/juju/juju/core/series"
16+
corebase "github.com/juju/juju/core/base"
1717
"github.com/juju/juju/rpc/params"
1818
)
1919

@@ -32,7 +32,7 @@ func (s *imagemetadataSuite) TestList(c *gc.C) {
3232
region := "region"
3333

3434
// This is used by filters to search function
35-
base := series.MustParseBaseFromString("[email protected]")
35+
base := corebase.MustParseBaseFromString("[email protected]")
3636
version := base.Channel.Track
3737

3838
arch := "arch"
@@ -72,7 +72,7 @@ func (s *imagemetadataSuite) TestList(c *gc.C) {
7272
client := imagemetadatamanager.NewClientFromCaller(mockFacadeCaller)
7373
found, err := client.List(
7474
stream, region,
75-
[]series.Base{base}, []string{arch},
75+
[]corebase.Base{base}, []string{arch},
7676
virtType, rootStorageType,
7777
)
7878
c.Check(err, jc.ErrorIsNil)

api/client/machinemanager/machinemanager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/juju/juju/api/base"
1313
apiwatcher "github.com/juju/juju/api/watcher"
1414
apiservererrors "github.com/juju/juju/apiserver/errors"
15-
coreseries "github.com/juju/juju/core/series"
15+
corebase "github.com/juju/juju/core/base"
1616
"github.com/juju/juju/core/watcher"
1717
"github.com/juju/juju/rpc/params"
1818
)
@@ -127,7 +127,7 @@ func (c *Client) RetryProvisioning(all bool, machines ...names.MachineTag) ([]pa
127127
// place for a given machine and as such the machine is guarded against
128128
// operations that would impede, fail, or interfere with the upgrade process.
129129
func (client *Client) UpgradeSeriesPrepare(machineName, series string, force bool) error {
130-
base, err := coreseries.GetBaseFromSeries(series)
130+
base, err := corebase.GetBaseFromSeries(series)
131131
if err != nil {
132132
return errors.Trace(err)
133133
}
@@ -168,7 +168,7 @@ func (client *Client) UpgradeSeriesComplete(machineName string) error {
168168
}
169169

170170
func (client *Client) UpgradeSeriesValidate(machineName, series string) ([]string, error) {
171-
base, err := coreseries.GetBaseFromSeries(series)
171+
base, err := corebase.GetBaseFromSeries(series)
172172
if err != nil {
173173
return nil, errors.Trace(err)
174174
}

api/client/resources/client_upload_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525
"github.com/juju/juju/api/client/resources"
2626
apicharm "github.com/juju/juju/api/common/charm"
2727
httpmocks "github.com/juju/juju/api/http/mocks"
28+
corebase "github.com/juju/juju/core/base"
2829
coreresources "github.com/juju/juju/core/resources"
2930
resourcetesting "github.com/juju/juju/core/resources/testing"
30-
"github.com/juju/juju/core/series"
3131
"github.com/juju/juju/rpc/params"
3232
)
3333

@@ -170,7 +170,7 @@ func (s *UploadSuite) TestAddPendingResources(c *gc.C) {
170170
Source: apicharm.OriginCharmHub,
171171
ID: "id",
172172
Risk: "stable",
173-
Base: series.MakeDefaultBase("ubuntu", "22.04"),
173+
Base: corebase.MakeDefaultBase("ubuntu", "22.04"),
174174
Architecture: "arm64",
175175
},
176176
},

0 commit comments

Comments
 (0)