Gilad Chaplik has posted comments on this change.
Change subject: engine: Enable runOnce to choose a vnc keymap.
......................................................................
Patch Set 1:
(8 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
Line 599: } else {
Line 600: // if is not null it means runVM was launch from the run
once command, thus
Line 601: // the VM can run with keyboard layout type which is
different from its default display type
Line 602:
getVm().setVncKeyboardLayout(getParameters().getVncKeyboardLayout());
Line 603: }
why not handled in runVmOnceCommand?
Line 604:
Line 605: if (getParameters().getInitializationType() == null) {
Line 606: // if vm not initialized, use sysprep/cloud-init
Line 607: if (!getVm().isInitialized()) {
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RunVmParams.java
Line 19: private Boolean _useVnc;
Line 20:
Line 21: @NullOrStringContainedInConfigValueList(configValue =
ConfigValues.VncKeyboardLayoutValidValues,
Line 22: groups = { StartEntity.class }, message =
"VALIDATION.VM.INVALID_KEYBOARD_LAYOUT")
Line 23: private String vncKeyboardLayout;
why not in runOnceParams?
Line 24: private boolean _acpiEnable;
Line 25: private Boolean _win2kHackEnable;
Line 26: private String customProperties;
Line 27: private String privateFloppyPath;
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java
Line 356: public SsoMethod getSsoMethod() {
Line 357: return vmStatic.getSsoMethod();
Line 358: }
Line 359:
Line 360: public String getDefaultVncKeyboardLayout() {
not sure about the name - it's not default. maybe leave the static one as is,
and rename the dynamic one (adding dynamic or runtime to the name).
@Roy, I see there in no convention about fields both in static and dynamic?
Line 361: return vmStatic.getVncKeyboardLayout();
Line 362: }
Line 363:
Line 364: public void setDefaultVncKeyboardLayout(String vncKeyboardLayout)
{
....................................................
File
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
Line 487: RunVmOnceParams params = template != null ? template : new
RunVmOnceParams();
Line 488: if (vm.isSetStateless() && vm.isStateless()) {
Line 489: params.setRunAsStateless(true);
Line 490: }
Line 491: if (vm.isSetDisplay() && vm.getDisplay().isSetType()) {
unify both clauses under vm.isSetDisplay
Line 492: DisplayType displayType =
DisplayType.fromValue(vm.getDisplay().getType());
Line 493: if (displayType != null) {
Line 494: params.setUseVnc(displayType == DisplayType.VNC);
Line 495: }
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmRunOncePopupWidget.java
Line 33: import com.google.gwt.event.dom.client.ChangeHandler;
Line 34: import com.google.gwt.event.dom.client.ClickEvent;
Line 35: import com.google.gwt.event.dom.client.ClickHandler;
Line 36: import com.google.gwt.event.dom.client.FocusEvent;
Line 37: import com.google.gwt.event.dom.client.FocusHandler;
formatting can cause unrelated changes (keep in mind)
Line 38: import com.google.gwt.event.logical.shared.ValueChangeEvent;
Line 39: import com.google.gwt.event.logical.shared.ValueChangeHandler;
Line 40: import com.google.gwt.resources.client.CssResource;
Line 41: import com.google.gwt.text.shared.AbstractRenderer;
Line 347: }
Line 348: };
Line 349: });
Line 350:
Line 351: }
please reuse the code in AbstractVmPopupWidget somehow. I guess that it will
change here/there we'll forget the other one.
Line 352:
Line 353: void initRadioButtonEditors() {
Line 354: displayConsoleVncEditor = new
EntityModelRadioButtonEditor("1"); //$NON-NLS-1$
Line 355: displayConsoleSpiceEditor = new
EntityModelRadioButtonEditor("1"); //$NON-NLS-1$
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/RunOnceModel.java
Line 1064: private void initVncKeyboardLayout() {
Line 1065:
Line 1066: final List<String> layouts =
Line 1067: (List<String>)
AsyncDataProvider.getConfigValuePreConverted(ConfigurationValues.VncKeyboardLayoutValidValues);
Line 1068: final ArrayList<String> vncKeyboardLayoutItems = new
ArrayList<String>();
why final? and please stick to a single type (List/ArrayList)
Line 1069: vncKeyboardLayoutItems.add(null);
Line 1070: vncKeyboardLayoutItems.addAll(layouts);
Line 1071: getVncKeyboardLayout().setItems(vncKeyboardLayoutItems);
Line 1072:
Line 1072:
Line 1073: getVncKeyboardLayout().setIsChangable(false);
Line 1074: }
Line 1075:
Line 1076: private boolean isVncSelected() {
looks like unused method
Line 1077: boolean isVnc = false;
Line 1078:
Line 1079: if (getDisplayProtocol().getSelectedItem() != null)
Line 1080: {
--
To view, visit http://gerrit.ovirt.org/22620
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id908cbaca9f1b20b4b9868a87a8b21f318a493e6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches