unittest_suite: fix --skip-tests

skip-tests current fails to run correctly, because the list type has no
"update" method. Change it to just a straight assignemnt.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
unittest_suite: match skipped tests by name not file name

Strip off .py from the possible filename to see if it needs to be
skipped. It seems rather user-unfriendly to require the user to know to
add the suffix, especially when the output doesn't include it.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
kernelexpand_unittest: override local configuration

If an end-user has configured a local gitweb source or kernel mirrors,
this can lead to the unittest failing, because the tests assume the
settings are the default ones (for comparison to the expected results).
Fix this by overriding the settings values with the default ones.
Without this change, the unittest always fails with local gitweb/mirror
configuration.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
frontend/afe: fix sort when metahosts are selected

When we sort by a column in the selected table, we assume the objects in
the table have certain properties. However, the meta-host objects have
the wrong names for those properties.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
afe/HostSelector: add "id" to metaObjects

A following change will rely on all objects in the selectedHostData to
have an "id" property to guarantee a way to identify them when rows are
clicked.  Meta-host objects don't have one, so add one that starts
(effectively) at -1 and decrements. This should avoid collisions with
the actual host objects, which all have positive ids.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
frontend/afe: fix bug with profile selection in create job

There is a bug in the onClick handler in SelectionManager. We assume the
row index is 1:1 with the available table objects. However, this is not
true in two cases, at least:

1) Re-sorting the table causes the "current" row to be sent in, but the
underlying object collection does not change its order.

2) When metahosts are added to the table, they are not present in the
available table.

We therefore end up altering arbitrary available host row objects, which
leads to eventual errors in execution.

To fix this, associated the "id" of the underlying row object with the
widget, and notify listeners onClick that a given "id" has been updated
to a given "profile". Add an implementation of the onClick handler in
HostSelector that updates the selectedHostData, looked-up by that "id".
Stop modifying the SelectionManager's row objects, which represent the
available table's rows.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
frontend/afe: add support for meta-host objects to have associated profiles

Use an RPC call, just like for specific hosts, for finding all possible
profiles. We let the user shoot themselves in the foot (that is, they
might select a profile that doesn't apply to that server), but that's
the nature of selecting by label -- unless the label is a platform, we
won't be able to do the lookup anyways in the install server.

Changes from v1:
 * Fix up various parameters in the RPC interfaces to be lists rather than
   tuples.
 * Fix-up unittests to pass in lists rather than tuples.
 * Fix logging exception.
 * Fix monitor_db.py call of create_new_job.
 * Fix indentation issue.
 * Refactor code so install server is available for get_num_profiles().

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
frontend/afe: fix one-time-hosts and profile selection

Similar to meta-hosts, populate the one-time host object, but use a
"N/A" profile only, as there's no guarantee the host exists in the
install server.  Also add entries for the other fields needed for table
sorting to work.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
frontend/install_server: remove filter in profile look-up

Depending on your environment, you may not have access to Cobbler to
always manipulate the profile comments. Also, you may not want to ever
limit the user from selecting a profile, and the filtered search is
slower than just grabbing them all. So, for now, simply grab all defined
profiles.

Eventually (working on it now), we should provide an extensible way to
filter the profiles.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
control files: always reinstall hosts

Locally, I always want to reinstall hosts when I run a job. I imagine
others might also like this. Given that reinstallation depends on
profile availability (of which, "Do_not_install" and "N/A" are valid
depending on the configuration), we can just always reinstall in the
client and server control file templates.

Changes from v1:
 * Fix-up the unit-tests.
 * Adjust machine_install to no throw an exception if no install server is
   configured (just becomes a no-op)

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
migrations: Fix no newline at the end of file
database_legacy: Finish module rename

Some of the files in database_legacy refer to the libs
in that dir, with the rename the files got broken. Let's
fix it.

CC: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>