Maor Lipchuk has uploaded a new change for review. Change subject: core: Change CinderBroker to use getImageId. ......................................................................
core: Change CinderBroker to use getImageId. Use getImageId instead of getId since a volume in Cinder can be a commited previewed volume which is acctually a new volume in Cinder. Change-Id: I72432dd8c16f5eabe50f2ec3315d8b15cf4e464c Bug-Url: https://bugzilla.redhat.com/1185826 Signed-off-by: Maor Lipchuk <mlipc...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CinderBroker.java 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/50/42450/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CinderBroker.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CinderBroker.java index 13141e1..d8ea485 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CinderBroker.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CinderBroker.java @@ -79,7 +79,7 @@ cinderVolume.setName(cinderDisk.getDiskAlias()); cinderVolume.setDescription(cinderDisk.getDiskDescription()); cinderVolume.setSize((int) (cinderDisk.getSizeInGigabytes())); - cinderVolume.setSourceVolid(cinderDisk.getId().toString()); + cinderVolume.setSourceVolid(cinderDisk.getImageId().toString()); return proxy.createVolume(cinderVolume); } }); @@ -123,7 +123,7 @@ VolumeForUpdate volumeForUpdate = new VolumeForUpdate(); volumeForUpdate.setName(cinderDisk.getDiskAlias()); volumeForUpdate.setDescription(cinderDisk.getDiskDescription()); - proxy.updateVolume(cinderDisk.getId().toString(), volumeForUpdate); + proxy.updateVolume(cinderDisk.getImageId().toString(), volumeForUpdate); return null; } }); @@ -133,7 +133,7 @@ return execute(new Callable<Void>() { @Override public Void call() { - proxy.extendVolume(cinderDisk.getId().toString(), newSize); + proxy.extendVolume(cinderDisk.getImageId().toString(), newSize); return null; } }); @@ -144,7 +144,7 @@ @Override public String call() { SnapshotForCreate snapshotForCreate = new SnapshotForCreate(); - snapshotForCreate.setVolumeId(cinderDisk.getId().toString()); + snapshotForCreate.setVolumeId(cinderDisk.getImageId().toString()); return proxy.createSnapshot(snapshotForCreate); } }); @@ -187,7 +187,7 @@ @Override public CinderConnectionInfo call() { ConnectionForInitialize connectionForInitialize = new ConnectionForInitialize(); - return proxy.initializeConnectionForVolume(cinderDisk.getId().toString(), connectionForInitialize); + return proxy.initializeConnectionForVolume(cinderDisk.getImageId().toString(), connectionForInitialize); } }); } -- To view, visit https://gerrit.ovirt.org/42450 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72432dd8c16f5eabe50f2ec3315d8b15cf4e464c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches