engine: unit test for isCpuPinningValid

Adds a negative test for the case when there is pinning but no pinned to
a host.

Change-Id: Ifd736d87851d2250358a13c78a64f1a05d23db72
Signed-off-by: Laszlo Hornyak <lhornyak@redhat.com>
core: add repo_file_id to repo_file_meta_data

In order to support image repositories that define an id and a friendly
name for the images the two fields have been separated.

Change-Id: I2791fa22820fc021938709f4a921ab4d6213fab7
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
engine: Refactoring GlusterManager

Renamed GlusterManager to GlusterSyncJob.
Added a base class GlusterJob that all gluster job
classes can extend from.

Created a class GlusterJobsManager that's responsible
for scheduling gluster jobs.

Change-Id: I61d851928f18da22b352b7be9d6ccaf4382e7930
Signed-off-by: Sahina Bose <sabose@redhat.com>
engine: Introducing using of Infinispan cache at TimeoutBase

The TimeoutBase was used for the following purpose:
1. The audit event which has expiration time was put to it internal cache
2. If the same event was tried to put again and it is expired, it was written to DB

Sound simple but a following implementation contains:
1. Memory leak - if we never tried to put event when it was already expired, internal cache
   never will be cleared
2. Restart - restart in the middle , event will be never send to DB

Solution:
I decided to use infinispan cache, from now if event has expiration time and it not contains in cache
it will be written to DB.
If event is contains in cache it will be skipped.
The cache has putIfAbsent() API which is similar to ConcurrentHashMap API, the entries are added to cache
with lifespan and will be cleared automatically by cache.

Change-Id: I2fbebb10c08c87d2c7fd4d7443d3e3b374541ed7
Signed-off-by: Michael Kublin <mkublin@redhat.com>
engine: VDS command - gluster hooks list

Gets the list of gluster hooks on a server.

Change-Id: I46e47dda9717373d15264e0af942ce93d2293cb4
Signed-off-by: Sahina Bose <sabose@redhat.com>
core: Allow creating ISO domain on other file-based storages except NFS

This patch allows creating ISO domain on file-based storage domain,
including localfs and posixfs. Even though localfs can't be shared
among the hosts in cluster, it could be useful in the case of no NFS available.
VM can be created on the host which has the ISO domain attached,
and then be migrated to any other host in the cluster or make a template
from it. This is also a good feature for POCs, all-in-one, etc.

Change-Id: I2a8d3ea8ab4ac10353ec8574287458e8eb63e882
Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Support importing iso domain on other file based storages except NFS.

This patch adds support for importing iso domain on file based storage,
including localfs storage and poxisfs storage.

Change-Id: Id04af5e4f43d4d96c5ddc316af73ee4a81384b52
Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Signed-off-by: Allon Mureinik <amureini@redhat.com>
engine: VDS command to get gluster host UUID

A new vds command is introduced to get the gluster uuid
of the host.

Change-Id: Ie73558f8c9469e1ce3710e4d77fa1072059267ad
Signed-off-by: Kanagaraj M <kmayilsa@redhat.com>
core: removal of unneeded member/method

StorageDomainCommandBase has a private member called _storagePool and a method
called getStoragePool() which overrides the getStoragePool() method
(which has the same implementation) defined at AuditLogableBase. The setter
method isn't being overriden, which means that calling getStoragePool() on
StorageDomainCommandBase and lower classes in it's hierarchy will return the
value of the _storagePool member defined in StorageDomainCommandBase, while
using the setter will set the value of the storage_pool member defined in
AuditLogableBase, thus it won't affect the value of the recieved storage
pool.

In this patch I just removed the storage_pool member defined within
StorageDomainCommandBase as it's unneeded (we already have that higher
in the hierarchy) and it's getter as they are unneeded.

Change-Id: Ie4746c35e2f5c37e672e47e56314d115c6b25025
Signed-off-by: Liron Aravot <laravot@redhat.com>
engine: remove DBUser.desktopDevice

desktopDevice property was completely unused, so now it is removed

Change-Id: I0a9cdcb4893c6643ef543a2fb22cc168336e36a0
Signed-off-by: Laszlo Hornyak <lhornyak@redhat.com>
frontend: Fix findbugs method doesn't start with lower case

Fix findbugs method doesn't start with a lower case letter error in
all OnSuccess & OnFailure callbacks

Change-Id: I5ddea8d050167eaafdaf4c6b509ab048e0f3cc48
Signed-off-by: Tal Nisan <tnisan@redhat.com>
frontend: Fix findbugs method doesn't start with lower case

