webadmin: 'for min' label width is too short

In cluster policy view.
Causing line to break in other locales.
removed width style.

Change-Id: I5cfcdf53b068859c38a4ad00135383c63ddfe303
Bug-Url: https://bugzilla.redhat.com/921901
Signed-off-by: Gilad Chaplik <gchaplik@redhat.com>
webadmin: fixing edit policy button style

In other locales the button text overflow.
Fixed alignment (margin) and removed button's width.

Change-Id: Ibfe84279c19fb9b8824acc8fb3d082c131f5083c
Bug-Url: https://bugzilla.redhat.com/921892
Signed-off-by: Gilad Chaplik <gchaplik@redhat.com>
webadmin: Created class hierarchy for bond popups

Created a class hierarchy for bond popup windows to replace the "compact
mode" boolean parameter mechanism. This to enable better control over
which windows enable creating new bonds from the engine in following
patches.

Change-Id: Ib9f4de41a5d298bf922e9ad7fee64ee2b62c3700
Signed-off-by: Lior Vernia <lvernia@redhat.com>
webadmin: Changed bond list models to hold String

The models all used to hold VdsNetworkInterface entities, but only ever
used the NICs' names, so they really should have held String entities
all along. This will facilitate adding new bonds in following patches.

Change-Id: I4ede413e9c6fdc4b117eb10d6e7ff580f65324d1
Signed-off-by: Lior Vernia <lvernia@redhat.com>
webadmin: Added SuggestBox bond name widget

When creating a new bond or editing an existing one through the newer
bond popup window, the widget for picking a bond name is now a
SuggestBox rather than a ValueListBox. This enables the user to input a
new bond name, as well as choose between suggested bond names that
already exist on the host and are free (as was customary historically).

Change-Id: I130586dc4787abecf81566a8d3b723d093f6fca2
Signed-off-by: Lior Vernia <lvernia@redhat.com>
webadmin: Added frontend bond name validation

Now that the user may add new bond names, it is necessary to check that
the given name is of the correct format; added a specific validation
class, as well as the code to actually perform the check on the popup
window.

Change-Id: I8f5ea2b582f3117817ef72f7d3350977a124681f
Signed-off-by: Lior Vernia <lvernia@redhat.com>
webadmin: Added default created bond to comply with SuggestBox

Since when performing a bonding action, the user may now create a
newly-named bond, it doesn't make much sense to choose one of the
existing free bonds by default. The solution is to put a "bond" prefix
as default, and let the user either proceed to add an arbitrary number
or choose one of the suggested existing bonds.

Change-Id: I6b68f6b5f89089a7f78609b78df2e3e92827234d
Signed-off-by: Lior Vernia <lvernia@redhat.com>
webadmin: Modified model logic to support adding new bonds

The model used to check that there were actually free bonds reported by
the host; this is no longer necessary once we enable the user to add new
bonds. Also deleted the corresponding error message.

Change-Id: I7d3c2377ff9d95dfff1c3c416e7fc9242795e227
Signed-off-by: Lior Vernia <lvernia@redhat.com>
webadmin: Enable column resizing in Network main tab

1. Enabled column resizing in Network main tab table,
   to keep it consistent with other table-based main
   tabs

2. Removed maxTextLength restriction since the column
   resizing makes it unnecessary (the user can simply
   resize the column)

Change-Id: Ib89d494a26a7fb48a5525057ab89e86f2ac07ad6
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
webadmin: AddVmFromTemplate - remove redundant logic

Removing redundant logic from VmListModel -> onSave():
for getting selected storage domains / allocation policies,
DisksAllocationModel -> getImageToDestinationDomainMap()
should be passed to AddVmFromTemplateParameters.

Change-Id: I1eb9157cbf692a8de4e5751390ed925310bdf4a0
Signed-off-by: Daniel Erez <derez@redhat.com>
engine: Configure management network at host activation

If the engine detects a host which has no management network (either
due to new installation or misconfiguration), the host activation
command will attempt to configure a management network on top of that
interface.

The network configuration on the host will relies on the same
information as reported by VDSM for the host (boot protocol, IP
address and subnet mask).

Change-Id: Ia82e594b888b84b3aa079cc9aa76fa0dddc59f1d
Bug-Url: http://bugzilla.redhat.com/891056
Signed-off-by: Moti Asayag <masayag@redhat.com>
webadmin: NewEditStorageModelBehavior refactor

