Martin Beták has uploaded a new change for review.

Change subject: webadmin: GUI support for setting the new 
VmPool.maxAssignedVmsPerUser property
......................................................................

webadmin: GUI support for setting the new VmPool.maxAssignedVmsPerUser property

Added textbox to VmPool New and Edit dialog for setting the new
maxAssignedVmsPerUser property

Change-Id: Ic92e98c87a72326b14a7ae002353cf720f3c9605
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=827248
Signed-off-by: Martin Betak <mbe...@redhat.com>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationMessages.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolNewPopupWidget.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
12 files changed, 112 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/07/14007/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
index 43be6d0..a4afabf 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
@@ -1078,6 +1078,9 @@
     @DefaultStringValue("VMs")
     String vms();
 
+    @DefaultStringValue("Maximum number of VMs per user")
+    String maxAssignedVmsPerUser();
+
     @DefaultStringValue("SPM Priority")
     String spmPriority();
 
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationMessages.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationMessages.java
index d5d1cc8..143ac13 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationMessages.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationMessages.java
@@ -63,6 +63,9 @@
             + "pool'' the generated names will be: 
my01pool,my02pool,...my99pool")
     String poolNameHelp();
 
+    @DefaultMessage("Maximum number of VMs a single user can attach to from 
this pool. Accepted values: 1 to the Number of VMs that already exists in the 
Pool.")
+    String maxAssignedVmsPerUserHelp();
+
     @DefaultMessage("Free: {0} vCPU")
     String quotaFreeCpus(int numOfVCPU);
 
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
index 3e7fcb4..ba4d5d1 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
@@ -194,14 +194,31 @@
     @Ignore
     public InfoIcon editPoolPrestartedVmsIcon;
 
+    @UiField(provided = true)
+    @Ignore
+    public InfoIcon newPoolMaxAssignedVmsPerUserIcon;
+
+    @UiField(provided = true)
+    @Ignore
+    public InfoIcon editPoolMaxAssignedVmsPerUserIcon;
+
     @UiField
     @Path(value = "prestartedVms.entity")
     @WithElementId("prestartedVms")
     public EntityModelTextBoxOnlyEditor prestartedVmsEditor;
 
     @UiField
+    @Path("maxAssignedVmsPerUser.entity")
+    @WithElementId("maxAssignedVmsPerUser")
+    public EntityModelTextBoxOnlyEditor maxAssignedVmsPerUserEditor;
+
+    @UiField
     @Ignore
     public FlowPanel newPoolEditVmsPanel;
+
+    @UiField
+    @Ignore
+    public FlowPanel newPoolEditMaxAssignedVmsPerUserPanel;
 
     @UiField
     @Ignore
@@ -222,6 +239,10 @@
 
     @UiField
     @Ignore
+    public FlowPanel editPoolEditMaxAssignedVmsPerUserPanel;
+
+    @UiField
+    @Ignore
     public Label editPrestartedVmsLabel;
 
     @UiField
@@ -233,6 +254,11 @@
     @Path("numOfDesktops.entity")
     @WithElementId("incraseNumOfVms")
     public EntityModelTextBoxOnlyEditor incraseNumOfVmsEditor;
+
+    @UiField
+    @Path("maxAssignedVmsPerUser.entity")
+    @WithElementId("editMaxAssignedVmsPerUser")
+    public EntityModelTextBoxOnlyEditor editMaxAssignedVmsPerUserEditor;
 
     @UiField(provided = true)
     @Path("assignedVms.entity")
@@ -537,6 +563,12 @@
 
         poolNameIcon.setVisible(false);
 
+        newPoolMaxAssignedVmsPerUserIcon =
+                new 
InfoIcon(applicationTemplates.italicText(messages.maxAssignedVmsPerUserHelp()), 
resources);
+
+        editPoolMaxAssignedVmsPerUserIcon =
+                new 
InfoIcon(applicationTemplates.italicText(messages.maxAssignedVmsPerUserHelp()), 
resources);
+
         outOfxInPool = new ValueLabel<Object>(new AbstractRenderer<Object>() {
 
             @Override
@@ -561,8 +593,10 @@
     private void hidePoolSpecificFields() {
         numOfVmsEditor.setVisible(false);
         newPoolEditVmsPanel.setVisible(false);
+        newPoolEditMaxAssignedVmsPerUserPanel.setVisible(false);
         editPoolEditVmsPanel.setVisible(false);
         editPoolIncraseNumOfVmsPanel.setVisible(false);
+        editPoolEditMaxAssignedVmsPerUserPanel.setVisible(false);
     }
 
     protected abstract void generateIds();
@@ -725,6 +759,8 @@
 
         prestartedLabel.setText(constants.prestartedPoolPopup());
         numOfVmsEditor.setLabel(constants.numOfVmsPoolPopup());
+        
maxAssignedVmsPerUserEditor.setLabel(constants.maxAssignedVmsPerUser());
+        
editMaxAssignedVmsPerUserEditor.setLabel(constants.maxAssignedVmsPerUser());
 
         // initial run Tab
         initialRunTab.setLabel(constants.initialRunVmPopup());
@@ -1072,6 +1108,8 @@
         prestartedVmsEditor.setTabIndex(nextTabIndex++);
         editPrestartedVmsEditor.setTabIndex(nextTabIndex++);
         incraseNumOfVmsEditor.setTabIndex(nextTabIndex++);
+        maxAssignedVmsPerUserEditor.setTabIndex(nextTabIndex++);
+        editMaxAssignedVmsPerUserEditor.setTabIndex(nextTabIndex++);
 
         templateEditor.setTabIndex(nextTabIndex++);
         memSizeEditor.setTabIndex(nextTabIndex++);
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
index 31ab8a2..7c76d39 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
@@ -162,31 +162,31 @@
                        padding-bottom: 35px;
         }
         
-        .prestartedVmsEditorContent,.nameEditorContent {
+        
.prestartedVmsEditorContent,.nameEditorContent,.maxAssignedVmsPerUserEditorContent
 {
                width: 230px;
         }
         
-        .prestartedVmsEditor,.nameEditor {
+        .prestartedVmsEditor,.nameEditor,.maxAssignedVmsPerUserEditor {
                float: right;
                width: 230px;
         }
         
-        .editPrestartedVmsEditor {
+        .editPrestartedVmsEditor,.editMaxAssignedVmsPerUserEditor {
                float: left;
                padding-right: 10px;
         }
         
-        .prestartedVmsIcon, .poolNameIcon {
+        .prestartedVmsIcon, .poolNameIcon, .maxAssignedVmsPerUserIcon {
                float: left;
                padding-top: 5px;
             padding-left: 2px;
         }
         
-        .prestartedLabelWithHelp,.increasePrestartedLabel {
+        
.prestartedLabelWithHelp,.increasePrestartedLabel,.maxAssignedVmsPerUserLabel {
                float: left;
         }
 
-        .editPrestartedVms,.editIncreaseVms {
+        .editPrestartedVms,.editIncreaseVms,.editMaxAssignedVmsPerUser {
             float: right;
                width: 230px;
         }
@@ -196,7 +196,7 @@
                color: #333333;
         }
         
-        .increaseVmsInPoolVms {
+        .increaseVmsInPoolVms,.maxAssignedVmsPerUserVms {
                float: left;
         }
 
@@ -236,6 +236,14 @@
                                                                
<e:EntityModelTextBoxOnlyEditor ui:field="prestartedVmsEditor" 
addStyleNames="{style.prestartedVmsEditor}" 
contentWidgetStyleName="{style.prestartedVmsEditorContent}" />
                             </g:FlowPanel>
                             
+                            <g:FlowPanel 
ui:field="newPoolEditMaxAssignedVmsPerUserPanel" 
addStyleNames="{style.poolEditVms}">
+                               <g:FlowPanel 
addStyleNames="{style.maxAssignedVmsPerUserLabel}">
+                                                                       
<g:Label text="{constants.maxAssignedVmsPerUser}" 
addStyleNames="{style.maxAssignedVmsPerUserLabel}" />
+                                                                       
<d:InfoIcon ui:field="newPoolMaxAssignedVmsPerUserIcon" 
addStyleNames="{style.maxAssignedVmsPerUserIcon}" />
+                                                               </g:FlowPanel>
+                                                               
<e:EntityModelTextBoxOnlyEditor ui:field="maxAssignedVmsPerUserEditor" 
addStyleNames="{style.maxAssignedVmsPerUserEditor}" 
contentWidgetStyleName="{style.maxAssignedVmsPerUserEditorContent}" />
+                            </g:FlowPanel>
+                            
 <!--                             Edit VM Pool -->
                             <g:FlowPanel addStyleNames="{style.poolEditVms}" 
ui:field="editPoolEditVmsPanel">
                                                                <g:FlowPanel 
addStyleNames="{style.prestartedLabelWithHelp}">
@@ -255,6 +263,17 @@
                                                                        
<g:Label text="{constants.vms}" addStyleNames="{style.increaseVmsInPoolVms}" />
                                                                </g:FlowPanel>
                             </g:FlowPanel>
+                           
+                           <g:FlowPanel 
ui:field="editPoolEditMaxAssignedVmsPerUserPanel" 
addStyleNames="{style.poolEditVms}">
+                                       <g:FlowPanel 
addStyleNames="{style.maxAssignedVmsPerUserLabel}">
+                                               <g:Label 
text="{constants.maxAssignedVmsPerUser}" 
addStyleNames="{style.maxAssignedVmsPerUserLabel}" />
+                                               <d:InfoIcon 
ui:field="editPoolMaxAssignedVmsPerUserIcon" 
addStyleNames="{style.maxAssignedVmsPerUserIcon}" />
+                                       </g:FlowPanel>
+                                       <g:FlowPanel 
addStyleNames="{style.editMaxAssignedVmsPerUser}">
+                                               <e:EntityModelTextBoxOnlyEditor 
ui:field="editMaxAssignedVmsPerUserEditor" 
addStyleNames="{style.editMaxAssignedVmsPerUserEditor}" 
contentWidgetStyleName="{style.textBox}" />
+                                               <g:Label text="{constants.vms}" 
addStyleNames="{style.maxAssignedVmsPerUserVms}" />
+                                       </g:FlowPanel>
+                           </g:FlowPanel>
                             <e:ListModelListBoxEditor 
ui:field="templateEditor"/>
                         </g:FlowPanel>
                         <g:FlowPanel addStyleNames="{style.sectionPanel}">
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
index 2a27c80..e258249 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
@@ -78,6 +78,7 @@
 
         editPrestartedVmsEditor.setEnabled(true);
         incraseNumOfVmsEditor.setEnabled(true);
+        editMaxAssignedVmsPerUserEditor.setEnabled(true);
     }
 
     private void disableAllTabs() {
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolNewPopupWidget.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolNewPopupWidget.java
index 078feae..76b9569 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolNewPopupWidget.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolNewPopupWidget.java
@@ -44,18 +44,23 @@
 
         if (object.getIsNew()) {
             prestartedVmsEditor.setEnabled(false);
+            maxAssignedVmsPerUserEditor.setEnabled(false);
             object.getNumOfDesktops().setEntity("1"); //$NON-NLS-1$
 
             numOfVmsEditor.setVisible(true);
             newPoolEditVmsPanel.setVisible(true);
+            newPoolEditMaxAssignedVmsPerUserPanel.setVisible(true);
             editPoolEditVmsPanel.setVisible(false);
             editPoolIncraseNumOfVmsPanel.setVisible(false);
+            editPoolEditMaxAssignedVmsPerUserPanel.setVisible(false);
         } else {
             numOfVmsEditor.setVisible(false);
             newPoolEditVmsPanel.setVisible(false);
+            newPoolEditMaxAssignedVmsPerUserPanel.setVisible(false);
             editPoolEditVmsPanel.setVisible(true);
             prestartedVmsEditor.setEnabled(true);
             editPoolIncraseNumOfVmsPanel.setVisible(true);
+            editPoolEditMaxAssignedVmsPerUserPanel.setVisible(true);
         }
     }
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
index f4cef73..f35e865 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
@@ -316,6 +316,8 @@
                         
model.getAssignedVms().setEntity(pool.getAssignedVmsCount());
                         
model.getPrestartedVms().setEntity(pool.getPrestartedVms());
                         model.setPrestartedVmsHint("0-" + 
pool.getAssignedVmsCount()); //$NON-NLS-1$
+                        
model.getMaxAssignedVmsPerUser().setEntity(pool.getMaxAssignedVmsPerUser());
+
                     }
                 }));
     }
@@ -441,6 +443,7 @@
                         pool.setVmPoolDescription((String) 
model.getDescription().getEntity());
                         pool.setVdsGroupId(((VDSGroup) 
model.getCluster().getSelectedItem()).getId());
                         
pool.setPrestartedVms(model.getPrestartedVms().AsConvertible().Integer());
+                        
pool.setMaxAssignedVmsPerUser(model.getMaxAssignedVmsPerUser().AsConvertible().Integer());
 
                         EntityModel poolTypeSelectedItem = (EntityModel) 
model.getPoolType().getSelectedItem();
                         pool.setVmPoolType((VmPoolType) 
poolTypeSelectedItem.getEntity());
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolModel.java
index 570b9af..68c23b6 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolModel.java
@@ -1,13 +1,13 @@
 package org.ovirt.engine.ui.uicommonweb.models.pools;
 
+import java.util.ArrayList;
+
 import org.ovirt.engine.core.common.businessentities.VmOsType;
 import org.ovirt.engine.core.common.businessentities.VmPoolType;
 import org.ovirt.engine.ui.uicommonweb.models.EntityModel;
 import org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel;
 import org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase;
 import org.ovirt.engine.ui.uicompat.ConstantsManager;
-
-import java.util.ArrayList;
 
 public class PoolModel extends UnitVmModel {
 
@@ -31,6 +31,7 @@
         getAssignedVms().setIsAvailable(true);
         getNumOfDesktops().setIsAvailable(true);
         getPrestartedVms().setIsAvailable(true);
+        getMaxAssignedVmsPerUser().setIsAvailable(true);
 
         setIsPoolTabValid(true);
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
index 615b9c0..dbb4c07 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
@@ -320,16 +320,25 @@
                         new IntegerValidation(0, assignedVms)
                 });
 
+        getModel().getMaxAssignedVmsPerUser().ValidateEntity(
+                new IValidation[]
+                {
+                        new NotEmptyValidation(),
+                        new IntegerValidation(1, assignedVms)
+                });
+
         getModel().setIsGeneralTabValid(getModel().getIsGeneralTabValid()
                 && getModel().getName().getIsValid()
                 && getModel().getNumOfDesktops().getIsValid()
-                && getModel().getPrestartedVms().getIsValid());
+                && getModel().getPrestartedVms().getIsValid()
+                && getModel().getMaxAssignedVmsPerUser().getIsValid());
 
         getModel().setIsPoolTabValid(true);
 
         return super.Validate()
                 && getModel().getName().getIsValid()
                 && getModel().getNumOfDesktops().getIsValid()
