clh: Implement check()

Implement check hypervisor interface method, using VmmPing

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
Jose Carlos Venegas Munoz 2019-11-29 17:31:49 +00:00
parent a10da3efbf
commit 60102188cd

View File

@ -407,7 +407,12 @@ func (clh *cloudHypervisor) load(s persistapi.HypervisorState) {
}
func (clh *cloudHypervisor) check() error {
return nil
cl := clh.client()
ctx, cancel := context.WithTimeout(context.Background(), clhApiTimeout*time.Second)
defer cancel()
_, _, err := cl.VmmPingGet(ctx)
return err
}
func (clh *cloudHypervisor) getPids() []int {