diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-04-18 17:45:24 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-04-18 17:45:24 -0400 |
commit | bb84177f0e5b3de18afc12378ec18d089170a10e (patch) | |
tree | 7992696e1fb60c4857309524aaba2eaac36df627 | |
parent | efbcc041464733e90af670a5d1dfe13e70aaa05c (diff) | |
download | third_party-cobbler-bb84177f0e5b3de18afc12378ec18d089170a10e.tar.gz third_party-cobbler-bb84177f0e5b3de18afc12378ec18d089170a10e.tar.xz third_party-cobbler-bb84177f0e5b3de18afc12378ec18d089170a10e.zip |
Fix some things found by the tests and also update the tests
to not look for static files
-rw-r--r-- | cobbler/action_litesync.py | 10 | ||||
-rw-r--r-- | tests/tests.py | 4 |
2 files changed, 3 insertions, 11 deletions
diff --git a/cobbler/action_litesync.py b/cobbler/action_litesync.py index 3a2de8e..89e24b4 100644 --- a/cobbler/action_litesync.py +++ b/cobbler/action_litesync.py @@ -56,8 +56,6 @@ class BootLiteSync: distro = self.distros.find(name=name) if distro is None: raise CX(_("error in distro lookup: %s") % name) - # generate YAML file in distros/$name in webdir - self.sync.write_distro_file(distro) # copy image files to images/$name in webdir & tftpboot: self.sync.copy_single_distro_files(distro) # cascade sync @@ -67,8 +65,6 @@ class BootLiteSync: def remove_single_distro(self, name): bootloc = utils.tftpboot_location() - # delete distro YAML file in distros/$name in webdir - utils.rmfile(os.path.join(self.settings.webdir, "distros", name)) # delete contents of images/$name directory in webdir utils.rmtree(os.path.join(self.settings.webdir, "images", name)) # delete contents of images/$name in tftpboot @@ -81,8 +77,6 @@ class BootLiteSync: profile = self.profiles.find(name=name) if profile is None: raise CX(_("error in profile lookup")) - # rebuild profile_list YAML file in webdir - self.sync.write_profile_file(profile) # rebuild the yum configuration files for any attached repos self.sync.retemplate_yum_repos(profile,True) # cascade sync @@ -113,7 +107,7 @@ class BootLiteSync: # rebuild system_list file in webdir self.sync.regen_ethers() # /etc/ethers, for dnsmasq & rarpd self.sync.regen_hosts() # /var/lib/cobbler/cobbler_hosts, pretty much for dnsmasq - # write the PXE and YAML files for the system + # write the PXE files for the system self.sync.write_all_system_files(system) # per system kickstarts self.sync.retemplate_yum_repos(system,False) @@ -121,8 +115,6 @@ class BootLiteSync: def remove_single_system(self, name): bootloc = utils.tftpboot_location() system_record = self.systems.find(name=name) - # delete system YAML file in systems/$name in webdir - utils.rmfile(os.path.join(self.settings.webdir, "systems", name)) # delete contents of kickstarts_sys/$name in webdir system_record = self.systems.find(name=name) # delete any kickstart files related to this system diff --git a/tests/tests.py b/tests/tests.py index 8536a70..bb64dd1 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -743,7 +743,7 @@ class SyncContents(BootTest): fh = open("/tftpboot/pxelinux.cfg/%s" % converted) data = fh.read() - self.assertTrue(data.find("kickstarts_sys") != -1) + self.assertTrue(data.find("op=ks") != -1) fh.close() # ensure that after sync is applied, the blender cache still allows @@ -753,7 +753,7 @@ class SyncContents(BootTest): self.api.sync() fh = open("/tftpboot/pxelinux.cfg/%s" % converted) data = fh.read() - self.assertTrue(data.find("kickstarts_sys") != -1) + self.assertTrue(data.find("op=ks") != -1) fh.close() |