 select fn_db_add_config_value('HostPreparingForMaintenanceIdleTime', '300', 'general');
 select fn_db_add_config_value('HostTimeDriftInSec','300','general');
 select fn_db_add_config_value('HotPlugEnabled','false','3.0');
-select fn_db_add_config_value('HotPlugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.0');
-select fn_db_add_config_value('HotPlugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.1');
-select fn_db_add_config_value('HotPlugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.2');
-select fn_db_add_config_value('HotPlugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.3');
-select fn_db_add_config_value('HotPlugCpuSupported','{"x86_64":"true","ppc64":"false"}','3.4');
-select fn_db_add_config_value('HotPlugCpuSupported','{"x86_64":"true","ppc64":"false"}','3.5');
-select fn_db_add_config_value('HotUnplugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.0');
-select fn_db_add_config_value('HotUnplugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.1');
-select fn_db_add_config_value('HotUnplugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.2');
-select fn_db_add_config_value('HotUnplugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.3');
-select fn_db_add_config_value('HotUnplugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.4');
-select fn_db_add_config_value('HotUnplugCpuSupported','{"x86_64":"false","ppc64":"false"}','3.5');
+select fn_db_add_config_value_for_versions_up_to('HotPlugCpuSupported', '{"x86_64":"false","ppc64":"false"}', '3.3');
+select fn_db_add_config_value_for_versions_up_to('HotPlugCpuSupported', '{"x86_64":"true","ppc64":"false"}', '3.5');
+select fn_db_add_config_value_for_versions_up_to('HotUnplugCpuSupported', '{"x86_64":"false","ppc64":"false"}', '3.5');
 -- migration support per architecture
 select fn_db_add_config_value('IsMigrationSupported','{"undefined": "true", "x86_64": "true", "ppc64" : "true" }','general');
 -- snapshot support per architecture
 select fn_db_add_config_value('IsMemorySnapshotSupported','{"undefined": "true", "x86_64": "true", "ppc64" : "true" }','general');
 -- suspend support per architecture
 select fn_db_add_config_value('IsSuspendSupported','{"undefined": "true", "x86_64": "true", "ppc64" : "true" }','general');
-select fn_db_add_config_value('MigrationSupportForNativeUsb','false','3.0');
-select fn_db_add_config_value('MigrationSupportForNativeUsb','false','3.1');
-select fn_db_add_config_value('NetworkLinkingSupported','false','3.0');
-select fn_db_add_config_value('NetworkLinkingSupported','false','3.1');
+select fn_db_add_config_value_for_versions_up_to('MigrationSupportForNativeUsb', 'false', '3.1');
+select fn_db_add_config_value_for_versions_up_to('NetworkLinkingSupported', 'false', '3.1');
 select fn_db_add_config_value('DisconnectPoolOnReconstruct','0,2','general');
 select fn_db_add_config_value('InitStorageSparseSizeInGB','1','general');
-select fn_db_add_config_value('TunnelMigrationEnabled','false','3.0');
-select fn_db_add_config_value('TunnelMigrationEnabled','false','3.1');
-select fn_db_add_config_value('TunnelMigrationEnabled','false','3.2');
-select fn_db_add_config_value('MigrationNetworkEnabled','false','3.0');
-select fn_db_add_config_value('MigrationNetworkEnabled','false','3.1');
-select fn_db_add_config_value('MigrationNetworkEnabled','false','3.2');
-select fn_db_add_config_value('MultipleGatewaysSupported','false','3.0');
-select fn_db_add_config_value('MultipleGatewaysSupported','false','3.1');
-select fn_db_add_config_value('MultipleGatewaysSupported','false','3.2');
-select fn_db_add_config_value('MemorySnapshotSupported','false','3.0');
-select fn_db_add_config_value('MemorySnapshotSupported','false','3.1');
-select fn_db_add_config_value('MemorySnapshotSupported','false','3.2');
+select fn_db_add_config_value_for_versions_up_to('TunnelMigrationEnabled', 'false', '3.2');
+select fn_db_add_config_value_for_versions_up_to('MigrationNetworkEnabled', 'false', '3.2');
+select fn_db_add_config_value_for_versions_up_to('MultipleGatewaysSupported', 'false', '3.2');
+select fn_db_add_config_value_for_versions_up_to('MemorySnapshotSupported', 'false', '3.2');
 select fn_db_add_config_value('OsRepositoryConfDir','/osinfo.conf.d','general');
