~juju-qa/ubuntu/xenial/juju/2.0.2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/openstack/cinder.go

  • Committer: Nicholas Skaggs
  • Date: 2016-12-09 22:31:29 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161209223129-h2wbknpc8ty29zwp
ImportĀ upstreamĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
381
381
                        return nil, err
382
382
                }
383
383
        }
 
384
        if novaAttachment.Device == nil {
 
385
                return nil, errors.Errorf("device not assigned to volume attachment")
 
386
        }
384
387
        return &storage.VolumeAttachment{
385
388
                arg.Volume,
386
389
                arg.Machine,
387
390
                storage.VolumeAttachmentInfo{
388
 
                        DeviceName: novaAttachment.Device[len("/dev/"):],
 
391
                        DeviceName: (*novaAttachment.Device)[len("/dev/"):],
389
392
                },
390
393
        }, nil
391
394
}