summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--cobbler.spec5
-rw-r--r--cobbler/item_profile.py4
-rw-r--r--cobbler/utils.py23
-rw-r--r--cobbler/webui/master.py4
-rw-r--r--setup.py2
6 files changed, 37 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 99a2402..fa097bf 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
Cobbler CHANGELOG
(all entries mdehaan@redhat.com unless noted otherwise)
+* Fri Feb 22 2008 - 0.8.2
+- fix to webui to allow repos to be edited there on profile page
+
* Wed Feb 20 2008 - 0.8.1
- bugfix in reposync code
- don't print tracebacks on SystemExit from optparse
diff --git a/cobbler.spec b/cobbler.spec
index f5fc370..4b52cf6 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -2,7 +2,7 @@
Summary: Boot server configurator
Name: cobbler
AutoReq: no
-Version: 0.8.1
+Version: 0.8.2
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
License: GPLv2+
@@ -190,6 +190,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Feb 22 2008 Michael DeHaan <mdehaan@redhat.com> - 0.8.2-1
+- Upstream changes (see CHANGELOG)
+
* Wed Feb 20 2008 Michael DeHaan <mdehaan@redhat.com> - 0.8.1-1
- Upstream changes (see CHANGELOG)
diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py
index f7d1d98..f229d4c 100644
--- a/cobbler/item_profile.py
+++ b/cobbler/item_profile.py
@@ -136,6 +136,10 @@ class Profile(item.Item):
def set_repos(self,repos):
+ # WARNING: hack
+ repos = utils.fix_mod_python_select_submission(repos)
+
+
# allow the magic inherit string to persist
if repos == "<<inherit>>":
# FIXME: this is not inheritable in the WebUI presently ?
diff --git a/cobbler/utils.py b/cobbler/utils.py
index ca3d91a..069d440 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -445,3 +445,26 @@ def run_triggers(ref,globber):
if rc != 0:
raise CX(_("cobbler trigger failed: %(file)s returns %(code)d") % { "file" : file, "code" : rc })
+def fix_mod_python_select_submission(repos):
+ """
+ WARNING: this is a heinous hack to convert mod_python submitted form data
+ to something usable. Ultimately we need to fix the root cause of this
+ which doesn't seem to happen on all versions of python/mp.
+ """
+
+ if str(repos).find("Field(") == -1:
+ return repos # no hack needed
+
+ # should be nice regex, but this is readable :)
+ repos = str(repos)
+ repos = repos.replace("'repos'","")
+ repos = repos.replace("'","")
+ repos = repos.replace("[","")
+ repos = repos.replace("]","")
+ repos = repos.replace("Field(","")
+ repos = repos.replace(")","")
+ repos = repos.replace(",","")
+ repos = repos.replace('"',"")
+ repos = repos.lstrip().rstrip()
+ return repos
+
diff --git a/cobbler/webui/master.py b/cobbler/webui/master.py
index a4485ac..ce41e1b 100644
--- a/cobbler/webui/master.py
+++ b/cobbler/webui/master.py
@@ -33,8 +33,8 @@ VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.0.1'
__CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0)
-__CHEETAH_genTime__ = 1203536023.5055339
-__CHEETAH_genTimestamp__ = 'Wed Feb 20 14:33:43 2008'
+__CHEETAH_genTime__ = 1203715949.4316349
+__CHEETAH_genTimestamp__ = 'Fri Feb 22 16:32:29 2008'
__CHEETAH_src__ = 'webui_templates/master.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Feb 15 14:47:43 2008'
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
diff --git a/setup.py b/setup.py
index 4dbeaa3..cc4eb12 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ import sys
from distutils.core import setup, Extension
import string
-VERSION = "0.8.1"
+VERSION = "0.8.2"
SHORT_DESC = "Network Boot and Update Server"
LONG_DESC = """
Cobbler is a network boot and update server. Cobbler supports PXE, provisioning virtualized images, and reinstalling existing Linux machines. The last two modes require a helper tool called 'koan' that integrates with cobbler. Cobbler's advanced features include importing distributions from DVDs and rsync mirrors, kickstart templating, integrated yum mirroring, and built-in DHCP Management. Cobbler has a Python API for integration with other GPL systems management applications.