Vitor de Lima has uploaded a new change for review.

Change subject: core: Add POWER 7 to the CPU list
......................................................................

core: Add POWER 7 to the CPU list

This introduces the POWER 7 to the list of supported CPUs. This also
includes an Enum (called ArchitectureType) to distinguish the
architecture of each supported processor. The ClusterEmulatedMachines
configuration value was changed to include the "pseries" emulated
machine.

Change-Id: I5d63f0c66c2499f76b122d9c5cdbb7eebfe440e8
Signed-off-by: Vitor de Lima <vitor.l...@eldorado.org.br>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CpuFlagsManagerHandler.java
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ArchitectureType.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ServerCpu.java
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/ServerCpuParser.java
M 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/util/ServerCpuParserTest.java
M 
frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
7 files changed, 198 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/53/17853/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CpuFlagsManagerHandler.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CpuFlagsManagerHandler.java
index e17589f..2d56a83 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CpuFlagsManagerHandler.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CpuFlagsManagerHandler.java
@@ -12,6 +12,7 @@
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
+import org.ovirt.engine.core.common.businessentities.ArchitectureType;
 import org.ovirt.engine.core.common.businessentities.ServerCpu;
 import org.ovirt.engine.core.common.config.Config;
 import org.ovirt.engine.core.common.config.ConfigValues;
@@ -31,6 +32,27 @@
             _managersDictionary.put(ver, new CpuFlagsManager(ver));
         }
        log.info("Finished initializing dictionaries");
