refactor model: Create a separated model for task resource

To avoid duplicating code in model and mockmodel, the common code related to
task resource was added to model_/tasks.py and the specific code for each
backend (libvirt or mock) was added to model_/libvirtbackend.py and
model_/mockbackend.py
The model_ module is a temporary one, as there already is a module named model
in source code.
When start using the new code, model_ will be renamed to model and the former
model.py deleted.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for debugreport resource

To avoid duplicating code in model and mockmodel, the common code related to
debugreport resource was added to model_/debugreports.py and the specific code
for each backend (libvirt or mock) was added to model_/libvirtbackend.py and
model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for config resource

To avoid duplicating code in model and mockmodel, the common code related to
config resource (and its sub-resources) was added to model_/config.py
and the specific code for each backend (libvirt or mock) was added to
model_/libvirtbackend.py and model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for host resource

To avoid duplicating code in model and mockmodel, the common code related to
host resource (and its sub-resources) was added to model_/host.py and
the specific code for each backend (libvirt or mock) was added to
model_/libvirtbackend.py and model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for plugin resource

To avoid duplicating code in model and mockmodel, the code related to
plugin resource was added to model_/plugins.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for libvirt connection

Libvirt connection is a base facility for kimchi model, so each
resource model should be able to access it directly.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Move StoragePooldef from model to libvirtstoragepools.py

Separate StoragePoolDef from model as it handles the xml generation for
libvirt storage pools.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for storagepool resource

To avoid duplicating code in model and mockmodel, the code related to
storagepool resource was added to model_/storagepools.py and
the specific code for each backend (libvirt or mock) was added to
model_/libvirtbackend.py and model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for storagevolume resource

To avoid duplicating code in model and mockmodel, the code related to
storagevolume resource was added to model_/storagevolumes.py and
the specific code for each backend (libvirt or mock) was added to
model_/libvirtbackend.py and model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
bug fix: Allow user specify a subnet when creating a network

Kimchi allows user to specify a subnet when creating a network by the 'subnet'
parameter but the backend was checking the 'net' parameter to create the
libvirt xml.
Because that the user got the following error:

Fix it.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for interface and network resources

To avoid duplicating code in model and mockmodel, the code to interface
resource was added to model_/interfaces.py.

And the code related to network resource was added to model_/networks.py and
the specific code for each backend (libvirt or mock) was added to
model_/libvirtbackend.py and model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for template resource

To avoid duplicating code in model and mockmodel, the code related to
template resource was added to model_/templates.py and
the specific code for each backend (libvirt or mock) was added to
model_/libvirtbackend.py and model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Create a separated model for vm resource

To avoid duplicating code in model and mockmodel, the code related to
vm resource was added to model_/vms.py and the specific code for each
backend (libvirt or mock) was added to model_/libvirtbackend.py and
model_/mockbackend.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor model: Update server.py and root.py to use new models

Also remove former model.py and mockmodel.py files.
And rename model_ to model

Signed-off-by: Aline Manera <alinefm@br.ibm.com>