summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-05-05 18:30:44 -0400
committerJim Meyering <jim@meyering.net>2006-05-05 18:30:44 -0400
commitc1aea64f02ae55d47c18269895717af99839ed0e (patch)
treebe13cc5c96d135cd8a08fd0794507650a55ad35b
parent3e38df5996d007b4eedc65c4b357502f3e03b604 (diff)
downloadthird_party-cobbler-c1aea64f02ae55d47c18269895717af99839ed0e.tar.gz
third_party-cobbler-c1aea64f02ae55d47c18269895717af99839ed0e.tar.xz
third_party-cobbler-c1aea64f02ae55d47c18269895717af99839ed0e.zip
Interim commit during refactoring. Pretty broken as a result of some cleanup but it will get straightened out very soon. The main thing I'm doing here is to remove backreferences from the object tree and make the API simpler, so that folks using the API screw up less. This means making the CLI code simpler as well. The serializer has also been overhauled so it's not as much bolted on, although I have some fixing to do to make it work entirely correctly. Wanted to check all of this in case someone decided to patch something else, making diffing really complex in the interim. I'd recommend not patching anything else to this code as I'm not close to done, really.
-rw-r--r--cobbler.conf11
-rw-r--r--cobbler.pod6
-rw-r--r--cobbler/api.py36
-rw-r--r--cobbler/collection.py33
-rw-r--r--cobbler/collection_distros.py (renamed from cobbler/distros.py)9
-rw-r--r--cobbler/collection_profiles.py (renamed from cobbler/profiles.py)4
-rw-r--r--cobbler/collection_systems.py (renamed from cobbler/systems.py)6
-rw-r--r--cobbler/config.py31
-rw-r--r--cobbler/item_distro.py (renamed from cobbler/distro.py)3
-rw-r--r--cobbler/item_profile.py (renamed from cobbler/profile.py)12
-rw-r--r--cobbler/item_system.py (renamed from cobbler/system.py)6
-rw-r--r--cobbler/msg.py8
-rw-r--r--cobbler/serializable.py6
-rw-r--r--cobbler/serializer.py8
-rw-r--r--cobbler/settings.py21
-rw-r--r--cobbler/sync.py2
-rw-r--r--cobbler/utils.py8
-rw-r--r--setup.py2
-rw-r--r--tests/tests.py13
19 files changed, 137 insertions, 88 deletions
diff --git a/cobbler.conf b/cobbler.conf
deleted file mode 100644
index f41ed35..0000000
--- a/cobbler.conf
+++ /dev/null
@@ -1,11 +0,0 @@
----
-config:
- httpd_bin: /usr/sbin/httpd
- pxelinux: /usr/lib/syslinux/pxelinux.0
- dhcpd_conf: /etc/dhcpd.conf
- tftpd_bin: /usr/sbin/in.tftpd
- server: localhost
- dhcpd_bin: /usr/sbin/dhcpd
- kernel_options: append devfs=nomount ramdisk_size=16438 lang= vga=788 ksdevice=eth0
- tftpd_conf: /etc/xinetd.d/tftp
- tftpboot: /tftpboot
diff --git a/cobbler.pod b/cobbler.pod
index 9d7ba72..e99968a 100644
--- a/cobbler.pod
+++ b/cobbler.pod
@@ -94,11 +94,7 @@ TBA
=head1 CONFIGURATION FILES
-The current cobbler configuration is kept in /var/lib/cobbler/cobbler.conf. The file is reasonably-human editable YAML.
-
-Global settings are in /etc/cobbler.conf. After editing /etc/cobbler.conf, run 'cobbler check' to ensure that no errors were introduced.
-
-If you happen to screw up /var/lib/cobbler/cobbler.conf or /etc/cobbler.conf, you can delete them and they will be recreated.
+The current cobbler configuration is kept under /var/lib/cobbler. The files are reasonably-human editable YAML and will generate themselves if they don't exist. If you break one of them, delete it.
No changes are ever applied to the provisioning state unless 'cobbler sync' is run.
diff --git a/cobbler/api.py b/cobbler/api.py
index 4d93da2..318dc51 100644
--- a/cobbler/api.py
+++ b/cobbler/api.py
@@ -13,7 +13,7 @@ import config
import utils
import sync
import check
-
+
_config = config.Config()
class BootAPI:
@@ -22,17 +22,19 @@ class BootAPI:
def __init__(self):
"""
Constructor...
- """
-
+ """
+ self.debug = 1
# FIXME: deserializer/serializer error
# handling probably not up to par yet
- _config.deserialize()
+ self.deserialize()
def clear(self):
"""
Forget about current list of profiles, distros, and systems
"""
+ if self.debug:
+ print "BootAPI::clear"
_config.clear()
@@ -40,6 +42,8 @@ class BootAPI:
"""
Return the current list of systems
"""
+ if self.debug:
+ print "BootAPI::systems"
return _config.systems()
@@ -47,6 +51,8 @@ class BootAPI:
"""
Return the current list of profiles
"""
+ if self.debug:
+ print "BootAPI::profiles"
return _config.profiles()
@@ -54,6 +60,8 @@ class BootAPI:
"""
Return the current list of distributions
"""
+ if self.debug:
+ print "BootAPI::distros"
return _config.distros()
@@ -61,6 +69,8 @@ class BootAPI:
"""
Return a blank, unconfigured system, unattached to a collection
"""
+ if self.debug:
+ print "BootAPI::new_system"
return _config.new_system()
@@ -68,6 +78,8 @@ class BootAPI:
"""
Create a blank, unconfigured distro, unattached to a collection.
"""
+ if self.debug:
+ print "BootAPI::new_distro"
return _config.new_distro()
@@ -75,6 +87,8 @@ class BootAPI:
"""
Create a blank, unconfigured profile, unattached to a collection
"""
+ if self.debug:
+ print "BootAPI::new_profile"
return _config.new_profile()
def check(self):
@@ -86,7 +100,9 @@ class BootAPI:
for human admins, who may, for instance, forget to properly set up
their TFTP servers for PXE, etc.
"""
- return check.bootcheck(_config).run()
+ if self.debug:
+ print "BootAPI::check"
+ return check.BootCheck(_config).run()
def sync(self,dry_run=True):
@@ -96,22 +112,30 @@ class BootAPI:
/tftpboot. Any operations done in the API that have not been
saved with serialize() will NOT be synchronized with this command.
"""
+ if self.debug:
+ print "BootAPI::sync"
# config.deserialize(); # neccessary?
- return sync.bootsync(_config).sync(dry_run)
+ return sync.BootSync(_config).sync(dry_run)
def serialize(self):
"""
Save the config file(s) to disk.
"""
+ if self.debug:
+ print "BootAPI::serialize"
_config.serialize()
def deserialize(self):
"""
Load the current configuration from config file(s)
"""
+ if self.debug:
+ print "BootAPI::deserialize"
_config.deserialize()
def last_error(self):
+ if self.debug:
+ print "BootAPI::last_error"
return utils.last_error()
diff --git a/cobbler/collection.py b/cobbler/collection.py
index 708bb98..c02d10c 100644
--- a/cobbler/collection.py
+++ b/cobbler/collection.py
@@ -1,11 +1,13 @@
import serializable
+import utils
+import msg
"""
Base class for any serializable lists of things...
"""
class Collection(serializable.Serializable):
- def class_container(self):
+ def factory_produce(self):
raise exceptions.NotImplementedError
def filename(self):
@@ -16,10 +18,13 @@ class Collection(serializable.Serializable):
Constructor.
"""
self.config = config
+ self.debug = 1
self.clear()
-
+
def clear(self):
+ if self.debug:
+ print "Collection::clear"
self.listing = {}
def find(self,name):
@@ -27,6 +32,8 @@ class Collection(serializable.Serializable):
Return anything named 'name' in the collection, else return None if
no objects can be found.
"""
+ if self.debug:
+ print "Collection::find(%s)" % name
if name in self.listing.keys():
return self.listing[name]
return None
@@ -36,12 +43,20 @@ class Collection(serializable.Serializable):
"""
Serialize the collection
"""
+ if self.debug:
+ print "Collection::to_datastruct"
datastruct = [x.to_datastruct() for x in self.listing.values()]
+ return datastruct
def from_datastruct(self,datastruct):
- container = self.class_container()
+ if self.debug:
+ print "Collection::from_datastruct(%s)" % datastruct
+ if datastruct is None:
+ print "DEBUG: from_datastruct -> None, skipping"
+ return
+ print "DEBUG: from_datastruct: %s" % datastruct
for x in datastruct:
- item = container(x,self.config)
+ item = self.factory_produce(self.config)
self.add(item)
def add(self,ref):
@@ -51,6 +66,8 @@ class Collection(serializable.Serializable):
object specified by ref deems itself invalid (and therefore
won't be added to the collection).
"""
+ if self.debug:
+ print "Collection::add(%s)" % ref
if ref is None or not ref.is_valid():
if utils.last_error() is None or utils.last_error() == "":
utils.set_error("bad_param")
@@ -65,16 +82,20 @@ class Collection(serializable.Serializable):
for reading by humans or parsing from scripts. Actually scripts
would be better off reading the YAML in the config files directly.
"""
+ if self.debug:
+ print "Collection::printable"
values = map(lambda(a): a.printable(), sorted(self.listing.values()))
if len(values) > 0:
return "\n\n".join(values)
else:
- return m("empty_list")
+ return msg.m("empty_list")
def __iter__(self):
"""
Iterator for the collection. Allows list comprehensions, etc
"""
+ if self.debug:
+ print "Collection::__iter__"
for a in self.listing.values():
yield a
@@ -82,5 +103,7 @@ class Collection(serializable.Serializable):
"""
Returns size of the collection
"""
+ if self.debug:
+ print "Collection::__len__"
return len(self.listing.values())
diff --git a/cobbler/distros.py b/cobbler/collection_distros.py
index f60f776..66472bf 100644
--- a/cobbler/distros.py
+++ b/cobbler/collection_distros.py
@@ -1,7 +1,8 @@
-import distro
+
import utils
-import profiles
import collection
+import item_distro as distro
+import collection_profiles as profiles
"""
A distro represents a network bootable matched set of kernels
@@ -9,8 +10,8 @@ and initrd files
"""
class Distros(collection.Collection):
- def class_container(self):
- return distro.Distro
+ def factory_produce(self,config):
+ return distro.Distro(config)
def filename(self):
return "/var/lib/cobbler/distros"
diff --git a/cobbler/profiles.py b/cobbler/collection_profiles.py
index 972ba23..cc23c12 100644
--- a/cobbler/profiles.py
+++ b/cobbler/collection_profiles.py
@@ -12,8 +12,8 @@ additional options, with client-side defaults (not kept here).
"""
class Profiles(collection.Collection):
- def class_container(self):
- return profile.Profile
+ def factory_produce(self,config):
+ return profile.Profile(config)
def filename(self):
return "/var/lib/cobbler/profiles"
diff --git a/cobbler/systems.py b/cobbler/collection_systems.py
index dc25096..2edad6a 100644
--- a/cobbler/systems.py
+++ b/cobbler/collection_systems.py
@@ -1,4 +1,4 @@
-import system
+import item_system as system
import utils
import collection
@@ -10,8 +10,8 @@ they belong to.
"""
class Systems(collection.Collection):
- def class_container(self):
- return system.System
+ def factory_produce(self,config):
+ return system.System(config)
def filename(self):
return "/var/lib/cobbler/systems"
diff --git a/cobbler/config.py b/cobbler/config.py
index 27c33bd..bb2e454 100644
--- a/cobbler/config.py
+++ b/cobbler/config.py
@@ -1,15 +1,16 @@
"""
Config.py is a repository of the Cobbler object model
"""
+import os
import weakref
-import distro
-import profile
-import system
+import item_distro as distro
+import item_profile as profile
+import item_system as system
-import distros
-import profiles
-import systems
+import collection_distros as distros
+import collection_profiles as profiles
+import collection_systems as systems
import settings
import serializer
@@ -17,22 +18,23 @@ import serializer
class Config:
def __init__(self):
- # manage a definitive copy of all data collections with weakrefs
+ # manage a definitive copy of all data collections with weakrefs
# back here so they can understand each other
self._distros = distros.Distros(weakref.proxy(self))
self._profiles = profiles.Profiles(weakref.proxy(self))
self._systems = systems.Systems(weakref.proxy(self))
- self._settings = settings.Settings() # not a true collection
+ self._settings = settings.Settings() # not a true collection
self._classes = [
self._distros,
self._profiles,
self._systems,
self._settings,
]
+ self.file_check()
def distros(self):
return self._distros
-
+
def profiles(self):
return self._profiles
@@ -40,14 +42,14 @@ class Config:
return self._systems
def settings(self):
- return self._app_settings
+ return self._settings
def new_distro(self):
return distro.Distro(weakref.proxy(self))
def new_system(self):
return system.System(weakref.proxy(self))
-
+
def new_profile(self):
return profile.Profile(weakref.proxy(self))
@@ -55,6 +57,11 @@ class Config:
for x in self._classes:
x.clear()
+ def file_check(self):
+ for x in self._classes:
+ if not os.path.exists(x.filename()):
+ serializer.serialize(x)
+
def serialize(self):
for x in self._classes:
serializer.serialize(x)
@@ -62,4 +69,4 @@ class Config:
def deserialize(self):
for x in self._classes:
serializer.deserialize(x)
-
+
diff --git a/cobbler/distro.py b/cobbler/item_distro.py
index ef2f1df..1c1a8d4 100644
--- a/cobbler/distro.py
+++ b/cobbler/item_distro.py
@@ -1,6 +1,7 @@
import utils
import item
import weakref
+import os
class Distro(item.Item):
@@ -14,7 +15,7 @@ class Distro(item.Item):
self.initrd = None
self.kernel_options = ""
- def from_datastruct(seed_data):
+ def from_datastruct(self,seed_data):
self.name = seed_data['name']
self.kernel = seed_data['kernel']
self.initrd = seed_data['initrd']
diff --git a/cobbler/profile.py b/cobbler/item_profile.py
index 592cbcb..09772a9 100644
--- a/cobbler/profile.py
+++ b/cobbler/item_profile.py
@@ -1,6 +1,8 @@
import utils
+import item
+from msg import *
-class Profile(Item):
+class Profile(item.Item):
def __init__(self,config):
self.config = config
@@ -17,7 +19,7 @@ class Profile(Item):
self.xen_mac = ''
self.xen_paravirt = True
- def from_datastruct(seed_data)
+ def from_datastruct(self,seed_data):
self.name = seed_data['name']
self.distro = seed_data['distro']
self.kickstart = seed_data['kickstart']
@@ -35,10 +37,10 @@ class Profile(Item):
Sets the distro. This must be the name of an existing
Distro object in the Distros collection.
"""
- if self.api.distros().find(distro_name):
+ if self.config.distros().find(distro_name):
self.distro = distro_name
return True
- self.last_error = m("no_distro")
+ utils.set_error("no_distro")
return False
def set_kickstart(self,kickstart):
@@ -49,7 +51,7 @@ class Profile(Item):
if utils.find_kickstart(kickstart):
self.kickstart = kickstart
return True
- self.last_error = m("no_kickstart")
+ utils.set_error("no_kickstart")
return False
def set_xen_name(self,str):
diff --git a/cobbler/system.py b/cobbler/item_system.py
index 9e5e5c6..e489e4b 100644
--- a/cobbler/system.py
+++ b/cobbler/item_system.py
@@ -12,7 +12,7 @@ class System(item.Item):
self.profile = None # a name, not a reference
self.kernel_options = ""
- def from_datastruct(seed_data):
+ def from_datastruct(self,seed_data):
self.name = seed_data['name']
self.profile = seed_data['profile']
self.kernel_options = seed_data['kernel_options']
@@ -25,7 +25,7 @@ class System(item.Item):
"""
new_name = utils.find_system_identifier(name)
if new_name is None or new_name == False:
- utils.last_error = m("bad_sys_name")
+ utils.set_error("bad_sys_name")
return False
self.name = name # we check it add time, but store the original value.
return True
@@ -45,7 +45,7 @@ class System(item.Item):
A system is valid when it contains a valid name and a profile.
"""
if self.name is None:
- utils.last_error = m("bad_sys_name")
+ utils.set_error("bad_sys_name")
return False
if self.profile is None:
return False
diff --git a/cobbler/msg.py b/cobbler/msg.py
index dc6211a..ac7ffa1 100644
--- a/cobbler/msg.py
+++ b/cobbler/msg.py
@@ -7,7 +7,7 @@ be reused and potentially translated.
"""
msg_table = {
- "bad_server" : "server field in /etc/cobbler.conf must be set to something other than localhost, or kickstarts will fail",
+ "bad_server" : "server field in /var/lib/cobbler/settings must be set to something other than localhost, or kickstarts will fail",
"parse_error" : "could not read %s, replacing...",
"no_create" : "cannot create: %s",
"no_args" : "this command requires arguments.",
@@ -27,8 +27,8 @@ msg_table = {
"chg_attrib" : "need to change '%s' to '%s' in '%s'",
"no_exist" : "%s does not exist",
"no_line" : "file '%s' should have a line '%s' somewhere",
- "no_dir2" : "can't find %s for %s in cobbler.conf",
- "no_cfg" : "could not find a valid /etc/cobbler.conf, rebuilding",
+ "no_dir2" : "can't find %s for %s as referenced in /var/lib/cobbler/settings",
+ "no_cfg" : "could not find a valid /var/lib/cobbler/settings, rebuilding",
"bad_param" : "at least one parameter is missing for this function",
"empty_list" : "(Empty)",
"err_resolv" : "system (%s) did not resolve",
@@ -47,7 +47,7 @@ msg_table = {
"check_ok" : """
No setup problems found.
-Manual editing of /etc/dhcpd.conf and /etc/cobbler.conf is suggested to tailor them to your specific configuration. Your dhcpd.conf has some PXE related information in it, but it's imposible to tell automatically that it's totally correct in a general sense. We'll leave this up to you.
+Manual editing of /var/lib/cobbler/settings and dhcpd.conf is suggested to tailor them to your specific configuration. Your dhcpd.conf has some PXE related information in it, but it's imposible to tell automatically that it's totally correct in a general sense. We'll leave this up to you.
Good luck.
""",
diff --git a/cobbler/serializable.py b/cobbler/serializable.py
index de1d171..7daa81a 100644
--- a/cobbler/serializable.py
+++ b/cobbler/serializable.py
@@ -2,12 +2,12 @@ import exceptions
class Serializable:
- def filename():
+ def filename(self):
return None
- def from_datastruct(datastruct):
+ def from_datastruct(self,datastruct):
raise exceptions.NotImplementedError
- def to_datastruct():
+ def to_datastruct(self):
raise exceptions.NotImplementedError
diff --git a/cobbler/serializer.py b/cobbler/serializer.py
index 112025e..e2c235a 100644
--- a/cobbler/serializer.py
+++ b/cobbler/serializer.py
@@ -10,8 +10,8 @@ def serialize(obj):
raise Exception("not serializable")
fd = open(obj.filename(),"w+")
datastruct = obj.to_datastruct()
- yaml = syck.dump(datastruct)
- fd.write(yaml)
+ encoded = syck.dump(datastruct)
+ fd.write(encoded)
fd.close()
return True
@@ -22,9 +22,9 @@ def deserialize(obj):
fd = open(obj.filename(),"r")
except:
print msg.m("parse_error") % obj.filename()
- return
+ return
data = fd.read()
- datastruct = yaml.load(data)
+ datastruct = syck.load(data)
fd.close()
obj.from_datastruct(datastruct)
return True
diff --git a/cobbler/settings.py b/cobbler/settings.py
index 79b09e1..99ebd7d 100644
--- a/cobbler/settings.py
+++ b/cobbler/settings.py
@@ -5,7 +5,7 @@ Cobbler app-wide settings
"""
class Settings(serializable.Serializable):
-
+
def filename(self):
return "/var/lib/cobbler/settings"
@@ -22,18 +22,21 @@ class Settings(serializable.Serializable):
"dhcpd_bin" : "/usr/sbin/dhcpd",
"kernel_options" : "append devfs=nomount ramdisk_size=16438 lang= vga=788 ksdevice=eth0",
"tftpd_conf" : "/etc/xinetd.d/tftp",
- "tftpboot" : "/tftpboot",
- }
-
+ "tftpboot" : "/tftpboot",
+ }
+
- def to_datastruct():
- return self._attributes()
+ def to_datastruct(self):
+ return self._attributes
- def from_datastruct(datastruct):
- self._attributes = datastruct
+ def from_datastruct(self,datastruct):
+ if datastruct is None:
+ print "DEBUG: not loading empty structure"
+ return
+ self._attributes = datastruct
def __getattr__(self,name):
- if name in self._attributes:
+ if self._attributes.has_key(name):
return self._attributes[name]
else:
raise AttributeError, name
diff --git a/cobbler/sync.py b/cobbler/sync.py
index 76dfb38..9e51718 100644
--- a/cobbler/sync.py
+++ b/cobbler/sync.py
@@ -25,7 +25,7 @@ class BootSync:
self.distros = config.distros
self.profiles = config.profiles
self.systems = config.systems
- self.settings = config.settings
+ self.settings = config.settings
def sync(self,dry_run=False,verbose=True):
diff --git a/cobbler/utils.py b/cobbler/utils.py
index 5a5f6fe..f6ab675 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -8,6 +8,8 @@ import socket
import glob
import subprocess
+import msg
+
re_kernel = re.compile(r'vmlinuz-(\d+)\.(\d+)\.(\d+)-(.*)')
re_initrd = re.compile(r'initrd-(\d+)\.(\d+)\.(\d+)-(.*).img')
_last_error = ""
@@ -19,7 +21,7 @@ def set_error(strmsg):
_last_error = msg.m(strmsg)
def get_host_ip(ip):
- handle = subprocess.Popen("/usr/bin/gethostip %s" % ip, shell=True, stdout=subprocess.PIPE)
+ handle = subprocess.Popen("/usr/bin/gethostip %s" % ip, shell=True, stdout=subprocess.PIPE)
out = handle.stdout
results = out.read()
return results.split(" ")[-1]
@@ -121,8 +123,8 @@ def find_kernel(path):
return path
elif filename == "vmlinuz":
return path
- elif os.path.isdir(path):
- return find_highest_files(path,"vmlinuz",re_kernel)
+ elif os.path.isdir(path):
+ return find_highest_files(path,"vmlinuz",re_kernel)
return None
diff --git a/setup.py b/setup.py
index 2a05cea..c477095 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,6 @@ Cobbler is a command line tool for simplified configuration of boot/provisioning
if __name__ == "__main__":
# docspath="share/doc/koan-%s/" % VERSION
manpath="share/man/man1/"
- etcpath="etc/"
setup(
name="cobbler",
version = VERSION,
@@ -28,7 +27,6 @@ if __name__ == "__main__":
data_files = [
# (docspath, ['README']),
(manpath, ['cobbler.1.gz'])
- (etcpath, ['cobbler.conf'])
],
description = SHORT_DESC,
long_description = LONG_DESC
diff --git a/tests/tests.py b/tests/tests.py
index e5bcb54..6c906bb 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -15,6 +15,7 @@ sys.path.append('./cobbler')
import api
import config
+import utils
FAKE_INITRD="initrd-2.6.15-1.2054_FAKE.img"
FAKE_INITRD2="initrd-2.5.16-2.2055_FAKE.img"
@@ -27,10 +28,11 @@ FAKE_KICKSTART="http://127.0.0.1/fake.ks"
cleanup_dirs = []
class BootTest(unittest.TestCase):
-
+
def setUp(self):
# Create temp dir
- self.topdir = tempfile.mkdtemp(prefix="_cobbler-",dir="/tmp")
+ #self.topdir = tempfile.mkdtemp(prefix="_cobbler-",dir="/tmp")
+ self.topdir = "/tmp" # only for refactoring, fix later
print "using dir = %s" % self.topdir
self.fk_initrd = os.path.join(self.topdir, FAKE_INITRD)
self.fk_initrd2 = os.path.join(self.topdir, FAKE_INITRD2)
@@ -39,7 +41,7 @@ class BootTest(unittest.TestCase):
self.fk_kernel = os.path.join(self.topdir, FAKE_KERNEL)
self.fk_kernel2 = os.path.join(self.topdir, FAKE_KERNEL2)
self.fk_kernel3 = os.path.join(self.topdir, FAKE_KERNEL3)
-
+
self.api = api.BootAPI()
self.hostname = os.uname()[1]
create = [ self.fk_initrd, self.fk_initrd2, self.fk_initrd3,
@@ -49,7 +51,8 @@ class BootTest(unittest.TestCase):
self.make_basic_config()
def tearDown(self):
- shutil.rmtree(self.topdir,ignore_errors=True)
+ # only off during refactoring, fix later
+ # shutil.rmtree(self.topdir,ignore_errors=True)
self.api = None
def make_basic_config(self):
@@ -76,7 +79,7 @@ class BootTest(unittest.TestCase):
class Utilities(BootTest):
def _expeq(self, expected, actual):
- self.failUnlessEqual(expected, actual,
+ self.failUnlessEqual(expected, actual,
"Expected: %s; actual: %s" % (expected, actual))
def test_kernel_scan(self):