use of org.ovirt.engine.core.common.businessentities.storage.ImageStatus in project ovirt-engine by oVirt.
the class RemoveCinderDiskVolumeCommandCallback method childCommandsExecutionEnded.
@Override
protected void childCommandsExecutionEnded(CommandBase<?> command, boolean anyFailed, List<Guid> childCmdIds, CommandExecutionStatus status, int completedChildren) {
RemoveCinderDiskVolumeCommand<RemoveCinderDiskVolumeParameters> removeCinderDiskVolumeCommand = (RemoveCinderDiskVolumeCommand<RemoveCinderDiskVolumeParameters>) command;
CinderDisk removedVolume = removeCinderDiskVolumeCommand.getParameters().getRemovedVolume();
// In case the volume/snapshot has been deleted from Cinder.
if (!removeCinderDiskVolumeCommand.getCinderBroker().isVolumeExistsByClassificationType(removedVolume)) {
setCommandEndStatus(command, false, status, childCmdIds);
}
ImageStatus imageStatus = checkImageStatus(removedVolume, removeCinderDiskVolumeCommand);
if (imageStatus != null && imageStatus != removedVolume.getImageStatus()) {
switch(imageStatus) {
case ILLEGAL:
setCommandEndStatus(command, true, status, childCmdIds);
break;
}
}
}
use of org.ovirt.engine.core.common.businessentities.storage.ImageStatus in project ovirt-engine by oVirt.
the class DisksTree method getRootItem.
@Override
protected TreeItem getRootItem(DiskImage disk) {
HorizontalPanel panel = new HorizontalPanel();
panel.setSpacing(1);
// $NON-NLS-1$
panel.setWidth("100%");
DiskVmElement dve = disk.getDiskVmElements().iterator().next();
// $NON-NLS-1$
addItemToPanel(panel, new Image(resources.diskImage()), "25px");
// $NON-NLS-1$
addTextBoxToPanel(panel, new StringValueLabel(), disk.getDiskAlias(), "");
// $NON-NLS-1$
addItemToPanel(panel, dve.isReadOnly() ? new Image(resources.readOnlyDiskIcon()) : new Image(), "60px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Long>(), disk.getSizeInGigabytes(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Long>(SizeConverter.SizeUnit.BYTES), disk.getActualSizeInBytes(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<ImageStatus>(), disk.getImageStatus(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<VolumeType>(), disk.getVolumeType(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<DiskInterface>(), dve.getDiskInterface(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<DiskStorageType>(), disk.getDiskStorageType(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new FullDateTimeLabel(), disk.getCreationDate(), "140px");
TreeItem treeItem = new TreeItem(panel);
treeItem.setUserObject(disk.getId());
return treeItem;
}
use of org.ovirt.engine.core.common.businessentities.storage.ImageStatus in project ovirt-engine by oVirt.
the class StoragesTree method getNodeItem.
@Override
protected TreeItem getNodeItem(DiskModel diskModel) {
HorizontalPanel panel = new HorizontalPanel();
panel.setSpacing(1);
// $NON-NLS-1$
panel.setWidth("100%");
DiskImage disk = (DiskImage) diskModel.getDisk();
// $NON-NLS-1$
addItemToPanel(panel, new Image(resources.diskImage()), "30px");
// $NON-NLS-1$
addTextBoxToPanel(panel, new StringValueLabel(), disk.getDiskAlias(), "");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Long>(), disk.getSizeInGigabytes(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<ImageStatus>(), disk.getImageStatus(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<VolumeType>(), disk.getVolumeType(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<DiskInterface>(), disk.getDiskVmElements().iterator().next().getDiskInterface(), "110px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<DiskStorageType>(), disk.getDiskStorageType(), "110px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DateLabel(), disk.getCreationDate(), "100px");
TreeItem treeItem = new TreeItem(panel);
treeItem.setUserObject(getEntityId(diskModel));
return treeItem;
}
Aggregations