function* checkOvirtApiVersion (oVirtMeta) {
  if (!(oVirtMeta &&
        oVirtMeta['product_info'] &&
        oVirtMeta['product_info']['version'] &&
        oVirtMeta['product_info']['version']['major'] &&
        oVirtMeta['product_info']['version']['minor'])) {
    console.error('Incompatible oVirt API version: ', oVirtMeta)
    yield put(setOvirtApiVersion({ passed: false, ...oVirtMeta }))
    return false
  }

  const actual = oVirtMeta['product_info']['version']
  const required = Product.ovirtApiVersionRequired
  const passed = compareVersion(actual, required)

  yield put(setOvirtApiVersion({ passed, ...actual }))
  return passed
}
/**
 * Verify the API meta-data has version information available and that the version
 * is compatible with our expected API version.
 */
Verify the API meta-data has version information available and that the version
is compatible with our expected API version.
Verify the API meta - data has version information available and that the version is compatible with our expected API version .
function* checkOvirtApiVersion (oVirtMeta) {
  if (!(oVirtMeta &&
        oVirtMeta['product_info'] &&
        oVirtMeta['product_info']['version'] &&
        oVirtMeta['product_info']['version']['major'] &&
        oVirtMeta['product_info']['version']['minor'])) {
    console.error('Incompatible oVirt API version: ', oVirtMeta)
    yield put(setOvirtApiVersion({ passed: false, ...oVirtMeta }))
    return false
  }
  const actual = oVirtMeta['product_info']['version']
  const required = Product.ovirtApiVersionRequired
  const passed = compareVersion(actual, required)
  yield put(setOvirtApiVersion({ passed, ...actual }))
  return passed
}
function * checkOvirtApiVersion ( oVirtMeta ) { if ( ! ( oVirtMeta && oVirtMeta [ 'product_info' ] && oVirtMeta [ 'product_info' ] [ 'version' ] && oVirtMeta [ 'product_info' ] [ 'version' ] [ 'major' ] && oVirtMeta [ 'product_info' ] [ 'version' ] [ 'minor' ] ) ) { console . error ( 'Incompatible oVirt API version: ' , oVirtMeta ) yield put ( setOvirtApiVersion ( { passed : false , ... oVirtMeta } ) ) return false } const actual = oVirtMeta [ 'product_info' ] [ 'version' ] const required = Product . ovirtApiVersionRequired const passed = compareVersion ( actual , required ) yield put ( setOvirtApiVersion ( { passed , ... actual } ) ) return passed }
Verify the API meta-data has version information available and that the version
 is compatible with our expected API version.
Verify the API meta - data has version information available and that the version is compatible with our expected API version .