Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
clh: Implement check()
Browse files Browse the repository at this point in the history
Implement check hypervisor interface method, using VmmPing

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Dec 5, 2019
1 parent a10da3e commit 6010218
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6010218

Please sign in to comment.