summaryrefslogtreecommitdiffstats
path: root/cobbler/systems.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/systems.py')
-rw-r--r--cobbler/systems.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/cobbler/systems.py b/cobbler/systems.py
new file mode 100644
index 0000000..47dc042
--- /dev/null
+++ b/cobbler/systems.py
@@ -0,0 +1,22 @@
+import system
+import runtime
+
+#--------------------------------------------
+
+"""
+Systems are hostnames/MACs/IP names and the associated profile
+they belong to.
+"""
+class Systems(Collection):
+ _item_factory = system.System
+
+ def remove(self,name):
+ """
+ Remove element named 'name' from the collection
+ """
+ if self.find(name):
+ del self.listing[name]
+ return True
+ runtime.set_error("delete_nothing")
+ return False
+