Roy Golan has uploaded a new change for review.

Change subject: core: os repository - remove "linux" and "windows"
......................................................................

core: os repository - remove "linux" and "windows"

"linux" and "windows" introduced to be the base oss but dosn't really
have a use as real OSs.

* remove linux and windows os from osinfo
* refactor each os which rely on linux and windows to rely on other_linux and 
windows_xp respectivly
* upgrade db records in vm_static.

* this change will break import/export but since this change introduced
 in 3.3 and is removed in 3.3 I'm not suppling handling in the code for
 that.

 to fix the import its enough to add to
 
$PREFIX/etc/ovirt-engine/osinfo.conf.d/20-import-export-linux-windows-fix.properties

  20-import-export-linux-windows-fix.properties

  backwardCompatibility.linux = 5
  backwardCompatibility.windows = 1

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1009013
Change-Id: I9c32efc276fa32af39b35ce081a7bd2003afc129
Signed-off-by: Roy Golan <[email protected]>
---
M packaging/conf/osinfo-defaults.properties
A packaging/dbscripts/upgrade/03_03_0960_move_rename_of_other_linux_type.sql
2 files changed, 22 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/20269/1

diff --git a/packaging/conf/osinfo-defaults.properties 
b/packaging/conf/osinfo-defaults.properties
index 0fc442d..eb24db2 100644
--- a/packaging/conf/osinfo-defaults.properties
+++ b/packaging/conf/osinfo-defaults.properties
@@ -19,7 +19,7 @@
 #     This file is also loaded as a String Bundle so name and description can
 #     contain non-ASCII values.
 #     This file is the default en-us locale while loading 
10-osinfo_he-il.properties
-#     will contain Hebrew locale values e.g os.linux.name.value = 
&#x5DC;&#x5D9;&#x5E0;&#x5D5;&#x5E7;&#x5E1;
+#     will contain Hebrew locale values e.g os.other_linux.name.value = 
&#x5DC;&#x5D9;&#x5E0;&#x5D5;&#x5E7;&#x5E1;
 #
 
 # for compatibility reasons and convenience an OS has an id.
@@ -48,30 +48,23 @@
 # See VmInterfaceType.java
 os.other.devices.network.value =  rtl8139, e1000, pv
 
-os.linux.id.value = 100
-os.linux.name.value = Linux
-os.linux.derivedFrom.value = other
-os.linux.description.value = General GNU/Linux
-os.linux.family.value = linux
-
-os.windows.id.value = 200
-os.windows.name.value = Windows
-os.windows.derivedFrom.value = other
-os.windows.description.value = General Windows OS
-os.windows.family.value = windows
-os.windows.sysprepPath.value = ""
-os.windows.productKey.value = ""
+# otherLinux(5, OsType.Linux, false),
+os.other_linux.id.value = 5
+os.other_linux.name.value = Linux
+os.other_linux.derivedFrom.value = other
+os.other_linux.description.value = General GNU/Linux
+os.other_linux.family.value = linux
 
 # rhel3(9, OsType.Linux, false),
 os.rhel_3.id.value = 9
 os.rhel_3.name.value = Red Hat Enterprise Linux 3.x
-os.rhel_3.derivedFrom.value = linux
+os.rhel_3.derivedFrom.value = other_linux
 os.rhel_3.devices.audio.value = ac97
 
 # rhel3x64(15, OsType.Linux, true),
 os.rhel_3x64.id.value = 15
 os.rhel_3x64.name.value = Red Hat Enterprise Linux 3.x x64
-os.rhel_3x64.derivedFrom.value = linux
+os.rhel_3x64.derivedFrom.value = other_linux
 os.rhel_3x64.devices.audio.value = ac97
 
 
@@ -111,19 +104,20 @@
 # WindowsXP(1, OsType.Windows, false),
 os.windows_xp.id.value = 1
 os.windows_xp.name.value = Windows XP
-os.windows_xp.derivedFrom.value = windows
+os.windows_xp.derivedFrom.value = other
 os.windows_xp.sysprepPath.value = /etc/ovirt-engine/sysprep/sysprep.xp
 os.windows_xp.productKey.value =
 os.windows_xp.isTimezoneTypeInteger.value = true
 os.windows_xp.devices.network.value =  rtl8139_pv, rtl8139, e1000, pv
 os.windows_xp.devices.audio.value = ac97
+os.windows_xp.family.value = windows
 
 
 
 # Windows2003(3, OsType.Windows, false),
 os.windows_2003.id.value = 3
 os.windows_2003.name.value = Windows 2003
-os.windows_2003.derivedFrom.value = windows
+os.windows_2003.derivedFrom.value = windows_xp
 os.windows_2003.sysprepPath.value = /etc/ovirt-engine/sysprep/sysprep.2k3
 os.windows_2003.productKey.value =
 os.windows_2003.isTimezoneTypeInteger.value = true
@@ -151,9 +145,10 @@
 # Windows7(11, OsType.Windows, false),false
 os.windows_7.id.value = 11
 os.windows_7.name.value = Windows 7
-os.windows_7.derivedFrom.value = windows
+os.windows_7.derivedFrom.value = windows_xp
 os.windows_7.sysprepPath.value = /etc/ovirt-engine/sysprep/sysprep.w7
 os.windows_7.productKey.value =
+os.windows_7.devices.audio.value = ich6
 
 # Windows7x64(12, OsType.Windows, true),
 os.windows_7x64.id.value = 12
@@ -204,20 +199,15 @@
 os.windows_2012x64.productKey.value =
 os.windows_2012x64.spiceSupport.value = false
 
-# otherLinux(5, OsType.Linux, false),
-os.other_linux.id.value = 5
-os.other_linux.name.value = Other Linux
-os.other_linux.derivedFrom.value = linux
-
 #Suse
 os.sles_11.id.value = 1193
 os.sles_11.name.value = SUSE Linux Enterprise Server 11
-os.sles_11.derivedFrom.value = linux
+os.sles_11.derivedFrom.value = other_linux
 
 #Ubuntu
 os.ubuntu_12_04.id.value = 1252
 os.ubuntu_12_04.name.value = Ubuntu Precise Pangolin LTS
-os.ubuntu_12_04.derivedFrom.value = linux
+os.ubuntu_12_04.derivedFrom.value = other_linux
 os.ubuntu_12_04.resources.minimum.ram.value = 64
 os.ubuntu_12_04.resources.minimum.disksize.value = 5120
 os.ubuntu_12_04.resources.minimum.numberOsCpus.value = 1
diff --git 
a/packaging/dbscripts/upgrade/03_03_0960_move_rename_of_other_linux_type.sql 
b/packaging/dbscripts/upgrade/03_03_0960_move_rename_of_other_linux_type.sql
new file mode 100644
index 0000000..127cf34
--- /dev/null
+++ b/packaging/dbscripts/upgrade/03_03_0960_move_rename_of_other_linux_type.sql
@@ -0,0 +1,6 @@
+
+-- remove "linux" and "windows" os types. they don't have a real usage. --
+-- "linux" becomes "other_liunx"
+update vm_static set os = 5 where os = 100;
+-- ""windows" becomes "windows_xp"
+update vm_static set os = 1 where os = 200;


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c32efc276fa32af39b35ce081a7bd2003afc129
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to