summaryrefslogtreecommitdiffstats
path: root/cobbler/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/settings.py')
-rw-r--r--cobbler/settings.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/cobbler/settings.py b/cobbler/settings.py
new file mode 100644
index 0000000..2a7553f
--- /dev/null
+++ b/cobbler/settings.py
@@ -0,0 +1,34 @@
+"""
+Cobbler app-wide settings
+"""
+
+class Settings(Serializable)
+
+ def filename(self):
+ return "/var/lib/cobbler/settings"
+
+ def __init__(self):
+
+ self._attributes = {
+ "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",
+ }
+
+ def to_datastruct():
+ return self._attributes()
+
+ def from_datastruct(datastruct):
+ self._attributes = datastruct
+
+ def __getattr__(self,name):
+ if name in self._attributes:
+ return self._attributes[name]
+ else:
+ raise AttributeError, name