~cmars/juju-core/1.18-resolve-cs-series

« back to all changes in this revision

Viewing changes to worker/provisioner/container_initialisation_test.go

  • Committer: Tarmac
  • Author(s): Casey Marshall
  • Date: 2014-04-04 14:01:14 UTC
  • mfrom: (2257.3.1 1.18)
  • Revision ID: tarmac-20140404140114-entbcqxccpecela0
[r=sinzui] Ported r2559 from trunk to 1.18

For the deploy and upgradecharm commands, when a series is not provided, and a
default-series is not set in the environment config, the client will resolve
the series with the charm store, through the state server. If the client is
working with a 1.16 state server, it will resolve the series directly with the
charm store.

Existing environments will have a default-series, so they should have no
change in series selection.

New environments will continue to support the default-series config setting,
but it can be omitted, and is not set by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
        "launchpad.net/juju-core/agent"
14
14
        "launchpad.net/juju-core/environs"
15
 
        "launchpad.net/juju-core/environs/config"
16
15
        "launchpad.net/juju-core/instance"
17
16
        "launchpad.net/juju-core/state"
18
17
        apiprovisioner "launchpad.net/juju-core/state/api/provisioner"
 
18
        coretesting "launchpad.net/juju-core/testing"
19
19
        "launchpad.net/juju-core/utils"
20
20
        "launchpad.net/juju-core/version"
21
21
        "launchpad.net/juju-core/worker"
88
88
 
89
89
        // make a container on the host machine
90
90
        template := state.MachineTemplate{
91
 
                Series: config.DefaultSeries,
 
91
                Series: coretesting.FakeDefaultSeries,
92
92
                Jobs:   []state.MachineJob{state.JobHostUnits},
93
93
        }
94
94
        container, err := s.State.AddMachineInsideMachine(template, host.Id(), ctype)
131
131
        for _, ctype := range instance.ContainerTypes {
132
132
                // create a machine to host the container.
133
133
                m, err := s.BackingState.AddOneMachine(state.MachineTemplate{
134
 
                        Series:      config.DefaultSeries,
 
134
                        Series:      coretesting.FakeDefaultSeries,
135
135
                        Jobs:        []state.MachineJob{state.JobHostUnits},
136
136
                        Constraints: s.defaultConstraints,
137
137
                })
154
154
 
155
155
        // create a machine to host the container.
156
156
        m, err := s.BackingState.AddOneMachine(state.MachineTemplate{
157
 
                Series:      config.DefaultSeries,
 
157
                Series:      coretesting.FakeDefaultSeries,
158
158
                Jobs:        []state.MachineJob{state.JobHostUnits},
159
159
                Constraints: s.defaultConstraints,
160
160
        })