From 11155bcb62ea986106cafcbfdb4ddef7b4167399 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 25 Sep 2008 16:21:12 -0400 Subject: (A) add --arch back to distro edit in CLI (functionality wise), (B) fix merge error in remote.py keeping profile remove from UI/XMLRPC from working. --- CHANGELOG | 2 ++ cobbler/modules/cli_distro.py | 2 ++ cobbler/remote.py | 13 ++++--------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 71d906dc..454e2dd9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,8 @@ Cobbler CHANGELOG - ??? - 1.2.5 (pending) - (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) - Mon Sep 08 2008 - 1.2.4 - (BUGF) simple rebuild to remove cli_report.py, which is not in git diff --git a/cobbler/modules/cli_distro.py b/cobbler/modules/cli_distro.py index 5b7655d7..de1d1c06 100644 --- a/cobbler/modules/cli_distro.py +++ b/cobbler/modules/cli_distro.py @@ -88,6 +88,8 @@ class DistroFunction(commands.CobblerFunction): return True if not "dumpvars" in self.args: + if self.options.arch: + obj.set_arch(self.options.arch) if self.options.kernel: obj.set_kernel(self.options.kernel) if self.options.initrd: diff --git a/cobbler/remote.py b/cobbler/remote.py index dcff604d..02ba3c50 100644 --- a/cobbler/remote.py +++ b/cobbler/remote.py @@ -1174,15 +1174,10 @@ class CobblerReadWriteXMLRPCInterface(CobblerXMLRPCInterface): """ Deletes a profile from a collection. Note that this just requires the name """ - self.check_access(token, "get_kickstart_templates") - files = {} - for x in self.api.profiles(): - if x.kickstart is not None and x.kickstart != "" and x.kickstart != "<>": - files[x.kickstart] = 1 - for x in self.api.systems(): - if x.kickstart is not None and x.kickstart != "" and x.kickstart != "<>": - files[x.kickstart] = 1 - return files.keys() + self.log("remove_profile (%s)" % recursive,name=name,token=token) + self.check_access(token, "remove_profile", name) + rc = self.api._config.profiles().remove(name,recursive=True) + return rc def remove_system(self,name,token,recursive=1): """ -- cgit