Hi

Two patches:

0001) Fix for Ticket #611 (add fedora rawhide to codes.py, and while
at it added some opensuse versions)
0002) Minor cleanup in the redhat importer, the valid os versions were
duplicated there. They should be fetched from codes.py

-- 
Grtz,
Jörgen Maas
From 951e72bb79f2103c76849f485dfd58155acbd6ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rgen=20Maas?= <jorgen.m...@gmail.com>
Date: Sun, 16 Oct 2011 13:38:42 +0200
Subject: [PATCH 1/2] Add fedora16, rawhide, opensuse 11.2, 11.3, 11.4 and
 12.1 to codes.py This should also fix ticket #611

---
 cobbler/codes.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cobbler/codes.py b/cobbler/codes.py
index d94f2f7..2b66b96 100644
--- a/cobbler/codes.py
+++ b/cobbler/codes.py
@@ -41,8 +41,8 @@ VALID_OS_BREEDS = [
 ]
 
 VALID_OS_VERSIONS = {
-    "redhat"  : [ "rhel3", "rhel4", "rhel5", "rhel6", "fedora14", "fedora15", "generic24", "generic26", "virtio26", "other" ],
-    "suse"    : [ "sles9", "sles10", "sles11", "generic24", "generic26", "virtio26", "other" ],
+    "redhat"  : [ "rhel3", "rhel4", "rhel5", "rhel6", "fedora14", "fedora15", "fedora16", "rawhide", "generic24", "generic26", "virtio26", "other" ],
+    "suse"    : [ "sles9", "sles10", "sles11", "opensuse11.2", "opensuse11.3", "opensuse11.4", "opensuse12.1", "generic24", "generic26", "virtio26", "other" ],
     "debian"  : [ "lenny", "squeeze", "stable", "testing", "unstable", "generic24", "generic26", "other" ],
     "ubuntu"  : [ "hardy", "lucid", "maverick", "natty" ],
     "generic" : [ "generic24", "generic26", "other" ],
-- 
1.7.6.4

From dfb09ed95e15c85f120834d51eecbca84b18996a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rgen=20Maas?= <jorgen.m...@gmail.com>
Date: Sun, 16 Oct 2011 14:09:43 +0200
Subject: [PATCH 2/2] Use VALID_OS_VERSIONS from codes.py in the redhat
 importer.

---
 cobbler/modules/manage_import_redhat.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/cobbler/modules/manage_import_redhat.py b/cobbler/modules/manage_import_redhat.py
index b32ba8c..c349d83 100644
--- a/cobbler/modules/manage_import_redhat.py
+++ b/cobbler/modules/manage_import_redhat.py
@@ -41,6 +41,7 @@ import item_distro
 import item_profile
 import item_repo
 import item_system
+import codes
 
 from utils import _
 
@@ -293,10 +294,7 @@ class ImportRedhatManager:
 
     # required function for import modules
     def get_valid_os_versions(self):
-        return ["rhel2.1", "rhel3", "rhel4", "rhel5", "rhel6", 
-                "fedora5", "fedora6", "fedora7", "fedora8", "fedora9", "fedora10", 
-                "fedora11", "fedora12", "fedora13", "fedora14", "fedora15",
-                "generic24", "generic26", "virtio26", "other",]
+        return codes.VALID_OS_VERSIONS["redhat"]
 
     def get_valid_repo_breeds(self):
         return ["rsync", "rhn", "yum",]
-- 
1.7.6.4

_______________________________________________
cobbler-devel mailing list
cobbler-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel

Reply via email to