~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/gce/environ_broker.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
// provisioned, relative to the provided args and spec. Info for that
153
153
// low-level instance is returned.
154
154
func (env *environ) newRawInstance(args environs.StartInstanceParams, spec *instances.InstanceSpec) (*google.Instance, error) {
155
 
        machineID := common.MachineFullName(env, args.InstanceConfig.MachineId)
 
155
        machineID := common.MachineFullName(env.Config().UUID(), args.InstanceConfig.MachineId)
156
156
 
157
157
        os, err := series.GetOSFromSeries(args.InstanceConfig.Series)
158
158
        if err != nil {
168
168
                machineID,
169
169
        }
170
170
 
171
 
        cfg := env.Config()
172
 
        eUUID, ok := cfg.UUID()
173
 
        if !ok {
174
 
                return nil, errors.NotFoundf("UUID necessary to create the instance disk")
175
 
        }
176
 
 
177
 
        disks, err := getDisks(spec, args.Constraints, args.InstanceConfig.Series, eUUID)
 
171
        disks, err := getDisks(
 
172
                spec, args.Constraints, args.InstanceConfig.Series, env.Config().UUID(),
 
173
        )
178
174
        if err != nil {
179
175
                return nil, errors.Trace(err)
180
176
        }
317
313
                ids = append(ids, string(id))
318
314
        }
319
315
 
320
 
        prefix := common.MachineFullName(env, "")
 
316
        prefix := common.MachineFullName(env.Config().UUID(), "")
321
317
        err := env.gce.RemoveInstances(prefix, ids...)
322
318
        return errors.Trace(err)
323
319
}