mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-06 03:56:34 +00:00
hypervisor: Add hypervisor interface to return config
This api will allow the config to be accessed by other subsystems such as network. Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
parent
a5f05bf3e1
commit
2f552fbf43
@ -560,4 +560,5 @@ type hypervisor interface {
|
||||
getSandboxConsole(sandboxID string) (string, error)
|
||||
disconnect()
|
||||
capabilities() capabilities
|
||||
hypervisorConfig() HypervisorConfig
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ func (m *mockHypervisor) capabilities() capabilities {
|
||||
return capabilities{}
|
||||
}
|
||||
|
||||
func (m *mockHypervisor) hypervisorConfig() HypervisorConfig {
|
||||
return HypervisorConfig{}
|
||||
}
|
||||
|
||||
func (m *mockHypervisor) createSandbox() error {
|
||||
return nil
|
||||
}
|
||||
|
@ -160,6 +160,10 @@ func (q *qemu) capabilities() capabilities {
|
||||
return q.arch.capabilities()
|
||||
}
|
||||
|
||||
func (q *qemu) hypervisorConfig() HypervisorConfig {
|
||||
return q.config
|
||||
}
|
||||
|
||||
// get the QEMU binary path
|
||||
func (q *qemu) qemuPath() (string, error) {
|
||||
p, err := q.config.HypervisorAssetPath()
|
||||
|
Loading…
Reference in New Issue
Block a user