Maor Lipchuk has uploaded a new change for review. Change subject: core: Add validator for snapshot status in CinderBroker ......................................................................
core: Add validator for snapshot status in CinderBroker Change-Id: Id03a80faabb881886850fd680deb9a1ed8f42ab6 Bug-Url: https://bugzilla.redhat.com/?????? Signed-off-by: Maor Lipchuk <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CinderBroker.java 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/73/40973/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 2f0a3a4..2c0f208 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 @@ -6,6 +6,8 @@ import com.woorea.openstack.cinder.model.Volume; import com.woorea.openstack.cinder.model.VolumeForCreate; import com.woorea.openstack.cinder.model.VolumeForUpdate; + +import com.woorea.openstack.cinder.model.Snapshot; import org.apache.commons.httpclient.HttpStatus; import org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy; import org.ovirt.engine.core.common.AuditLogType; @@ -196,6 +198,17 @@ }); } + public ImageStatus getSnapshotStatus(final Guid id) { + return execute(new Callable<ImageStatus>() { + @Override + public ImageStatus call() { + Snapshot snapshot = proxy.getSnapshotById(id.toString()); + CinderVolumeStatus cinderVolumeStatus = CinderVolumeStatus.forValue(snapshot.getStatus()); + return mapCinderVolumeStatusToImageStatus(cinderVolumeStatus); + } + }); + } + public ImageStatus getDiskStatus(final Guid id) { return execute(new Callable<ImageStatus>() { @Override -- To view, visit https://gerrit.ovirt.org/40973 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id03a80faabb881886850fd680deb9a1ed8f42ab6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
