summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-07-03 16:56:09 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-07-03 16:56:09 -0400
commit5912d0d3ee22003be78790656c99123597ab3a65 (patch)
treee4bea4c58472005654e0b1cbf2c86a20f7126e42
parente4b5e6e0ff363401a07c692cd76717a3d8b4b3fe (diff)
downloadthird_party-cobbler-5912d0d3ee22003be78790656c99123597ab3a65.zip
third_party-cobbler-5912d0d3ee22003be78790656c99123597ab3a65.tar.gz
third_party-cobbler-5912d0d3ee22003be78790656c99123597ab3a65.tar.xz
More fixes to repo/image delete code
-rw-r--r--cobbler/api.py4
-rw-r--r--cobbler/collection_repos.py2
-rw-r--r--cobbler/collection_systems.py2
-rw-r--r--cobbler/remote.py3
4 files changed, 5 insertions, 6 deletions
diff --git a/cobbler/api.py b/cobbler/api.py
index 9f4a636..70cc73b 100644
--- a/cobbler/api.py
+++ b/cobbler/api.py
@@ -175,11 +175,11 @@ class BootAPI:
self.log("remove_profile",[ref.name])
return self._config.profiles().remove(ref.name, recursive=recursive)
- def remove_system(self,ref):
+ def remove_system(self,ref,recursive=False):
self.log("remove_system",[ref.name])
return self._config.systems().remove(ref.name)
- def remove_repo(self, ref):
+ def remove_repo(self, ref,recursive=False):
self.log("remove_repo",[ref.name])
return self._config.repos().remove(ref.name)
diff --git a/cobbler/collection_repos.py b/cobbler/collection_repos.py
index 91e0667..78681b5 100644
--- a/cobbler/collection_repos.py
+++ b/cobbler/collection_repos.py
@@ -36,7 +36,7 @@ class Repos(collection.Collection):
"""
return repo.Repo(config).from_datastruct(seed_data)
- def remove(self,name,with_delete=True,with_sync=True,with_triggers=True):
+ def remove(self,name,with_delete=True,with_sync=True,with_triggers=True,recursive=False):
"""
Remove element named 'name' from the collection
"""
diff --git a/cobbler/collection_systems.py b/cobbler/collection_systems.py
index 8a967be..f6ec141 100644
--- a/cobbler/collection_systems.py
+++ b/cobbler/collection_systems.py
@@ -33,7 +33,7 @@ class Systems(collection.Collection):
"""
return system.System(config).from_datastruct(seed_data)
- def remove(self,name,with_delete=True,with_sync=True,with_triggers=True):
+ def remove(self,name,with_delete=True,with_sync=True,with_triggers=True,recursive=False):
"""
Remove element named 'name' from the collection
"""
diff --git a/cobbler/remote.py b/cobbler/remote.py
index 38912fc..d965c15 100644
--- a/cobbler/remote.py
+++ b/cobbler/remote.py
@@ -1018,7 +1018,7 @@ class CobblerReadWriteXMLRPCInterface(CobblerXMLRPCInterface):
files[x.kickstart] = 1
return files.keys()
- def remove_system(self,name,token,recursive=1):
+ def remove_system(self,name,token,recursive=1):
"""
Deletes a system from a collection. Note that this just requires the name
of the distro, not a handle.
@@ -1038,7 +1038,6 @@ class CobblerReadWriteXMLRPCInterface(CobblerXMLRPCInterface):
rc = self.api._config.repos().remove(name,recursive=True)
return rc
-
def read_or_write_kickstart_template(self,kickstart_file,is_read,new_data,token):
"""
Allows the WebUI to be used as a kickstart file editor. For security