host cpu usage: update API.md

update API.md
Add a host Resource and a host stats sub-Resource.
get host cpu_utilization from host stats sub-Resource.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
host cpu usage: update controller

add a host Resource and host stats sub-Resource

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
host cpu usage: update model

use psutil to get cpu utilization instead of libvirt API.
psutil.cpu_percent is easier to get cpu utilization.
also set psutil.cpu_percent as non-blocking.

Add new BackgroundTask to sample the psutil.cpu_percent.
We need BackgroundTask for all host stats.

Set the sample interval is 1 second.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
host cpu usage: update mockmodel

Just get a dummy cpu utilization by random.uniform.
Not sure we should get really host cpu utilization.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
host cpu usage: update test case

update test_model and test_rest

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>