- Refactor items availability logic in NewEditStorageModelBehavior
  (I.e. extract the numerous conditions into boolean flags).
- Remove the deprecated export Iscsi/FCP models from the
  items list (simplifies the availability conditions).

Change-Id: Ib8e1914811367726d46c1bfaea08aba37174c11e
Signed-off-by: Daniel Erez <derez@redhat.com>
core: Remove GetVmsByUserid

GetVmsByUseridQuery is not used anywhere in
the code, and hence should be removed.

This patch removes the following:
1. The GetVmsByUseridQuery class
2. The GetVmsByUserid constant representing
   it in VdcQueryType
3. The GetVmsByUseridParameters class which
   was only used by the removed query class.

Change-Id: I1ed4821fceb06fbce6ac3f4b3851d903637b3132
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove GetVmPoolMapByVmPoolId

GetVmPoolMapByVmPoolIdQuery is not used anywhere in
the code, and hence should be removed.

This patch removes the following:
1. The GetVmPoolMapByVmPoolIdQuery class
2. The GetVmPoolMapByVmPoolId constant representing
   it in VdcQueryType
3. The GetVmPoolMapByVmPoolIdParameters class which
   was only used by the removed query class.

Change-Id: I26120323c99b3043321032d3c495dc7faed0a8b3
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove VdcUtils

This class is not used at all.

Change-Id: I7de5666a260ad57a30534adc1ea86a5ef5642886
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
core: Remove GetAllVmPools

GetAllVmPoolsQuery is not used anywhere in
the code, and hence should be removed.

This patch removes the following:
1. The GetAllVmPoolsQuery class
2. The GetAllVmPools constant representing
   it in VdcQueryType

Change-Id: I09730eba7e90bc1372569ca8389ff346c099aa23
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove HasFreeVmsInPool

HasFreeVmsInPoolQuery is not used anywhere in
the code, and hence should be removed.

This patch removes the following:
1. The HasFreeVmsInPoolQuery class
2. The HasFreeVmsInPool constant representing
   it in VdcQueryType
3. The HasFreeVmsInPoolParameters class which
   was only used by the removed query class.
4. Moved several static methods from VmPoolCommandBase which were used
   by HasFreeVmsInPoolQuery and AttachUserToVmFromPoolAndRunCommand to
   AttachUserToVmFromPoolAndRunCommand, as it is now the only command
   that uses them - getVmToAttach(NGuid),
   getPrestartedVmToAttach(NGuid), getNonPrestartedVmToAttach(NGuid).
   These methods' visibility was also reduced to private, as they no
   longer need to be used outside this class.

Change-Id: I3ed0bd42dc7c3c33bffcd97035c5c5e80bdc6df6
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove CanUpdateFieldGeneric

CanUpdateFieldGenericQuery is not used anywhere in
the code, and hence should be removed.

This patch removes the following:
1. The CanUpdateFieldGenericQuery class
2. The CanUpdateFieldGeneric constant representing
   it in VdcQueryType
3. The CanUpdateFieldGenericParameters class which
   was only used by the removed query class.

Change-Id: I644d8b5c6854de5c14b3a93fd37c2e77666a890e
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove RegisterSearch and UnregisterSearch

Removed the RegisterSearch and UnregisterSearch constants from
VdcQueryType, as the corresponding queries no longer exists, making
these constants useless.

Change-Id: I2a1bb82d7096fa7cc6ef807739fec10cb44e1cbe
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove GetAvailableClustersByServerCpu

GetAvailableClustersByServerCpuQuery is not used anywhere in
the code, and hence should be removed.

This patch removes the following:
1. The GetAvailableClustersByServerCpuQuery class.
2. The GetAvailableClustersByServerCpu constant representing
   it in VdcQueryType.
3. The GetAvailableClustersByServerCpuParameters class only used by
   the aforementioned query.
4. Methods in CpuFlagsManagerHandler only used by the
   aforementioned query: GetAllServerCpusBelowCpu(String, Version)
   and GetAllServerCpusBelowCpu(String).

Change-Id: Id8bca65412e18c2c62ead41825b08cddd9506c11
Signed-off-by: Allon Mureinik <amureini@redhat.com>