Liron Ar has posted comments on this change.

Change subject: core,webadmin: Plug disk to VM when adding a new disk
......................................................................


Patch Set 3:

(5 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
Line 97:                     
!isDiskPassPciAndIdeLimit(getParameters().getDiskInfo())) {
Line 98:                 return false;
Line 99:             }
Line 100:         }
Line 101:         else if 
(Boolean.TRUE.equals(getParameters().getPlugDiskToVm())) {
it should check if it's != null instead for floating, false should also be set 
only when there's a vm.
Line 102:             return 
failCanDoAction(VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET);
Line 103:         }
Line 104: 
Line 105:         if (DiskStorageType.IMAGE == 
getParameters().getDiskInfo().getDiskStorageType()) {


Line 560:             params.setShouldBeLogged(false);
Line 561:             VdcReturnValueBase returnValue = 
Backend.getInstance().runInternalAction(VdcActionType.HotPlugDiskToVm, params);
Line 562:             if (!returnValue.getSucceeded()) {
Line 563:                 AuditLogDirector.log(this, 
AuditLogType.USER_FAILED_HOTPLUG_DISK);
Line 564:             }
thinking about that - now we will have duplicate logging,
"hot plug fail" , "add disk succeeded"
consider having one audit log for that case at getEndSuccessAuditLogTypeValue().
Line 565:         }
Line 566:     }
Line 567: 
Line 568:     @Override


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddDiskToVmCommandTest.java
Line 753: 
Line 754:         AddDiskParameters parameters = createParameters();
Line 755:         parameters.setDiskInfo(disk);
Line 756:         parameters.setVmId(Guid.Empty);
Line 757:         parameters.setPlugDiskToVm(false);
it should fail with false and succeed with null, see previous file.
Line 758:         Guid storageId = Guid.newGuid();
Line 759:         initializeCommand(storageId, parameters);
Line 760:         mockStorageDomain(storageId);
Line 761:         mockStoragePoolIsoMap();


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmDiskPopupWidget.java
Line 274:         
isShareableEditor.setLabel(constants.isShareableVmDiskPopup());
Line 275:         isReadOnlyEditor.setLabel(constants.isReadOnlyVmDiskPopup());
Line 276:         
isSgIoUnfilteredEditor.setLabel(constants.isSgIoUnfilteredEditor());
Line 277:         attachEditor.setLabel(constants.attachDiskVmDiskPopup());
Line 278:         isPluggedEditor.setLabel(constants.activateVmDiskPopup());
why not using this one? that's exactly what it does
Line 279:     }
Line 280: 
Line 281:     @SuppressWarnings({ "unchecked", "rawtypes" })
Line 282:     private void initManualWidgets(CommonApplicationConstants 
constants,


Line 803:         isBootableEditor.setTabIndex(nextTabIndex++);
Line 804:         isShareableEditor.setTabIndex(nextTabIndex++);
Line 805:         isSgIoUnfilteredEditor.setTabIndex(nextTabIndex++);
Line 806:         isReadOnlyEditor.setTabIndex(nextTabIndex++);
Line 807:         isPluggedEditor.setTabIndex(nextTabIndex++);
why not using this one? that's exactly what it does
Line 808: 
Line 809:         return nextTabIndex;
Line 810:     }


-- 
To view, visit http://gerrit.ovirt.org/21851
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9778bcaf21b346a55992590159cabd8d78f0c66
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Cheryn Tan <cheryn...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to