Daniel Erez has uploaded a new change for review. Change subject: core: CinderBroker - add update and extend disk ......................................................................
core: CinderBroker - add update and extend disk Adding updateDisk and extendDisk methods to CinderBroker. Change-Id: I937a1de005ff47fd2af08daa0a89b0ee7e8872d5 Bug-Url: https://bugzilla.redhat.com/1185826 Signed-off-by: Daniel Erez <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CinderBroker.java 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/39198/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 71b4c45..d1e7bce 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 @@ -3,6 +3,7 @@ import com.woorea.openstack.base.client.OpenStackResponseException; import com.woorea.openstack.cinder.model.Volume; import com.woorea.openstack.cinder.model.VolumeForCreate; +import com.woorea.openstack.cinder.model.VolumeForUpdate; import org.apache.commons.httpclient.HttpStatus; import org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy; import org.ovirt.engine.core.common.businessentities.storage.CinderDisk; @@ -61,6 +62,29 @@ }); } + public Void updateDisk(final CinderDisk cinderDisk) { + return execute(new Callable<Void>() { + @Override + public Void call() { + VolumeForUpdate volumeForUpdate = new VolumeForUpdate(); + volumeForUpdate.setName(cinderDisk.getDiskAlias()); + volumeForUpdate.setDescription(cinderDisk.getDiskDescription()); + proxy.updateVolume(cinderDisk.getId().toString(), volumeForUpdate); + return null; + } + }); + } + + public Void extendDisk(final CinderDisk cinderDisk, final int newSize) { + return execute(new Callable<Void>() { + @Override + public Void call() { + proxy.extendVolume(cinderDisk.getId().toString(), newSize); + return null; + } + }); + } + public boolean isDiskExist(final Guid id) { return execute(new Callable<Boolean>() { @Override -- To view, visit https://gerrit.ovirt.org/39198 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I937a1de005ff47fd2af08daa0a89b0ee7e8872d5 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
