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

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

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>
Update mockmodel imports

There are some methods from model used in mockmodel.py
Adjust imports to get the methods from new model implementation.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Delete former model.py and rename model_ to model

model.py can be deleted as all resources have their own model
implementations
Also rename model_ to model

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