-select fn_db_add_config_value('VirtIoScsiEnabled','false','3.0');
-select fn_db_add_config_value('VirtIoScsiEnabled','false','3.1');
-select fn_db_add_config_value('VirtIoScsiEnabled','false','3.2');
-select fn_db_add_config_value('NormalizedMgmtNetworkEnabled','false','3.0');
-select fn_db_add_config_value('NormalizedMgmtNetworkEnabled','false','3.1');
-select fn_db_add_config_value('NormalizedMgmtNetworkEnabled','false','3.2');
+select fn_db_add_config_value_for_versions_up_to('VirtIoScsiEnabled', 'false', '3.2');
+select fn_db_add_config_value_for_versions_up_to('NormalizedMgmtNetworkEnabled', 'false', '3.2');
 select fn_db_add_config_value('IterationsWithBalloonProblem','3','general');
-select fn_db_add_config_value('MomPoliciesOnHostSupported','false','3.0');
-select fn_db_add_config_value('MomPoliciesOnHostSupported','false','3.1');
-select fn_db_add_config_value('MomPoliciesOnHostSupported','false','3.2');
-select fn_db_add_config_value('NetworkQosSupported','false','3.0');
-select fn_db_add_config_value('NetworkQosSupported','false','3.1');
-select fn_db_add_config_value('NetworkQosSupported','false','3.2');
-select fn_db_add_config_value('StorageQosSupported','false','3.0');
-select fn_db_add_config_value('StorageQosSupported','false','3.1');
-select fn_db_add_config_value('StorageQosSupported','false','3.2');
-select fn_db_add_config_value('StorageQosSupported','false','3.3');
-select fn_db_add_config_value('StorageQosSupported','false','3.4');
-select fn_db_add_config_value('CpuQosSupported','false','3.0');
-select fn_db_add_config_value('CpuQosSupported','false','3.1');
-select fn_db_add_config_value('CpuQosSupported','false','3.2');
-select fn_db_add_config_value('CpuQosSupported','false','3.3');
-select fn_db_add_config_value('CpuQosSupported','false','3.4');
-select fn_db_add_config_value('HostNetworkQosSupported', 'false', '3.0');
-select fn_db_add_config_value('HostNetworkQosSupported', 'false', '3.1');
-select fn_db_add_config_value('HostNetworkQosSupported', 'false', '3.2');
-select fn_db_add_config_value('HostNetworkQosSupported', 'false', '3.3');
-select fn_db_add_config_value('HostNetworkQosSupported', 'false', '3.4');
-select fn_db_add_config_value('HostNetworkQosSupported', 'false', '3.5');
-select fn_db_add_config_value('CloudInitSupported','false','3.0');
-select fn_db_add_config_value('CloudInitSupported','false','3.1');
-select fn_db_add_config_value('CloudInitSupported','false','3.2');
+select fn_db_add_config_value_for_versions_up_to('MomPoliciesOnHostSupported', 'false', '3.2');
+select fn_db_add_config_value_for_versions_up_to('NetworkQosSupported', 'false', '3.2');
+select fn_db_add_config_value_for_versions_up_to('StorageQosSupported', 'false', '3.4');
+select fn_db_add_config_value_for_versions_up_to('CpuQosSupported', 'false', '3.4');
+select fn_db_add_config_value_for_versions_up_to('HostNetworkQosSupported', 'false', '3.5');
+select fn_db_add_config_value_for_versions_up_to('CloudInitSupported', 'false', '3.2');
 select fn_db_add_config_value('DefaultSysprepLocale','en_US','general');
