Source:
<code>protected boolean canDoAction() { if (!validate(new StoragePoolValidator(getStoragePool()).isUp())) { return false; } if (getParameters().getImportAsTemplate()) { if (getParameters().getClusterId() == null) { addCanDoActionMessage(VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID); return false; } setVdsGroupId(getParameters().getClusterId()); if (getVdsGroup() == null) { addCanDoActionMessage(VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID); return false; } if (getVdsGroup().getArchitecture() == ArchitectureType.undefined) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_UNDEFINED_ARCHITECTURE); } setStoragePoolId(getParameters().getStoragePoolId()); <START> if (getStoragePool().getcompatibility_version().compareTo(Version.v3_4) < 0) { <END> return failCanDoAction(VdcBllMessages.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL); } } DiskImage diskImage = null; try { diskImage = getDiskImage(); } catch (OpenStackImageException e) { log.errorFormat("Unable to get the disk image from the provider proxy: {0} ({1})", e.getMessage(), e.getErrorType()); switch (e.getErrorType()) { case UNSUPPORTED_CONTAINER_FORMAT: case UNSUPPORTED_DISK_FORMAT: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_NOT_SUPPORTED); case UNABLE_TO_DOWNLOAD_IMAGE: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_DOWNLOAD_ERROR); case UNRECOGNIZED_IMAGE_FORMAT: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_UNRECOGNIZED); } } if (diskImage == null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST); } return true; }</code><technical_language>Apparently infrastructure for this, FeatureSupported (iirc)</technical_language>

Target:
protected boolean canDoAction() { if (!validate(new StoragePoolValidator(getStoragePool()).isUp())) { return false; } if (getParameters().getImportAsTemplate()) { if (getParameters().getClusterId() == null) { addCanDoActionMessage(VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID); return false; } setVdsGroupId(getParameters().getClusterId()); if (getVdsGroup() == null) { addCanDoActionMessage(VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID); return false; } if (getVdsGroup().getArchitecture() == ArchitectureType.undefined) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_UNDEFINED_ARCHITECTURE); } setStoragePoolId(getParameters().getStoragePoolId()); if (!FeatureSupported.importGlanceImageAsTemplate(getStoragePool().getcompatibility_version())) { return failCanDoAction(VdcBllMessages.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL); } } DiskImage diskImage = null; try { diskImage = getDiskImage(); } catch (OpenStackImageException e) { log.errorFormat("Unable to get the disk image from the provider proxy: {0} ({1})", e.getMessage(), e.getErrorType()); switch (e.getErrorType()) { case UNSUPPORTED_CONTAINER_FORMAT: case UNSUPPORTED_DISK_FORMAT: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_NOT_SUPPORTED); case UNABLE_TO_DOWNLOAD_IMAGE: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_DOWNLOAD_ERROR); case UNRECOGNIZED_IMAGE_FORMAT: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_UNRECOGNIZED); } } if (diskImage == null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST); } return true; }