Skip to content

Commit

Permalink
Add libvirt GetJobStats and AbortJob to track and cancel live migration
Browse files Browse the repository at this point in the history
Signed-off-by: Vladik Romanovsky <[email protected]>
  • Loading branch information
vladikr committed Mar 1, 2019
1 parent 11bd420 commit 08c9724
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/virt-launcher/virtwrap/cli/generated_mock_libvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,27 @@ func (_mr *_MockVirDomainRecorder) MemoryStats(arg0, arg1 interface{}) *gomock.C
return _mr.mock.ctrl.RecordCall(_mr.mock, "MemoryStats", arg0, arg1)
}

func (_m *MockVirDomain) GetJobStats(flags libvirt_go.DomainGetJobStatsFlags) (*libvirt_go.DomainJobInfo, error) {
ret := _m.ctrl.Call(_m, "GetJobStats", flags)
ret0, _ := ret[0].(*libvirt_go.DomainJobInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}

func (_mr *_MockVirDomainRecorder) GetJobStats(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetJobStats", arg0)
}

func (_m *MockVirDomain) AbortJob() error {
ret := _m.ctrl.Call(_m, "AbortJob")
ret0, _ := ret[0].(error)
return ret0
}

func (_mr *_MockVirDomainRecorder) AbortJob() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "AbortJob")
}

func (_m *MockVirDomain) Free() error {
ret := _m.ctrl.Call(_m, "Free")
ret0, _ := ret[0].(error)
Expand Down
2 changes: 2 additions & 0 deletions pkg/virt-launcher/virtwrap/cli/libvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ type VirDomain interface {
OpenConsole(devname string, stream *libvirt.Stream, flags libvirt.DomainConsoleFlags) error
MigrateToURI3(string, *libvirt.DomainMigrateParameters, libvirt.DomainMigrateFlags) error
MemoryStats(nrStats uint32, flags uint32) ([]libvirt.DomainMemoryStat, error)
GetJobStats(flags libvirt.DomainGetJobStatsFlags) (*libvirt.DomainJobInfo, error)
AbortJob() error
Free() error
}

Expand Down

0 comments on commit 08c9724

Please sign in to comment.