Fix findbugs method doesn't start with a lower case letter error in
frontend base class Model method OnPropertyChanged

Change-Id: Ie27841f37ed5324cd400523a5b80aa84d9bd7a55
Signed-off-by: Tal Nisan <tnisan@redhat.com>
frontend: Fix findbugs method doesn't start with lower case

Fix findbugs method doesn't start with a lower case letter error in
frontend EntityModel class methods OnEntityChanged, EntityChanging,
entityPropertyChanged, ValidateEntity and AsConvertible

Change-Id: I67fcaae18631cde49ede25d1a4faee6a4209bdc0
Signed-off-by: Tal Nisan <tnisan@redhat.com>
core,webadmin: Show Pools tab based on tree

Tab Pools was shown only for System node when selected
in the left tree panel.

New support for Datacenter and Cluster filtering
is available.

oVirt query language had to be extended in new syntax:

Pools: cluster = XXXX
Pools: datacenter = XXXX

Change-Id: I39c39366865ff6a62d30fab993685c72e0c39e10
Bug-Url: https://bugzilla.redhat.com/846284
Signed-off-by: Libor Spevak <lspevak@redhat.com>
webadmin: Rewrote Setup Networks operation logic

To extend the dragging capabilities in the Setup Networks dialog, the
following was done:

* Two new operations were introduced, JOIN_BONDS and
  EXTEND_BOND_WITH. Other null operations were added to better explain
  to the user what it is that went wrong.

* Completely rewrote the operationFor() method of
  NetworkOperationFactory. The main flow is now validation-oriented
  rather than operand-type-oriented, which enables to reuse the
  validation logic which is common to most operations (regardless of the
  operand type). Operand types are only checked secondarily, to know
  which specific operation to return once a network configuration is
  rendered valid/invalid.

* In order to better advise the user how to fix invalid network
  configurations when joining two NICs, the name of the network at fault
  is now saved in the NetworkInterfaceModel during the validity check,
  and later extracted using the getMessage() method of
  NetworkOperation. It's ugly but it works.

* Beautification: Standardized operation naming, error message naming,
  spacing in NetworkOperation enum.

* Changed some logic in HostSetupNetworksModel, specifically to enable
  reattaching all networks (of all NICs taking part in the bond
  operation) to a newly-created bond and to take special care of the new
  bond join operation.

* Changed some code in bond views to adjoin custom bond definition to
  the text in the list box, so that a user may differentiate between
  different custom bond options (if they exist).

Change-Id: Iea5793221d295fa0bd73fc1ed988c90df8fee7c8
Bug-Url: https://bugzilla.redhat.com/825801
Signed-off-by: Lior Vernia <lvernia@redhat.com>
webadmin: Compilation problem fixed

Missing symbol error fixed.

Change-Id: I3e88e29e74ee5978036da2e07a7d4873d8a0e00c
Signed-off-by: Libor Spevak <lspevak@redhat.com>
webadmin: Removed setBootProtocol() from Bond models

Was redundant, field was set as not available in superclass.

Change-Id: Ifc2207aad9034033efab56a0a8f98dfdc582f5c4
Signed-off-by: Lior Vernia <lvernia@redhat.com>
frontend: Fix findbugs method doesn't start with lower case

Fix findbugs method doesn't start with a lower case letter error in
frontend ListModel class methods OnSelectedItemChanging,
OnSelectedItemChanged, SelectedItemsChanged, SelectedItemsChanging,
SelectedItemPropertyChanged, ItemPropertyChanged

Change-Id: If62a800faa093253a336ef181f6c5af4d873769b
Signed-off-by: Tal Nisan <tnisan@redhat.com>
frontend: Fix findbugs method doesn't start with lower case

Fix findbugs method doesn't start with a lower case letter error in
frontend SearchableListModel class methods Search, AsyncSearch,
SyncSearch

Change-Id: Ibf8aff3c66801c9c64856ccdbceeee48203628d0
Signed-off-by: Tal Nisan <tnisan@redhat.com>
frontend: Fix findbugs method doesn't start with lower case

Fix findbugs method doesn't start with a lower case letter error in
frontend ListWithDetailsModel class methods InitDetailModels,
UpdateDetailsAvailability, ActiveDetailModelChanging,
ActiveDetailModelChanged, ProvideDetailModelEntity

Change-Id: I2996c077fc487d0cf300ca6cbd9defe6b85fee95
Signed-off-by: Tal Nisan <tnisan@redhat.com>