Example #1
0
// For testing purpose
func MultiQueueSupportedMock(kernelVersion, libvirtVersion string, sshconfig *ssh.Config) (bool, error) {
	c := sysinfo.NewCollector(sshconfig)
	if c.KernelMajorMinorEqualOrGreaterThan(kernelVersion) {
		d := envdriver.NewDriver(sshconfig)
		curVersion, err := d.Version()
		if err != nil {
			return false, err
		}
		if curVersion >= libvirtVersion {
			return true, nil
		}
	}
	return false, nil
}
Example #2
0
func MultiQueueSupported(sshconfig *ssh.Config) (bool, error) {
	c := sysinfo.NewCollector(sshconfig)
	if c.KernelMajorMinorEqualOrGreaterThan(multiQueueKernelVersion) {
		d := envdriver.NewDriver(sshconfig)
		curVersion, err := d.Version()
		if err != nil {
			return false, utils.FormatError(err)
		}
		if curVersion >= multiQueueLibvirtVersion {
			return true, nil
		}
	}
	return false, nil
}