Skip to content

Commit

Permalink
Merge branch '2.9' into juju-806-remove-connection-uniter-method
Browse files Browse the repository at this point in the history
  • Loading branch information
arnodel committed Mar 24, 2022
2 parents 1cc4eb2 + 9938c99 commit 6d83a75
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/agent/upgrader/unitupgrader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (s *unitUpgraderSuite) SetUpTest(c *gc.C) {
s.stateAPI = s.OpenAPIAs(c, s.rawUnit.Tag(), password)

// Create the upgrader facade.
s.st = s.stateAPI.Upgrader()
s.st = upgrader.NewState(s.stateAPI)
c.Assert(s.st, gc.NotNil)

s.WaitForModelWatchersIdle(c, s.State.ModelUUID())
Expand Down
2 changes: 1 addition & 1 deletion api/agent/upgrader/upgrader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (s *machineUpgraderSuite) SetUpTest(c *gc.C) {
s.JujuConnSuite.SetUpTest(c)
s.stateAPI, s.rawMachine = s.OpenAPIAsNewMachine(c)
// Create the upgrader facade.
s.st = s.stateAPI.Upgrader()
s.st = upgrader.NewState(s.stateAPI)
c.Assert(s.st, gc.NotNil)
}

Expand Down
2 changes: 0 additions & 2 deletions api/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (

"github.com/juju/juju/api/agent/reboot"
"github.com/juju/juju/api/agent/unitassigner"
"github.com/juju/juju/api/agent/upgrader"
"github.com/juju/juju/api/base"
"github.com/juju/juju/api/controller/instancepoller"
"github.com/juju/juju/core/network"
Expand Down Expand Up @@ -331,7 +330,6 @@ type Connection interface {
// will be easy to remove, but until we're using them via manifolds it's
// prohibitively ugly to do so.
Client() *Client
Upgrader() *upgrader.State
Reboot() (reboot.State, error)
InstancePoller() *instancepoller.API
UnitAssigner() unitassigner.API
Expand Down
6 changes: 0 additions & 6 deletions api/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/juju/juju/api/agent/keyupdater"
"github.com/juju/juju/api/agent/reboot"
"github.com/juju/juju/api/agent/unitassigner"
"github.com/juju/juju/api/agent/upgrader"
"github.com/juju/juju/api/base"
"github.com/juju/juju/api/controller/instancepoller"
"github.com/juju/juju/core/network"
Expand Down Expand Up @@ -319,11 +318,6 @@ func (st *state) UnitAssigner() unitassigner.API {
return unitassigner.New(st)
}

// Upgrader returns access to the Upgrader API
func (st *state) Upgrader() *upgrader.State {
return upgrader.NewState(st)
}

// Reboot returns access to the Reboot API
func (st *state) Reboot() (reboot.State, error) {
switch tag := st.authTag.(type) {
Expand Down
1 change: 0 additions & 1 deletion cmd/containeragent/initialize/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func (*importSuite) TestImports(c *gc.C) {
"api/agent/keyupdater",
"api/agent/reboot",
"api/agent/unitassigner",
"api/agent/upgrader",
"api/watcher",
"apiserver/errors",
"rpc/params",
Expand Down
5 changes: 3 additions & 2 deletions worker/upgrader/upgrader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/juju/juju/agent"
agenttools "github.com/juju/juju/agent/tools"
"github.com/juju/juju/api"
upgraderapi "github.com/juju/juju/api/agent/upgrader"
agenterrors "github.com/juju/juju/cmd/jujud/agent/errors"
coreos "github.com/juju/juju/core/os"
"github.com/juju/juju/environs/simplestreams"
Expand Down Expand Up @@ -113,7 +114,7 @@ func (s *UpgraderSuite) makeUpgrader(c *gc.C) *upgrader.Upgrader {
w, err := upgrader.NewAgentUpgrader(upgrader.Config{
Clock: s.clock,
Logger: loggo.GetLogger("test"),
State: s.state.Upgrader(),
State: upgraderapi.NewState(s.state),
AgentConfig: agentConfig(s.machine.Tag(), s.DataDir()),
OrigAgentVersion: s.confVersion,
UpgradeStepsWaiter: s.upgradeStepsComplete,
Expand Down Expand Up @@ -489,7 +490,7 @@ func (s *UpgraderSuite) TestChecksSpaceBeforeDownloading(c *gc.C) {
u, err := upgrader.NewAgentUpgrader(upgrader.Config{
Clock: s.clock,
Logger: loggo.GetLogger("test"),
State: s.state.Upgrader(),
State: upgraderapi.NewState(s.state),
AgentConfig: agentConfig(s.machine.Tag(), s.DataDir()),
OrigAgentVersion: s.confVersion,
UpgradeStepsWaiter: s.upgradeStepsComplete,
Expand Down

0 comments on commit 6d83a75

Please sign in to comment.