-                && getModel().getPrestartedVms().getIsValid();
+                && getModel().getPrestartedVms().getIsValid()
+                && getModel().getMaxAssignedVmsPerUser().getIsValid();
     }
 }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
index d2d5e20..eadbd8d 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
@@ -96,6 +96,7 @@
 
             getNumOfDesktops().setIsChangable(false);
             getPrestartedVms().setIsChangable(false);
+            getMaxAssignedVmsPerUser().setIsChangable(false);
 
             getTemplate().setIsChangable(false);
             getMemSize().setIsChangable(false);
@@ -1172,6 +1173,10 @@
         getPrestartedVms().setEntity(0);
         getPrestartedVms().setIsAvailable(false);
 
+        setMaxAssignedVmsPerUser(new NotChangableForVmInPoolEntityModel());
+        getMaxAssignedVmsPerUser().setEntity(1);
+        getMaxAssignedVmsPerUser().setIsAvailable(false);
+
         setDisksAllocationModel(new DisksAllocationModel());
 
         setProvisioningClone_IsSelected(new 
NotChangableForVmInPoolEntityModel());
@@ -2158,6 +2163,16 @@
         }
     }
 
+    private NotChangableForVmInPoolEntityModel maxAssignedVmsPerUser;
+
+    public EntityModel getMaxAssignedVmsPerUser() {
+        return maxAssignedVmsPerUser;
+    }
+
+    public void setMaxAssignedVmsPerUser(NotChangableForVmInPoolEntityModel 
maxAssignedVmsPerUser) {
+        this.maxAssignedVmsPerUser = maxAssignedVmsPerUser;
+    }
+
     private class NotChangableForVmInPoolListModel extends ListModel {
         @Override
         public void setIsChangable(boolean value) {
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index 669c751..9849c34 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -107,6 +107,7 @@
 VM_IMAGE_LOCKED=Cannot run VM. The disk image is being copied. Please wait for 
the copy operation to complete.
 VM_POOL_CANNOT_ADD_VM_WITH_USERS_ATTACHED_TO_POOL=Cannot attach VM to VM-Pool. 
VM-Pool is already attached to a User.
 ACTION_TYPE_FAILED_USER_ATTACHED_TO_POOL=User is already attached to this 
VM-Pool.
+VM_POOL_CANNOT_ATTACH_TO_MORE_VMS_FROM_POOL=User is already attached to 
maximum number of VMs from this VM-Pool.
 VM_POOL_CANNOT_ADD_VM_ATTACHED_TO_POOL=Cannot attach VM to pool. VM is already 
attached to another VM-Pool.
 VM_POOL_CANNOT_DETACH_VM_NOT_ATTACHED_TO_POOL=Cannot detach VM from pool. VM 
is not attached to the VM-Pool.
 VM_POOL_CANNOT_ADD_VM_DIFFERENT_CLUSTER=Cannot attach VM to VM-Pool. VM 
resides on different Host Cluster than VM-Pool.
@@ -303,6 +304,7 @@
 USB_LEGACY_NOT_SUPPORTED_ON_LINUX_VMS=Legacy USB support is not available on 
Linux VMs.
 VM_POOL_CANNOT_CREATE_FROM_BLANK_TEMPLATE=VM-Pool must be based on  non-blank 
Template.
 VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND=Cannot edit VM-Pool properties - VM-Pool 
not found.
+VM_POOL_NUMBER_OF_ASSIGNED_VMS_OUT_OF_RANGE=Number of max assigned VMs per 
user must be between 1 and the current size of the pool.
 ACTION_TYPE_FAILED_VM_TASKS_ARE_ALREADY_RUNNING=Cannot ${action} ${type}. 
There are already asynchronous running tasks, please retry later.
 VM_CANNOT_SUSPENDE_HAS_RUNNING_TASKS=Cannot suspend VM. VM has asynchronous 
running tasks, please retry later.
 VM_CANNOT_SUSPEND_STATELESS_VM=Cannot suspend VM, VM is stateless.
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index 91f69b0..243bceb 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -300,6 +300,8 @@
 USB_LEGACY_NOT_SUPPORTED_ON_LINUX_VMS=Legacy USB support is not available on 
Linux VMs.
 VM_POOL_CANNOT_CREATE_FROM_BLANK_TEMPLATE=VM-Pool must be based on  non-blank 
Template.
 VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND=Cannot edit VM-Pool properties - VM-Pool 
not found.
+VM_POOL_NUMBER_OF_ASSIGNED_VMS_OUT_OF_RANGE=Number of max assigned VMs per 
user must be between 1 and the current size of the pool.
+VM_POOL_CANNOT_ATTACH_TO_MORE_VMS_FROM_POOL=User is already attached to 
maximum number of VMs from this VM-Pool.
 ACTION_TYPE_FAILED_VM_TASKS_ARE_ALREADY_RUNNING=Cannot ${action} ${type}. 
There are already asynchronous running tasks, please retry later.
 VM_CANNOT_SUSPENDE_HAS_RUNNING_TASKS=Cannot suspend VM. VM has asynchronous 
running tasks, please retry later.
 VM_CANNOT_SUSPEND_STATELESS_VM=Cannot suspend VM, VM is stateless.


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic92e98c87a72326b14a7ae002353cf720f3c9605
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Beták <mbe...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to