-select fn_db_add_config_value('ImportGlanceImageAsTemplate','false','3.0');
-select fn_db_add_config_value('ImportGlanceImageAsTemplate','false','3.1');
-select fn_db_add_config_value('ImportGlanceImageAsTemplate','false','3.2');
-select fn_db_add_config_value('ImportGlanceImageAsTemplate','false','3.3');
-select fn_db_add_config_value('HotPlugDiskSnapshotSupported','false','3.0');
-select fn_db_add_config_value('HotPlugDiskSnapshotSupported','false','3.1');
-select fn_db_add_config_value('HotPlugDiskSnapshotSupported','false','3.2');
-select fn_db_add_config_value('GetFileStats','false','3.0');
-select fn_db_add_config_value('GetFileStats','false','3.1');
-select fn_db_add_config_value('GetFileStats','false','3.2');
-select fn_db_add_config_value('GetFileStats','false','3.3');
-select fn_db_add_config_value('DefaultRouteSupported','false','3.0');
-select fn_db_add_config_value('DefaultRouteSupported','false','3.1');
-select fn_db_add_config_value('DefaultRouteSupported','false','3.2');
-select fn_db_add_config_value('DefaultRouteSupported','false','3.3');
-select fn_db_add_config_value('SerialNumberPolicySupported','false','3.0');
-select fn_db_add_config_value('SerialNumberPolicySupported','false','3.1');
-select fn_db_add_config_value('SerialNumberPolicySupported','false','3.2');
-select fn_db_add_config_value('SerialNumberPolicySupported','false','3.3');
-select fn_db_add_config_value('SerialNumberPolicySupported','false','3.4');
-
-select fn_db_add_config_value('OvfStoreOnAnyDomain','false','3.0');
-select fn_db_add_config_value('OvfStoreOnAnyDomain','false','3.1');
-select fn_db_add_config_value('OvfStoreOnAnyDomain','false','3.2');
-select fn_db_add_config_value('OvfStoreOnAnyDomain','false','3.3');
-select fn_db_add_config_value('OvfStoreOnAnyDomain','false','3.4');
-select fn_db_add_config_value('BootMenuSupported','false','3.0');
-select fn_db_add_config_value('BootMenuSupported','false','3.1');
-select fn_db_add_config_value('BootMenuSupported','false','3.2');
-select fn_db_add_config_value('BootMenuSupported','false','3.3');
-select fn_db_add_config_value('BootMenuSupported','false','3.4');
-
-select fn_db_add_config_value('IscsiMultipathingSupported','false','3.0');
-select fn_db_add_config_value('IscsiMultipathingSupported','false','3.1');
-select fn_db_add_config_value('IscsiMultipathingSupported','false','3.2');
-select fn_db_add_config_value('IscsiMultipathingSupported','false','3.3');
-
-select fn_db_add_config_value('ImportDataStorageDomain','false','3.0');
-select fn_db_add_config_value('ImportDataStorageDomain','false','3.1');
-select fn_db_add_config_value('ImportDataStorageDomain','false','3.2');
-select fn_db_add_config_value('ImportDataStorageDomain','false','3.3');
-select fn_db_add_config_value('ImportDataStorageDomain','false','3.4');
+select fn_db_add_config_value_for_versions_up_to('ImportGlanceImageAsTemplate', 'false', '3.3');
+select fn_db_add_config_value_for_versions_up_to('HotPlugDiskSnapshotSupported', 'false', '3.2');
+select fn_db_add_config_value_for_versions_up_to('GetFileStats', 'false', '3.3');
+select fn_db_add_config_value_for_versions_up_to('DefaultRouteSupported', 'false', '3.3');
+select fn_db_add_config_value_for_versions_up_to('SerialNumberPolicySupported', 'false', '3.4');
+
+select fn_db_add_config_value_for_versions_up_to('OvfStoreOnAnyDomain', 'false', '3.4');
+select fn_db_add_config_value_for_versions_up_to('BootMenuSupported', 'false', '3.4');
+
+select fn_db_add_config_value_for_versions_up_to('IscsiMultipathingSupported', 'false', '3.3');
+
+select fn_db_add_config_value_for_versions_up_to('ImportDataStorageDomain', 'false', '3.4');
 
 -- Mixed domain types in a data center support
-select fn_db_add_config_value('MixedDomainTypesInDataCenter','false','3.0');
-select fn_db_add_config_value('MixedDomainTypesInDataCenter','false','3.1');
-select fn_db_add_config_value('MixedDomainTypesInDataCenter','false','3.2');
-select fn_db_add_config_value('MixedDomainTypesInDataCenter','false','3.3');
-select fn_db_add_config_value('MixedDomainTypesInDataCenter','true','3.4');
-select fn_db_add_config_value('MixedDomainTypesInDataCenter','true','3.5');
+select fn_db_add_config_value_for_versions_up_to('MixedDomainTypesInDataCenter', 'false', '3.3');
 
 -- default requirement for rng sources (comma-separated string of 'RANDOM' and 'HWRNG')