+    }
+
+    public static HashMap<Version, HashMap<String, ArchitectureType>> 
GetArchitectureTable() {
+        HashMap<Version, HashMap<String, ArchitectureType>> 
versionCpuNameArchMap =
+                new HashMap<Version, HashMap<String, ArchitectureType>>();
+
+        List<Version> versions = Version.ALL;
+
+        for (Version ver : versions) {
+            List<ServerCpu> cpus = 
CpuFlagsManagerHandler.AllServerCpuList(ver);
+
+            HashMap<String, ArchitectureType> versionTable = new 
HashMap<String, ArchitectureType>();
+
+            for (ServerCpu cpu : cpus) {
+                versionTable.put(cpu.getCpuName(), cpu.getArchitecture());
+            }
+
+            versionCpuNameArchMap.put(ver, versionTable);
+        }
+
+        return versionCpuNameArchMap;
     }
 
     public static String GetVDSVerbDataByCpuName(String name, Version ver) {
@@ -115,12 +137,17 @@
     private static class CpuFlagsManager {
         private List<ServerCpu> _intelCpuList;
         private List<ServerCpu> _amdCpuList;
+        private List<ServerCpu> _ibmCpuList;
         private List<ServerCpu> _allCpuList = new ArrayList<ServerCpu>();
         private Map<String, ServerCpu> _intelCpuByNameDictionary =
                 new HashMap<String, ServerCpu>();
         private Map<String, ServerCpu> _amdCpuByNameDictionary =
                 new HashMap<String, ServerCpu>();
+        private Map<String, ServerCpu> _ibmCpuByNameDictionary =
+                new HashMap<String, ServerCpu>();
         private final String _intelFlag = "vmx";
+        private final String _amdFlag = "svm";
+        private final String _ibmFlag = "powernv";
 
         public CpuFlagsManager(Version ver) {
             InitDictionaries(ver);
@@ -130,8 +157,13 @@
             ServerCpu result = null;
             if (cpuName != null) {
                 result = _intelCpuByNameDictionary.get(cpuName);
+
                 if (result == null) {
                     result = _amdCpuByNameDictionary.get(cpuName);
+                }
+
+                if (result == null) {
+                    result = _ibmCpuByNameDictionary.get(cpuName);
                 }
             }
             return result;
@@ -142,25 +174,41 @@
             // init dictionaries
             _intelCpuByNameDictionary.clear();
             _amdCpuByNameDictionary.clear();
+            _ibmCpuByNameDictionary.clear();
             _allCpuList.clear();
 
             String[] cpus = Config.<String> 
GetValue(ConfigValues.ServerCPUList, ver.toString()).split("[;]", -1);
             for (String cpu : cpus) {
+
                 if (!StringUtils.isEmpty(cpu)) {
-                    // [0]-level, [1]-name, [2]-flags, [3]-verb
+                    // [0]-level, [1]-name, [2]-flags, [3]-verb, [4]-arch
                     final String[] info = cpu.split("[:]", -1);
-                    if (info.length == 4) {
+
+                    if (info.length == 5) {
                         // if no flags at all create new list instead of split
                         HashSet<String> flgs =
                                 (StringUtils.isEmpty(info[2])) ? new 
HashSet<String>()
                                         : new 
HashSet<String>(Arrays.asList(info[2].split("[,]", -1)));
 
-                        ServerCpu sc = new ServerCpu(info[1], 
Integer.parseInt(info[0].trim()), flgs, info[3]);
+                        String arch = info[4].trim();
+                        ArchitectureType archType = 
ArchitectureType.valueOf(arch);
+
+                        String levelString = info[0].trim();
+                        int level = 0;
+
+                        if (StringUtils.isNotEmpty(levelString)) {
+                            level = Integer.parseInt(levelString);
+                        }
+
+                        ServerCpu sc = new ServerCpu(info[1], level, flgs, 
info[3], archType);
                         if (sc.getFlags().contains(_intelFlag)) {
                             _intelCpuByNameDictionary.put(sc.getCpuName(), sc);
-                        } else {
+                        } else if (sc.getFlags().contains(_amdFlag)) {
                             _amdCpuByNameDictionary.put(sc.getCpuName(), sc);
+                        } else if (sc.getFlags().contains(_ibmFlag)) {
+                            _ibmCpuByNameDictionary.put(sc.getCpuName(), sc);
                         }
+
                         _allCpuList.add(sc);
                     } else {
                         log.errorFormat("Error getting info for CPU: {0}, not 
in expected format.", cpu);
@@ -169,6 +217,7 @@
             }
             _intelCpuList = new 
ArrayList<ServerCpu>(_intelCpuByNameDictionary.values());
             _amdCpuList = new 
ArrayList<ServerCpu>(_amdCpuByNameDictionary.values());
+            _ibmCpuList = new 
ArrayList<ServerCpu>(_ibmCpuByNameDictionary.values());
 
             Comparator<ServerCpu> cpuComparator = new Comparator<ServerCpu>() {
                 @Override
@@ -188,7 +237,8 @@
             ServerCpu sc = null;
             if (name != null) {
                 if ((sc = _intelCpuByNameDictionary.get(name)) != null
-                        || (sc = _amdCpuByNameDictionary.get(name)) != null) {
+                        || (sc = _amdCpuByNameDictionary.get(name)) != null
+                        || (sc = _ibmCpuByNameDictionary.get(name)) != null) {
                     result = sc.getVdsVerbData();
                 }
             }
@@ -219,9 +269,13 @@
                             Arrays.asList(serverFlags.split("[,]", -1)));
 
                     // check if to search in intel or amd
-                    result =
-                            (lstFlags.contains(_intelFlag)) ? 
FindServerCpuByFlags(lstFlags, clusterCpu, _intelCpuList)
-                                    : FindServerCpuByFlags(lstFlags, 
clusterCpu, _amdCpuList);
+                    if (lstFlags.contains(_intelFlag)) {
+                        result = FindServerCpuByFlags(lstFlags, clusterCpu, 
_intelCpuList);
+                    } else if (lstFlags.contains(_amdFlag)) {
+                        result = FindServerCpuByFlags(lstFlags, clusterCpu, 
_amdCpuList);
+                    } else if (lstFlags.contains(_ibmFlag)) {
+                        result = FindServerCpuByFlags(lstFlags, clusterCpu, 
_ibmCpuList);
+                    }
                 }
             }
             return result;
@@ -274,9 +328,10 @@
 
             // first find cluster cpu
             if (clusterCpuName != null
-                    && ((clusterCpu = 
_intelCpuByNameDictionary.get(clusterCpuName)) != null || (clusterCpu =
-                            _amdCpuByNameDictionary
-                                    .get(clusterCpuName)) != null)) {
+                    && ((clusterCpu = 
_intelCpuByNameDictionary.get(clusterCpuName)) != null
+                            || (clusterCpu = 
_amdCpuByNameDictionary.get(clusterCpuName)) != null
+                            || (clusterCpu = 
_ibmCpuByNameDictionary.get(clusterCpuName)) != null
+                    )) {
                 for (String flag : clusterCpu.getFlags()) {
                     if (!lstServerflags.contains(flag)) {
                         if (missingFlags == null) {
@@ -303,8 +358,8 @@
         }
 
         /**
-         * This method only check if server and cluster have the same cpu 
(intel
-         * or amd)
+         * This method only check if server and cluster have the same cpu 
(intel,
+         * amd or IBM)
          *
          * @param clusterCpuName
          * @param serverFlags
@@ -320,8 +375,17 @@
                     Set<String> lstServerflags = new HashSet<String>(
                             Arrays.asList(serverFlags.split("[,]", -1)));
 
-                    return (lstServerflags.contains(_intelFlag)) ? 
_intelCpuByNameDictionary
-                            .containsKey(clusterCpuName) : 
_amdCpuByNameDictionary.containsKey(clusterCpuName);
+                    boolean retCode = false;
+
+                    if (lstServerflags.contains(_intelFlag)) {
+                        retCode = 
_intelCpuByNameDictionary.containsKey(clusterCpuName);
+                    } else if (lstServerflags.contains(_amdFlag)) {
+                        retCode = 
_amdCpuByNameDictionary.containsKey(clusterCpuName);
+                    } else if (lstServerflags.contains(_ibmFlag)) {
+                        retCode = 
_ibmCpuByNameDictionary.containsKey(clusterCpuName);
+                    }
+
+                    return retCode;
                 }
             }
         }
@@ -337,15 +401,23 @@
         public boolean CheckIfCpusSameManufacture(String cpuName1, String 
cpuName2) {
             boolean result = false;
             if (cpuName1 != null && cpuName2 != null) {
-                result = (_intelCpuByNameDictionary.containsKey(cpuName1)) ? 
_intelCpuByNameDictionary
-                        .containsKey(cpuName2) : 
_amdCpuByNameDictionary.containsKey(cpuName2);
+                if (_intelCpuByNameDictionary.containsKey(cpuName1)) {
+                    result = _intelCpuByNameDictionary.containsKey(cpuName2);
+                } else if (_amdCpuByNameDictionary.containsKey(cpuName1)) {
+                    result = _amdCpuByNameDictionary.containsKey(cpuName2);
+                } else if (_ibmCpuByNameDictionary.containsKey(cpuName1)) {
+                    result = _ibmCpuByNameDictionary.containsKey(cpuName2);
+                }
             }
+
             return result;
         }
 
         public boolean CheckIfCpusExist(String cpuName) {
             return cpuName != null
-                    && (_intelCpuByNameDictionary.containsKey(cpuName) || 
_amdCpuByNameDictionary.containsKey(cpuName));
+                    && (_intelCpuByNameDictionary.containsKey(cpuName)
+                            || _amdCpuByNameDictionary.containsKey(cpuName)
+                            || _ibmCpuByNameDictionary.containsKey(cpuName));
         }
 
         /**
@@ -366,13 +438,20 @@
                         break;
                     }
                 }
-            } else {
+            } else if (lstFlags.contains(_amdFlag)) {
                 for (int i = _amdCpuList.size() - 1; i >= 0; i--) {
                     if (CheckIfFlagsContainsCpuFlags(_amdCpuList.get(i), 
lstFlags)) {
                         result = _amdCpuList.get(i);
                         break;
                     }
                 }
+            } else if (lstFlags.contains(_ibmFlag)) {
+                for (int i = _ibmCpuList.size() - 1; i >= 0; i--) {
+                    if (CheckIfFlagsContainsCpuFlags(_ibmCpuList.get(i), 
lstFlags)) {
+                        result = _ibmCpuList.get(i);
+                        break;
+                    }
+                }
             }
             return result;
         }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ArchitectureType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ArchitectureType.java
new file mode 100644
index 0000000..3a8da51
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ArchitectureType.java
@@ -0,0 +1,32 @@
+package org.ovirt.engine.core.common.businessentities;
+
+import org.ovirt.engine.core.compat.StringHelper;
+
+public enum ArchitectureType {
+
+    ppc64,
+    x86_64,
+    undefined;
+
+    public static String nameOf(ArchitectureType architecture) {
+        if (architecture == null) {
+            return ArchitectureType.undefined.name();
+        }
+
+        return architecture.name();
+    }
+
+    public static ArchitectureType forValue(String name) {
+        ArchitectureType architecture = ArchitectureType.undefined;
+
+        if (!StringHelper.isNullOrEmpty(name)) {
+            try {
+                architecture = ArchitectureType.valueOf(name.toLowerCase());
+            } catch (IllegalArgumentException e) {
+
+            }
+        }
+
+        return architecture;
+    }
+}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ServerCpu.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ServerCpu.java
index 9a74b93..35c8de0 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ServerCpu.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ServerCpu.java
@@ -5,11 +5,12 @@
 public class ServerCpu implements Serializable {
     private static final long serialVersionUID = -267863982363067020L;
 
-    public ServerCpu(String name, int level, java.util.HashSet<String> flags, 
String verbData) {
+    public ServerCpu(String name, int level, java.util.HashSet<String> flags, 
String verbData, ArchitectureType architectureType) {
         setCpuName(name);
         setLevel(level);
         setFlags(flags);
         setVdsVerbData(verbData);
+        setArchitecture(architectureType);
     }
 
     private String privateCpuName;
@@ -54,4 +55,14 @@
 
     public ServerCpu() {
     }
+
+    private ArchitectureType architectureType;
+
+    public ArchitectureType getArchitecture() {
+        return architectureType;
+    }
+
+    public void setArchitecture(ArchitectureType architectureType) {
+        this.architectureType = architectureType;
+    }
 }
diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/ServerCpuParser.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/ServerCpuParser.java
index 0110606..6293e10 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/ServerCpuParser.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/ServerCpuParser.java
@@ -4,6 +4,8 @@
 import java.util.HashSet;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
+import org.ovirt.engine.core.common.businessentities.ArchitectureType;
 import org.ovirt.engine.core.common.businessentities.ServerCpu;
 
 public class ServerCpuParser {
@@ -30,7 +32,7 @@
     public static ServerCpu parseCpu(String str) {
         String[] parts = str.split("[:]", -1);
 
-        if (parts.length != 4) {
+        if (parts.length != 5) {
             throw new IllegalArgumentException("Invalid CPU description: '" + 
str + "'");
         }
 
@@ -41,9 +43,23 @@
             }
         }
 
+        String arch = parts[4].trim();
+        ArchitectureType archType = ArchitectureType.valueOf(arch);
+
+        String levelString = parts[0].trim();
+        int level = 0;
+
+        if (StringUtils.isNotEmpty(levelString)) {
+            level = Integer.parseInt(levelString);
+        }
+
+        if (archType == null) {
+            throw new IllegalArgumentException("Invalid CPU architecture type: 
'" + arch + "'");
+        }
+
         return new ServerCpu(parts[1],
-                             Integer.parseInt(parts[0].trim()),
+                             level,
                              flags,
-                             parts[3]);
+                             parts[3], archType);
     }
 }
diff --git 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/util/ServerCpuParserTest.java
 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/util/ServerCpuParserTest.java
index befb7d9..2380f5f 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/util/ServerCpuParserTest.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/util/ServerCpuParserTest.java
@@ -5,6 +5,7 @@
 import org.junit.Assert;
 import org.junit.Test;
 
+import org.ovirt.engine.core.common.businessentities.ArchitectureType;
 import org.ovirt.engine.core.common.businessentities.ServerCpu;
 
 import static org.ovirt.engine.api.restapi.util.ServerCpuParser.parseCpus;
@@ -20,51 +21,60 @@
 
     @Test
     public void testParseSingle() {
-        List<ServerCpu> cpus = parseCpus("0:foo:one,two,three:blue");
+        List<ServerCpu> cpus = parseCpus("0:foo:one,two,three:blue:x86_64");
         assertNotNull(cpus);
         assertEquals(1, cpus.size());
-        verifyCpu(cpus.get(0), 0, "foo", "blue", "one", "two", "three");
+        verifyCpu(cpus.get(0), 0, "foo", "blue", ArchitectureType.x86_64, 
"one", "two", "three");
     }
 
     @Test
     public void testParseMultiple() {
-        List<ServerCpu> cpus = parseCpus("0:foo:one,two,three:blue;99:bar 
foo:four,five,six:pink");
+        List<ServerCpu> cpus = 
parseCpus("0:foo:one,two,three:blue:x86_64;99:bar 
foo:four,five,six:pink:x86_64");
         assertNotNull(cpus);
         assertEquals(2, cpus.size());
-        verifyCpu(cpus.get(0), 0, "foo", "blue", "one", "two", "three");
-        verifyCpu(cpus.get(1), 99, "bar foo", "pink", "four", "five", "six");
+        verifyCpu(cpus.get(0), 0, "foo", "blue", ArchitectureType.x86_64, 
"one", "two", "three");
+        verifyCpu(cpus.get(1), 99, "bar foo", "pink", ArchitectureType.x86_64, 
"four", "five", "six");
+    }
+
+    @Test
+    public void testParseMultipleArchtectures() {
+        List<ServerCpu> cpus = parseCpus("1:foo:one,two,three:blue:x86_64;:bar 
foo:four,five,six:pink:ppc64");
+        assertNotNull(cpus);
+        assertEquals(2, cpus.size());
+        verifyCpu(cpus.get(0), 1, "foo", "blue", ArchitectureType.x86_64, 
"one", "two", "three");
+        verifyCpu(cpus.get(1), 0, "bar foo", "pink", ArchitectureType.ppc64, 
"four", "five", "six");
     }
 
     @Test
     public void testParseStraySemiColons() {
-        List<ServerCpu> cpus = parseCpus(";;0:foo:one,two,three:blue;;");
+        List<ServerCpu> cpus = 
parseCpus(";;0:foo:one,two,three:blue:x86_64;;");
         assertNotNull(cpus);
         assertEquals(1, cpus.size());
-        verifyCpu(cpus.get(0), 0, "foo", "blue", "one", "two", "three");
+        verifyCpu(cpus.get(0), 0, "foo", "blue", ArchitectureType.x86_64, 
"one", "two", "three");
     }
 
     @Test
     public void testParseStrayCommas() {
-        List<ServerCpu> cpus = parseCpus("0:foo:,,one,two,,,three,,:blue");
+        List<ServerCpu> cpus = 
parseCpus("0:foo:,,one,two,,,three,,:blue:x86_64");
         assertNotNull(cpus);
         assertEquals(1, cpus.size());
-        verifyCpu(cpus.get(0), 0, "foo", "blue", "one", "two", "three");
+        verifyCpu(cpus.get(0), 0, "foo", "blue", ArchitectureType.x86_64, 
"one", "two", "three");
     }
 
     @Test
     public void testParseNoFlags() {
-        List<ServerCpu> cpus = parseCpus("0:foo::blue");
+        List<ServerCpu> cpus = parseCpus("0:foo::blue:x86_64");
         assertNotNull(cpus);
         assertEquals(1, cpus.size());
-        verifyCpu(cpus.get(0), 0, "foo", "blue");
+        verifyCpu(cpus.get(0), 0, "foo", "blue", ArchitectureType.x86_64);
     }
 
     @Test
     public void testParseNoNameFlagsOrVerb() {
-        List<ServerCpu> cpus = parseCpus("0:::");
+        List<ServerCpu> cpus = parseCpus("0::::x86_64");
         assertNotNull(cpus);
         assertEquals(1, cpus.size());
-        verifyCpu(cpus.get(0), 0, "", "");
+        verifyCpu(cpus.get(0), 0, "", "", ArchitectureType.x86_64);
     }
 
     @Test
@@ -79,13 +89,13 @@
     @Test
     public void testParseInvalidLevel() {
         try {
-            parseCpus("!:::");
+            parseCpus("!::::x86_64");
             fail("expected exception");
         } catch (NumberFormatException ex) {
         }
     }
 
-    private void verifyCpu(ServerCpu cpu, int level, String name, String verb, 
String... flags) {
+    private void verifyCpu(ServerCpu cpu, int level, String name, String verb, 
ArchitectureType arch, String... flags) {
         assertEquals(level, cpu.getLevel());
         assertEquals(name, cpu.getCpuName());
         assertEquals(verb, cpu.getVdsVerbData());
@@ -94,5 +104,6 @@
         for (String f : flags) {
             assertTrue(cpu.getFlags().contains(f));
         }
+        assertEquals(arch, cpu.getArchitecture());
     }
 }
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
 
b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
index ade328e..bb108c1 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
@@ -46,6 +46,7 @@
                <include name="common/businessentities/DiskAlignment.java" />
                <include 
name="common/businessentities/OpenStackImageProviderProperties.java" />
         <include name="common/businessentities/VmBalloonInfo.java" />
+               <include name="common/businessentities/ArchitectureType.java" />
 
                <!-- Network business entities -->
                <include 
name="common/businessentities/network/VdsNetworkInterface.java" />
diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql 
b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
index 68980d8..c57de8a 100644
--- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -72,7 +72,7 @@
 select 
fn_db_add_config_value('ClusterEmulatedMachines','rhel6.2.0,pc-1.0','3.0');
 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','3.3');
+select 
fn_db_add_config_value('ClusterEmulatedMachines','rhel6.4.0,pc-1.0,pseries','3.3');
 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');
@@ -422,10 +422,10 @@
 select fn_db_add_config_value('SendVmTicketUID','true','3.1');
 select fn_db_add_config_value('SendVmTicketUID','true','3.2');
 select fn_db_add_config_value('SendVmTicketUID','true','3.3');
-select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3;','3.0');
-select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3;','3.1');
-select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge; 8:Intel 
Haswell:vmx,nx,model_Haswell:Haswell; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4; 6:AMD Opteron 
G5:smx,nx,model_Opteron_G5:Opteron_G5;','3.2');
-select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge; 8:Intel 
Haswell:vmx,nx,model_Haswell:Haswell; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4; 6:AMD Opteron 
G5:smx,nx,model_Opteron_G5:Opteron_G5;','3.3');
+select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64;','3.0');
+select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64;','3.1');
+select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; 8:Intel 
Haswell:vmx,nx,model_Haswell:Haswell:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; 6:AMD Opteron 
G5:smx,nx,model_Opteron_G5:Opteron_G5:x86_64;','3.2');
+select fn_db_add_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; 8:Intel 
Haswell:vmx,nx,model_Haswell:Haswell:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; 6:AMD Opteron 
G5:smx,nx,model_Opteron_G5:Opteron_G5:x86_64; :IBM POWER 7 
v2.0:powernv,model_POWER7_v2.0:POWER7_v2.0:ppc64; :IBM POWER 7 
v2.1:powernv,model_POWER7_v2.1:POWER7_v2.1:ppc64; :IBM POWER 7 
v2.3:powernv,model_POWER7:POWER7:ppc64;','3.3');
 select fn_db_add_config_value('ServerRebootTimeout','300','general');
 select fn_db_add_config_value('SetupNetworksPollingTimeout','3','general');
 -- Add shareable disk property in vdc_options to support only 3.1 version.
@@ -689,9 +689,11 @@
 select fn_db_update_config_value('PostgresPagingSyntax','OFFSET (%1$s -1) 
LIMIT %2$s','general');
 select fn_db_update_config_value('PostgresSearchTemplate','SELECT * FROM 
(%2$s) %1$s) as T1 %3$s','general');
 select 
fn_db_update_config_value('RhevhLocalFSPath','/data/images/rhev','general');
-select fn_db_update_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3;','3.0');
-select fn_db_update_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4;','3.1');
-select fn_db_update_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge; 8:Intel 
Haswell:vmx,nx,model_Haswell:Haswell; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4; 6:AMD Opteron 
G5:smx,nx,model_Opteron_G5:Opteron_G5;','3.2');
+select fn_db_update_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64;','3.0');
+select fn_db_update_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64;','3.1');
+select fn_db_update_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; 8:Intel 
Haswell:vmx,nx,model_Haswell:Haswell:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; 6:AMD Opteron 
G5:smx,nx,model_Opteron_G5:Opteron_G5:x86_64;','3.2');
+select fn_db_update_config_value('ServerCPUList','3:Intel Conroe 
Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn 
Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem 
Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere 
Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 7:Intel SandyBridge 
Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; 8:Intel 
Haswell:vmx,nx,model_Haswell:Haswell:x86_64; 2:AMD Opteron 
G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron 
G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron 
G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; 5:AMD Opteron 
G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; 6:AMD Opteron 
G5:smx,nx,model_Opteron_G5:Opteron_G5:x86_64; :IBM POWER 7 
v2.0:powernv,model_POWER7_v2.0:POWER7_v2.0:ppc64; :IBM POWER 7 
v2.1:powernv,model_POWER7_v2.1:POWER7_v2.1:ppc64; :IBM POWER 7 
v2.3:powernv,model_POWER7:POWER7:ppc64;','3.3');
+select 
fn_db_update_config_value('ClusterEmulatedMachines','rhel6.4.0,pc-1.0,pseries','3.3');
 select fn_db_update_config_value('SpiceDriverNameInGuest','{"windows": 
"RHEV-Spice", "linux" : "xorg-x11-drv-qxl" }','general');
 select 
fn_db_update_config_value('SupportedClusterLevels','3.0,3.1,3.2,3.3','general');
 select 
fn_db_update_config_value('SupportedStorageFormats','0,2,3','3.1,3.2,3.3');


-- 
To view, visit http://gerrit.ovirt.org/17853
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d63f0c66c2499f76b122d9c5cdbb7eebfe440e8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <vitor.l...@eldorado.org.br>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to