client/shared/distro_def.py: added new module

This module defines a structure and portable format for storing
relevant information on Linux Distributions.

The main goal is to be able to create a knowledge base of Linux
Distributions, either to be added to an official archive, or
created by local users.

This information will be used by the component isolation feature
to record differences on the systems running tests against the
distro official characteristics.

Changes from v1:
   * whitespace cleanup

Signed-off-by: Cleber Rosa <crosa@redhat.com>
client: autotest distro def utilities

These two scripts allows one to create and view distro definition
files. To create a new distro definition file one must have local
access to the distro installation tree. All package files will be
queried for the needed information.

Once the distro file is created, it can be loaded into any autotest
server.

Changes from v1:
   * replace raising exception by calling sys.exit()

Signed-off-by: Cleber Rosa <crosa@redhat.com>
removed the extra run of syncdb

Signed-off-by: Cleber Rosa <crosa@redhat.com>
frontend: move the model unittest utility module a level up

Because we want to use it also on the TKO models so a common
location makes more sense. Also renamed it stripping the frontend_
name, since the parent module is already named like that.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
frontend: add unittest for TKO models

This first unit test covers the scenario where a single iteration
attribute is added, and thus, passes.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
component isolation: introduce models and database schema

The so called component isolation feature needs to keep track of
more information than we usually do with the AFE/TKO models.

I've decided to loose the afe_ and tko_ suffixes on the database
tables because there's a trend towards uniting the database. Also,
the component isolation deals with some aspects and models on both
AFE and TKO, so it doesn't make sense to pick a side.

If you have a running database, those changes should be applied with:

   $ cd AUTOTEST_ROOT/frontend
   $ ./manage.py migrate afe
   $ ./manage.py migrate tko

If you're creating a database from scratch, no extra step is needed.

This also preloads the database with "unknown" entries.

The unknown distro will be used either when the test does not
register or is able to detect the linux distro it's running on.

The unknown software kind and arch are also used as fallbacks
when not properly recorded.

Changes from v1:
   * add usage info on software kind name field
   * new line clean up on auto generated migration file

Signed-off-by: Cleber Rosa <crosa@redhat.com>
autotest-distro-def-load: add utility scripts

This scripts allows a user to load a distro definition file into
the autotest server database.

Signed-off-by: Cleber Rosa <crosa@redhat.com>