-select fn_db_add_config_value('ClusterRequiredRngSourcesDefault','','3.0');
-select fn_db_add_config_value('ClusterRequiredRngSourcesDefault','','3.1');
-select fn_db_add_config_value('ClusterRequiredRngSourcesDefault','','3.2');
-select fn_db_add_config_value('ClusterRequiredRngSourcesDefault','','3.3');
-select fn_db_add_config_value('ClusterRequiredRngSourcesDefault','','3.4');
-select fn_db_add_config_value('ClusterRequiredRngSourcesDefault','','3.5');
-
-select fn_db_add_config_value('SpiceCopyPasteToggleSupported','false','3.0');
-select fn_db_add_config_value('SpiceCopyPasteToggleSupported','false','3.1');
-select fn_db_add_config_value('SpiceCopyPasteToggleSupported','false','3.2');
-select fn_db_add_config_value('SpiceCopyPasteToggleSupported','false','3.3');
-select fn_db_add_config_value('SpiceCopyPasteToggleSupported','false','3.4');
-
-select fn_db_add_config_value('SpiceFileTransferToggleSupported','false','3.0');
-select fn_db_add_config_value('SpiceFileTransferToggleSupported','false','3.1');
-select fn_db_add_config_value('SpiceFileTransferToggleSupported','false','3.2');
-select fn_db_add_config_value('SpiceFileTransferToggleSupported','false','3.3');
-select fn_db_add_config_value('SpiceFileTransferToggleSupported','false','3.4');
-select fn_db_add_config_value('SpiceFileTransferToggleSupported','false','3.5');
-
-select fn_db_add_config_value('StoragePoolMemoryBackend','false','3.0');
-select fn_db_add_config_value('StoragePoolMemoryBackend','false','3.1');
-select fn_db_add_config_value('StoragePoolMemoryBackend','false','3.2');
-select fn_db_add_config_value('StoragePoolMemoryBackend','false','3.3');
-select fn_db_add_config_value('StoragePoolMemoryBackend','false','3.4');
-
-select fn_db_add_config_value('JsonProtocolSupported','false','3.0');
-select fn_db_add_config_value('JsonProtocolSupported','false','3.1');
-select fn_db_add_config_value('JsonProtocolSupported','false','3.2');
-select fn_db_add_config_value('JsonProtocolSupported','false','3.3');
-select fn_db_add_config_value('JsonProtocolSupported','false','3.4');
-
-select fn_db_add_config_value('VmSlaPolicySupported','false','3.0');
-select fn_db_add_config_value('VmSlaPolicySupported','false','3.1');
-select fn_db_add_config_value('VmSlaPolicySupported','false','3.2');
-select fn_db_add_config_value('VmSlaPolicySupported','false','3.3');
-select fn_db_add_config_value('VmSlaPolicySupported','false','3.4');
-
-select fn_db_add_config_value('ReportedDisksLogicalNames','false','3.0');
-select fn_db_add_config_value('ReportedDisksLogicalNames','false','3.1');
-select fn_db_add_config_value('ReportedDisksLogicalNames','false','3.2');
-select fn_db_add_config_value('ReportedDisksLogicalNames','false','3.3');
-select fn_db_add_config_value('ReportedDisksLogicalNames','false','3.4');
+select fn_db_add_config_value_for_versions_up_to('ClusterRequiredRngSourcesDefault', '', '3.5');
+
+select fn_db_add_config_value_for_versions_up_to('SpiceCopyPasteToggleSupported', 'false', '3.4');
+
+select fn_db_add_config_value_for_versions_up_to('SpiceFileTransferToggleSupported', 'false', '3.5');
+select fn_db_add_config_value_for_versions_up_to('StoragePoolMemoryBackend', 'false', '3.4');
+
+select fn_db_add_config_value_for_versions_up_to('JsonProtocolSupported', 'false', '3.4');
+select fn_db_add_config_value_for_versions_up_to('VmSlaPolicySupported', 'false', '3.4');
+
+select fn_db_add_config_value_for_versions_up_to('ReportedDisksLogicalNames', 'false', '3.4');
 
 select fn_db_add_config_value('AutoConvergenceSupported','false','3.0');
 select fn_db_add_config_value('AutoConvergenceSupported','false','3.1');

select fn_db_add_config_value('ClusterEmulatedMachines','rhel6.3.0,pc-1.0','3.1');
select fn_db_add_config_value('ClusterEmulatedMachines','rhel6.4.0,pc-1.0','3.2');
select fn_db_add_config_value('ClusterEmulatedMachines','rhel6.4.0,pc-1.0,pseries','3.3');
select fn_db_add_config_value('ClusterEmulatedMachines','rhel6.5.0,pc-1.0,pseries','3.4');
select fn_db_add_config_value('ClusterEmulatedMachines','rhel6.5.0,pc-1.0,pseries','3.5');
select fn_db_add_config_value('CpuOverCommitDurationMinutes','2','general');
--Handling Data directory for ENGINE
select fn_db_add_config_value('DataDir','/usr/share/engine','general');

select fn_db_add_config_value('MaxLDAPQueryPartsNumber','100','general');
select fn_db_add_config_value('MaxMacsCountInPool','100000','general');
select fn_db_add_config_value('MaxNumberOfHostsInStoragePool','250','general');
select fn_db_add_config_value_for_versions_up_to('MaxNumOfCpuPerSocket', '16', '3.5');
select fn_db_add_config_value('MaxNumOfVmCpus','64','3.0');
select fn_db_add_config_value_for_versions_up_to('MaxNumOfVmCpus', '160', '3.5');
select fn_db_add_config_value_for_versions_up_to('MaxNumOfVmSockets', '16', '3.5');
select fn_db_add_config_value('MaxRerunVmOnVdsCount','3','general');
select fn_db_add_config_value('MaxStorageVdsDelayCheckSec','5','general');
select fn_db_add_config_value('MaxStorageVdsTimeoutCheckSec','30','general');
