Django progress, web/CLI, object-upgradeablility testing needed for devel branch
by Michael DeHaan
The web app now presents error pages for edits again, validates objects
for being consistent before saving them (not just the web app), we have
batch editing working, and misc. cosmetic improvements (uppercase in a
few areas). Subprofiles should work better. Lots of random things.
I think it's mostly usable, though there are a few forms that should
still end up on the error pages, rather than showing the Django debug
pages, but not too many.
I also suspect the "check_if_valid" code needs a bit of enhancement, and
we need to pound on things pretty hard to see what breaks.
Anyway, please test away, and why you are doing so, make a note of
anything that just looks broken/unfinished when compared with the old
webapp.
I know of a few such items -- the way the DIVs dump text below the
navigation half of the time is certaintly one of these.
I'd also try to break the interface editor, or any of the editors, and
see what works/doesn't ...
The CLI could probably use equivalent bashing, I know --in-place doesn't
currently work, there are probably a few other options that don't work
since the refactoring.
It would be best if testing could be done against an old copy of the
cobbler objects (like your production copy), but obviously don't run
devel against production -- it may very well clobber your configs. But
making sure the data is preserved across the upgrade here is pretty
important, so feeding it old data would be useful.
I'm going to be doing more testing myself of course in the next week,
but the idea now is to get what we have back to "Cobbler 1.6.5 feature
equivalence" state, running off the new codebase, before adding anything
new.
Thanks!
--Michael
14 years, 10 months
[PATCH] Add alternate option support, to remap things like kernel_options to --kopts
by James Cammarata
Took advantage of the field_info stuff to add a new mapping hash:
ALTERNATE_OPTIONS. So far, I've only added ksmeta, kopts, and kopts-post
to it, so there are probably some more modified versions to go in. I also
fixed up the indentation in the add_options_from_fields() function since
some lines were only indented 3 spaces (trying to be consistent about that
now...)
commit f5f037ff224d74cd3818a9886065d54ca153fc38
Author: James Cammarata <jimi(a)sngx.net>
Date: Sun May 31 17:22:19 2009 -0500
Add alternate option support, to remap things like kernel_options to
--kopts
Fix indentation in add_options_from_fields()
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
14 years, 11 months
[PATCH] Don't let generic_save() save an interface with a blank name
by James Cammarata
commit 46840ee28c6ab588bb4225b3aa683aa08cae156c
Author: James Cammarata <jimi(a)sngx.net>
Date: Sun May 31 08:53:33 2009 -0500
Don't let generic_save() save an interface with a blank name
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
14 years, 11 months
[PATCH] Fix --in-place editing
by James Cammarata
It looks like this is the only boolean-flag based option that would break
from the new setup, since the rest are used in command.py (this is the only
option that is passed to specific functions in utils.py).
commit 035bbfc4edc8f05b6d807d830ae7a8cf28758409
Author: James Cammarata <jimi(a)sngx.net>
Date: Sun May 31 16:53:04 2009 -0500
Fix --in-place editing
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
14 years, 11 months
[PATCH] Fix for saving and generic_edit template
by James Cammarata
Pushed to my github, on the HEAD branch:
commit b77a2afba827047169cb712cff4db7bcca1bce68
Author: James Cammarata <jimi(a)sngx.net>
Date: Sat May 30 15:59:31 2009 -0500
Fix for saving and generic_edit template
I'm not sure if looking for "<<None>>" in the generic_save() code is the
right approach to this, but it works for now.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
14 years, 11 months
Still problems with the spec file
by James Cammarata
dsch04 pointed this out in IRC. The RPMs still build for me, but he said
it's barfing for him:
+ cp -pr AUTHORS COPYING CHANGELOG README
/var/tmp/cobbler-1.7.0-1-buildroot/usr/share/doc/cobbler-web-1.7.0
+ exit 0
warning: File listed twice: /usr/share/cobbler/web/sessions
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: Django cobbler
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/cobbler-1.7.0-1-buildroot
warning: Installed (but unpackaged) file(s) found:
/usr/share/cobbler/web/__init__.pyc
/usr/share/cobbler/web/__init__.pyo
/usr/share/cobbler/web/authen.pyc
/usr/share/cobbler/web/authen.pyo
/usr/share/cobbler/web/manage.pyc
/usr/share/cobbler/web/manage.pyo
/usr/share/cobbler/web/settings.pyc
/usr/share/cobbler/web/settings.pyo
/usr/share/cobbler/web/urls.pyc
/usr/share/cobbler/web/urls.pyo
Wrote: /raid/devel/cobbler/rpm-build/cobbler-1.7.0-1.src.rpm
Wrote: /raid/devel/cobbler/rpm-build/cobbler-1.7.0-1.noarch.rpm
Wrote: /raid/devel/cobbler/rpm-build/koan-1.7.0-1.noarch.rpm
Wrote: /raid/devel/cobbler/rpm-build/cobbler-web-1.7.0-1.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.58021
+ umask 022
+ cd /raid/devel/cobbler/rpm-build
+ cd cobbler-1.7.0
+ test x/var/tmp/cobbler-1.7.0-1-buildroot '!=' x
+ rm -rf /var/tmp/cobbler-1.7.0-1-buildroot
+ exit 0
I'll take a look at this if I have time this weekend, though I haven't dug
into the spec file very much.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
14 years, 11 months
[PATCH] Fix so that Fedora 11 imports add regular and PAE distros
by James Laska
---
cobbler/action_import.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 54a88f9..cd654fb 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -550,6 +550,8 @@ class Importer:
distros_added.extend(adtl)
initrd = None
kernel = None
+ pae_initrd = None
+ pae_kernel = None
# ========================================================================
--
1.6.2.2
14 years, 11 months
[BUGFIX] - for Ticket #449
by Bill Peck
The following fixes trac ticket 449.
>From b65accf94a67c567b5314408ace9e715f68a419b Mon Sep 17 00:00:00 2001
From: Bill Peck <bpeck(a)redhat.com>
Date: Thu, 28 May 2009 15:22:33 -0400
Subject: [PATCH] only specify -m for drac if power_id is defined
---
templates/power_drac.template | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/templates/power_drac.template b/templates/power_drac.template
index 979028c..6a10d73 100644
--- a/templates/power_drac.template
+++ b/templates/power_drac.template
@@ -1 +1,4 @@
-fence_drac -a $power_address -l $power_user -p $power_pass -m $power_id -o $power_mode
+#if $getVar("power_id","") != ""
+ #set $power_id = "-m %s" % $power_id
+#end if
+fence_drac -a $power_address -l $power_user -p $power_pass $power_id -o $power_mode
--
1.6.0.6
14 years, 11 months
Tweaking the branches (swapping devel and master, essentially)
by Michael DeHaan
Ok,
I probably want to do this for the wrong reasons, but I have about three
of them.
Currently the github impact graph shows activity over time. The thing
is, it only really shows information for the master branch. The
master branch isn't where the action is.
We also have a problem in that we have only one stable branch, since by
convention it's master.
Further, people tend to not know about devel. I want them to know about
devel by default if they are trying to write a patch, rather than
missing instructions and writing a patch
against master.
So, what I'm going to try to do is this ... make master the new devel...
and make master "cobbler16".
This could also cover the (possible) contingency of what happens when
Satellite is out and needs a fix on 1.6 when 2.0 has already gone stable
and needs only
certain fixes (I wouldn't expect anyone to maintain such a branch but
me). We flirted this earlier with a "sustain14" branch, which we
didn't need, but this gets us into the habit of doing it.
This may mix folks git repos up a /small/ amount. I'm going to play
around and see what happens before I push it.
--Michael
14 years, 11 months
[PATCH] - discover power templates dynamically
by Bill Peck
Following patch allows power templates to be discovered dynamically. It
doesn't cache the data but I think its low overhead. If someone wants
to add caching to it then please do.
>From 133b6e6fdbdd4edaae29edba3f89366f72d01d1a Mon Sep 17 00:00:00 2001
From: Bill Peck <bpeck(a)redhat.com>
Date: Thu, 28 May 2009 14:18:16 -0400
Subject: [PATCH] allow power validation based on installed templates
---
cobbler/action_power.py | 22 ++--------------------
cobbler/item_system.py | 5 ++---
cobbler/utils.py | 20 +++++++++++++++++++-
3 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/cobbler/action_power.py b/cobbler/action_power.py
index 2ab88b8..3d62956 100644
--- a/cobbler/action_power.py
+++ b/cobbler/action_power.py
@@ -147,26 +147,8 @@ class PowerTool:
if self.system.power_type in [ "", "none" ]:
raise CX("Power management is not enabled for this system")
- powerdir=self.settings.power_template_dir
- map = {
- "bullpap" : os.path.join(powerdir,"power_bullpap.template"),
- "apc" : os.path.join(powerdir,"power_apc.template"),
- "apc_snmp" : os.path.join(powerdir,"power_apc_snmp.template"),
- "ether-wake" : os.path.join(powerdir,"power_ether_wake.template"),
- "drac" : os.path.join(powerdir,"power_drac.template"),
- "ipmitool" : os.path.join(powerdir,"power_ipmitool.template"),
- "ipmilan" : os.path.join(powerdir,"power_ipmilan.template"),
- "ilo" : os.path.join(powerdir,"power_ilo.template"),
- "rsa" : os.path.join(powerdir,"power_rsa.template"),
- "lpar" : os.path.join(powerdir,"power_lpar.template"),
- "bladecenter": os.path.join(powerdir,"power_bladecenter.template"),
- "virsh" : os.path.join(powerdir,"power_virsh.template"),
- "integrity" : os.path.join(powerdir,"power_integrity.template"),
- "wti" : os.path.join(powerdir,"power_wti.template"),
- }
-
- result = map.get(self.system.power_type, "")
- if result == "":
+ result = utils.get_power(self.system.power_type)
+ if not result:
raise CX("Invalid power management type for this system (%s, %s)" % (self.system.power_type, self.system.name))
return result
diff --git a/cobbler/item_system.py b/cobbler/item_system.py
index 26da67e..5e67188 100644
--- a/cobbler/item_system.py
+++ b/cobbler/item_system.py
@@ -54,7 +54,7 @@ FIELDS = [
["comment","",0,"Comment",True,"Free form text description",0],
["ctime",0,0,"",False,"",0],
["mtime",0,0,"",False,"",0],
- ["power_type","SETTINGS:power_management_default_type",0,"Power Management Type",True,"",["apc_snmp","bladecenter","bullpap","drac","ether_wake","ilo","integrity","ipmilan","ipmitool","lpar","rsa","virsh","wti"]],
+ ["power_type","SETTINGS:power_management_default_type",0,"Power Management Type",True,"",utils.get_power_types()],
["power_address","",0,"Power Management Address",True,"Ex: power-device.example.org",0],
["power_user","",0,"Power Username ",True,"",0],
["power_pass","",0,"Power Password",True,"",0],
@@ -489,8 +489,7 @@ class System(item.Item):
if power_type is None:
power_type = ""
power_type = power_type.lower()
- valid = "bullpap wti apc_snmp ether-wake ipmilan drac ipmitool ilo rsa lpar bladecenter virsh integrity none"
- choices = valid.split(" ")
+ choices = utils.get_power_types()
choices.sort()
if power_type not in choices:
raise CX("power type must be one of: %s" % ",".join(choices))
diff --git a/cobbler/utils.py b/cobbler/utils.py
index 4e7690d..5dd6b9f 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -1789,4 +1789,22 @@ def get_remote_methods_from_fields(obj,fields):
ds["delete_interface"] = getattr(obj,"delete_interface")
return ds
-
+def get_power_types():
+ """
+ Return all possible power types
+ """
+ power_types = []
+ power_template = re.compile(r'power_(.*).template')
+ for x in glob.glob("/etc/cobbler/power/power_*.template"):
+ power_types.append(power_template.search(x).group(1))
+ return power_types
+
+def get_power(powertype=None):
+ """
+ Return power command for type
+ """
+ if powertype:
+ powerpath = "/etc/cobbler/power/power_%s.template" % powertype
+ if os.path.isfile(powerpath):
+ return powerpath
+ return None
--
1.6.0.6
14 years, 11 months