summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-09-26 11:20:11 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-09-26 11:20:11 -0400
commit404add6b3310c8928e8edb5448334886010edaea (patch)
treebe610737461174abefb49f1b69f609deb58731e4
parent11155bcb62ea986106cafcbfdb4ddef7b4167399 (diff)
downloadcobbler-404add6b3310c8928e8edb5448334886010edaea.tar.gz
cobbler-404add6b3310c8928e8edb5448334886010edaea.tar.xz
cobbler-404add6b3310c8928e8edb5448334886010edaea.zip
Fix webapp edit pages for repo checkboxes + release bump for 1.2.5
-rw-r--r--CHANGELOG3
-rw-r--r--cobbler.spec5
-rw-r--r--cobbler/item_repo.py13
-rw-r--r--setup.py2
-rw-r--r--webui_templates/repo_edit.tmpl20
5 files changed, 28 insertions, 15 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 454e2dd9..5d23a195 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,11 +1,12 @@
Cobbler CHANGELOG
(all entries mdehaan@redhat.com unless noted otherwise)
-- ??? - 1.2.5 (pending)
+- Fri Sep 26 2008 - 1.2.5
- (BUGF) expose --arch for "cobbler image add"
- (BUGF) unbreak dnsmasq DHCP management, similar to ISC bug
- (BUGF) fix --arch for cobbler distro add/edit
- (BUGF) fix merge error with remote.py's remove_profile function (fix webapp)
+- (BUGF) makekeep_updated and mirror_locally checkboxes in WebUI display correctly
- Mon Sep 08 2008 - 1.2.4
- (BUGF) simple rebuild to remove cli_report.py, which is not in git
diff --git a/cobbler.spec b/cobbler.spec
index 615c5d28..f4aaff5d 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -2,7 +2,7 @@
Summary: Boot server configurator
Name: cobbler
AutoReq: no
-Version: 1.2.4
+Version: 1.2.5
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
License: GPLv2+
@@ -217,6 +217,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Sep 26 2008 Michael DeHaan <mdehaan@redhat.com> - 1.2.5-1
+- Upstream changes (see CHANGELOG)
+
* Mon Sep 08 2008 Michael DeHaan <mdehaan@redhat.com> - 1.2.4-1
- Rebuild
diff --git a/cobbler/item_repo.py b/cobbler/item_repo.py
index cb3f9311..6bd5aa55 100644
--- a/cobbler/item_repo.py
+++ b/cobbler/item_repo.py
@@ -41,7 +41,7 @@ class Repo(item.Item):
self.name = None
# FIXME: subobject code does not really make sense for repos
self.mirror = (None, '<<inherit>>')[is_subobject]
- self.keep_updated = ('y', '<<inherit>>')[is_subobject]
+ self.keep_updated = (True, '<<inherit>>')[is_subobject]
self.priority = (99, '<<inherit>>')[is_subobject]
self.rpm_list = ("", '<<inherit>>')[is_subobject]
self.createrepo_flags = ("-c cache", '<<inherit>>')[is_subobject]
@@ -49,13 +49,13 @@ class Repo(item.Item):
self.arch = "" # use default arch
self.yumopts = {}
self.owners = self.settings.default_ownership
- self.mirror_locally = 1
+ self.mirror_locally = True
def from_datastruct(self,seed_data):
self.parent = self.load_item(seed_data, 'parent')
self.name = self.load_item(seed_data, 'name')
self.mirror = self.load_item(seed_data, 'mirror')
- self.keep_updated = self.load_item(seed_data, 'keep_updated','y')
+ self.keep_updated = self.load_item(seed_data, 'keep_updated',True)
self.priority = self.load_item(seed_data, 'priority',99)
self.rpm_list = self.load_item(seed_data, 'rpm_list')
self.createrepo_flags = self.load_item(seed_data, 'createrepo_flags', '-c cache')
@@ -63,10 +63,11 @@ class Repo(item.Item):
self.depth = self.load_item(seed_data, 'depth', 2)
self.yumopts = self.load_item(seed_data, 'yumopts', {})
self.owners = self.load_item(seed_data, 'owners', self.settings.default_ownership)
- self.mirror_locally = self.load_item(seed_data, 'mirror_locally', '1')
+ self.mirror_locally = self.load_item(seed_data, 'mirror_locally', True)
# coerce types from input file
self.set_keep_updated(self.keep_updated)
+ self.set_mirror_locally(self.mirror_locally)
self.set_owners(self.owners)
return self
@@ -195,9 +196,9 @@ class Repo(item.Item):
def set_mirror_locally(self,value):
value = str(value).lower()
if value in [ "yes", "y", "1", "on", "true" ]:
- self.mirror_locally = 1
+ self.mirror_locally = True
else:
- self.mirror_locally = 0
+ self.mirror_locally = False
return True
def printable(self):
diff --git a/setup.py b/setup.py
index ce868bc1..13f5244c 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ import sys
from distutils.core import setup, Extension
import string
-VERSION = "1.2.4"
+VERSION = "1.2.5"
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/DNS Management. Cobbler also has a Python and XMLRPC API for integration with other applications.
diff --git a/webui_templates/repo_edit.tmpl b/webui_templates/repo_edit.tmpl
index 0794d2b5..cf7f82fc 100644
--- a/webui_templates/repo_edit.tmpl
+++ b/webui_templates/repo_edit.tmpl
@@ -85,9 +85,13 @@ function disablename(value)
<label for="keep_updated">Keep Updated</label>
</td>
<td>
- <input type="checkbox" name="keep_updated" id="keep_updated"
- #if (not $repo) or $repo.keep_updated
- checked="true"
+ <input type="checkbox" name="keep_updated" id="keep_updated"
+ #if $repo
+ #if str($repo.keep_updated) != "False"
+ checked="true"
+ #end if
+ #else
+ checked="true"
#end if
/>
<p class="context-tip">Uncheck to prevent the mirror from being updated again.</p>
@@ -100,9 +104,13 @@ function disablename(value)
<label for="keep_updated">Mirror Locally</label>
</td>
<td>
- <input type="checkbox" name="mirror_locally" id="mirror_locally"
- #if (not $repo) or $repo.mirror_locally
- checked="true"
+ <input type="checkbox" name="mirror_locally" id="mirror_locally"
+ #if $repo
+ #if str($repo.mirror_locally) != "False"
+ checked="true"
+ #end if
+ #else
+ checked="true"
#end if
/>
<p class="context-tip">Uncheck to reference the repository directly instead of mirroring.</p>