refactor model: Separate libvirtconnection from model.py

Libvirt connection is a base facility for kimchi model, so each
resource model should be able to access it directly. It can remove
the denpendency on class Model for resource models which need connect
libvirt. With this change, we can separate different resource model
classes from class Model.

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

Separate StoragePoolDef (and its sub-classes) 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 common model builder

It will be useful while splitting model and mockmodel into smaller
modules.
It will automatically map all sub-model instance methods to a BaseModel
instance.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Create a model to join all model resources implementation

That way we don't need to change tests and controller in order to use
the separated model implementations
All models will be automatically loaded into Model() which will contain
all methods needed by controller.

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

The model implementation for config and its sub-resources were added to
model_/tasks.py

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

The model implementation for config and its sub-resources were added to
model_/plugins.py

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

The model implementation for config and its sub-resources were added to
model_/debugreports.py
The idea is create a separated model implementation for each resource.

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

The model implementation for config and its sub-resources were added to
model_/config.py
It is needed to create a temporary module named model_ as there is
already a model.py in Kimchi code.
It will be rename later when removing model.py

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

The model implementation for network and its sub-resources were added to
model_/networks.py

Also add default network verification in Model() as it is not related to
network resource

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

The model implementation for config and its sub-resources were added to
model_/interfaces.py

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

The model implementation for storage pool and its sub-resources were added to
model_/storagepools.py

Also add default pool verification in Model() as it is not related to
storage pool resource

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

The model implementation for storage volume and its sub-resources were added to
model_/storagevolumes.py

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

The model implementation for storage server and its sub-resources were added to
model_/storagesevers.py

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

The model implementation for storage target and its sub-resources were added to
model_/storagetargets.py

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

The model implementation for template and its sub-resources were added to
model_/templates.py

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

The model implementation for vm and its sub-resources were added to
model_/vms.py

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

The model implementation for vm interface and its sub-resources were added to
model_/vmifaces.py

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

The model implementation for config and its sub-resources were added to
model_/host.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Update server to use the new model

Also update control/config.py to use capabilities_lookup() instead of
using the model method directly
And correct import in control/storagepools.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Update tests to use the new model

Also correct import references to model as model.py will be delete

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