~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/ec2/ebs.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:
53
53
// AWS error codes
54
54
const (
55
55
        deviceInUse        = "InvalidDevice.InUse"
56
 
        volumeInUse        = "VolumeInUse"
57
56
        attachmentNotFound = "InvalidAttachment.NotFound"
58
 
        incorrectState     = "IncorrectState"
59
57
)
60
58
 
61
59
const (
65
63
 
66
64
        attachmentStatusAttaching = "attaching"
67
65
        attachmentStatusAttached  = "attached"
68
 
        attachmentStatusDetaching = "detaching"
69
 
        attachmentStatusDetached  = "detached"
70
66
 
71
67
        instanceStateShuttingDown = "shutting-down"
72
68
        instanceStateTerminated   = "terminated"
216
212
        if err != nil {
217
213
                return nil, errors.Annotate(err, "creating AWS clients")
218
214
        }
219
 
        uuid, ok := environConfig.UUID()
220
 
        if !ok {
221
 
                return nil, errors.NotFoundf("model UUID")
222
 
        }
223
215
        source := &ebsVolumeSource{
224
216
                ec2:       ec2,
225
217
                envName:   environConfig.Name(),
226
 
                modelUUID: uuid,
 
218
                modelUUID: environConfig.UUID(),
227
219
        }
228
220
        return source, nil
229
221
}