core: fixed searching disks by creation date

DiskConditionFieldAutoCompleter:
'CREATION_DATE' is used as a key,
hence -> s/CREATIONDATE/CREATION_DATE

Change-Id: I33ea01be04ca435cc5d8c0dc3521d7d3f557f206
Signed-off-by: Daniel Erez <derez@redhat.com>
core: DiskConditionField - extract verbs to constants

DiskConditionFieldAutoCompleter:
extract verbs to constants - needed for column sorting support in the UI.

Change-Id: I7d0aa6d38799e7e922d4f5ddf5fca56c76598136
Signed-off-by: Daniel Erez <derez@redhat.com>
webadmin: column sorting support for Disks tabs

Enabled column sorting for:
* Disks main-tab.
* Disks sub-tabs (under Storage/VMs/Pools).

Change-Id: Ifc48b58c35320fb095183ccae22b54d132492944
Signed-off-by: Daniel Erez <derez@redhat.com>
webadmin: column sorting support for Storage sub-tabs

Enabled column sorting for sub-tabs under Storage main-tab.

Note:
column sorting isn't supported for tree-based sub-tabs,
hence, sorting for VMs/Templates sub-tabs is not applicable.

Change-Id: I210701c4498fc7a057fd1ed7154e0e9bcb572248
Signed-off-by: Daniel Erez <derez@redhat.com>
webadmin: column sorting support for Disks sub-tabs

Enabled column sorting for sub-tabs under Disks main-tab.

ToDo: sorting support for PercentColumn and StatusColumn.

Change-Id: Ief020f9f87c7ccdd92fbdd1802a121b1c08c2579
Signed-off-by: Daniel Erez <derez@redhat.com>
core: Changing Host free space threshold

Engine raises a warning that free space in /var/run/vdsm is less than
1G.
/var/run/vdsm contains tiny .pid files, small .recovery files, soft
links, etc. 100MB would be enough for a big production
server.

Change-Id: I138e074fc26f34f6c87e72f5cebd28d29a88b79a
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=906788
Signed-off-by: Eli Mesika <emesika@redhat.com>
core: adding missing command constructor

Change-Id: Ie248f1011ec17081d679da9984c05f0f3a9b99c0
Signed-off-by: Oved Ourfali <oourfali@redhat.com>
ui: avoid casting warnings on findbugs

Change-Id: I07e7ec1e01dd6069f75e08202d11a0c87cac2d58
Signed-off-by: Yaniv Bronhaim <ybronhei@redhat.com>
core, engine: Avoid migration in ppc64

This patch forces every ppc64 VM to be pinned to a host and every ppc64
cluster to have the "Do not migrate" resilience policy.

Change-Id: I4808f3e91ccf37462727a28d35f9f9faae1dfd6c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1057178
Signed-off-by: Gustavo Pedrosa <gustavo.pedrosa@eldorado.org.br>
core, engine: Fix HotPlugCpuSupported config value

The 'HotPlugCpuSupported' configuration value was not present in the
database and another unused property called HotPlugCpuEnable contained
syntax errors that prevented it from being read by the JSON parser.
This patch removes the unused property and adds the correct one, fixing
the syntax errors that were present.

Change-Id: I3ef5b2e39b2067239721a65b031d247ace3b0c2c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1069802
Signed-off-by: Vitor de Lima <vitor.lima@eldorado.org.br>
restapi: missing vms link under affinity groups

Change-Id: Ia913bee64669db435be49463821ae68fe61978be
Bug-Url: https://bugzilla.redhat.com/1112221
Signed-off-by: Gilad Chaplik <gchaplik@redhat.com>
aaa: more fixes to command context propgation

Change-Id: Icbf9e0216c83d981d11bb2d8d2a939fd2a279d9d
Topic: AAA
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>
tools: Expose VmGracefulShutdownTimeout option to engine-config

Change-Id: I0a5f7ebf61a6e5f9524bf15f97e2b4de5ed4c314
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1111253
Signed-off-by: Martin Betak <mbetak@redhat.com>
restapi: rsdl_metadata - quota.id in add disk

rsdl_metadata.yaml: added 'quota.id' to add/update disk
(to expose through ovirt-sdk/cli)

Change-Id: Icaa61142227e8751ee1b4444e7c71fcd5bf3415e
Bug-Url: https://bugzilla.redhat.com/1111150
Signed-off-by: Daniel Erez <derez@redhat.com>
aaa: always use engine context for queries

If not passed by ctors, try to create based on the
parameters.sessionId attribute

Change-Id: I5b82edb87716a57ed658605939fbb42f07824af3
Topic: AAA
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>
engine: Clear eclipse warning in AddVdsCommand

Adding type and using getProviderDao().

Change-Id: I5804c466e70584e7d8455247b7524407d1623b97
Signed-off-by: Moti Asayag <masayag@redhat.com>
core: handle fence agent power wait param on stop

When a host restart is dome manually or as a result of a
non-responsive host treatment and in the case that power wait parameter
is used the host may stay in 'off' state and even release its lock on HA
VMs before the host is really down

This is the scenario:
1) A restart command is issued and actually performed as
   stop -> wait for 'off' status -> start -> wait for 'on' status
2) power wait parameter is added to the command implicitly or explicitly
giving a delay of X seconds before the operation is actually performed
3) The fence agent script returns immediately with 'off' status
4) A 'on' command is sent to the fence agent by the start operation
5) X seconds passed and the host is actually shutdown

This patch handles this by adding a new configuration value that maps
fence agents to the name of the parameter for power wait and it also
adds a custom configuration value that may be set for custom fence
agents.

Upon stop operation, we will wait a fixed delay (5 seconds hard-coded)
before starting to sample the host status, if power wait parameter is
used, the value is extracted and we will wait for 5 + X seconds.

Change-Id: I310e076ecf84988cacd0b179954d2460d7988b91
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1093742
Signed-off-by: Eli Mesika <emesika@redhat.com>
backend: Add richer formatting of migration duration

Upon migration completion the events showed migration duration only in
seconds (e.g. 1244 sec).

Now we display it in the format "1 hour, 15 minutes, 59 seconds".

Change-Id: Ic6e8901be66480c7212fa3a98a28a332d13f13e8
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1092884
Signed-off-by: Martin Betak <mbetak@redhat.com>
extapi: aaa: add auth result to credential change

usable for provides that can support that.

Change-Id: Ib2c360414aad8e9b68174cbc0aa03b4633b6fc7f
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
engine: Configure unique host name on neutron.conf

The agent name should be determined by the engine to support its
association with the ml2 port bindings.
The "host" property within the neutron.conf is used to identify
the agent on the neutron node, when the agent communicates with
the neutron node.

When a port is being allocated on the neutron node, the engine should
provide also the agent the port is intended to be run on. The agent is
identified by that "host" property.
By identifying the agent, the ml2 driver resolves the plugin type
(openvswitch, linuxbridge or any other supported plugin).

So the engine should be able to define a unique host name for each
agent, first for the agent which reports its name to the neutron node,
and later-on when ports are allocated on each agent.

Since the host name is unique, and could be changed only by
re-installing the host, it makes sense to use it as the agent name.

Change-Id: I18db7cce8769b23b1fafcf5ac31ebdb7556a7cec
Signed-off-by: Moti Asayag <masayag@redhat.com>