summaryrefslogtreecommitdiffstats
path: root/cobbler/api.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-05-09 12:30:53 -0400
committerJim Meyering <jim@meyering.net>2006-05-09 12:30:53 -0400
commit4494a9f367838913f1898faef81ba27a849008aa (patch)
tree950b946f154f40a754a62a94a0536e9e5b32922d /cobbler/api.py
parent804a564ac24ff22cd46583fa98d8140a8b10f476 (diff)
downloadthird_party-cobbler-4494a9f367838913f1898faef81ba27a849008aa.tar.gz
third_party-cobbler-4494a9f367838913f1898faef81ba27a849008aa.tar.xz
third_party-cobbler-4494a9f367838913f1898faef81ba27a849008aa.zip
Simplified the command line, made a better 'list' function, some string and exception
cleanup.
Diffstat (limited to 'cobbler/api.py')
-rw-r--r--cobbler/api.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/cobbler/api.py b/cobbler/api.py
index d15abb9..d4dfd10 100644
--- a/cobbler/api.py
+++ b/cobbler/api.py
@@ -67,6 +67,12 @@ class BootAPI:
"""
return self.__api_call(lambda: self._config.distros())
+ def settings(self):
+ """
+ Return the application configuration
+ """
+ return self.__api_call(lambda: self._config.settings())
+
def new_system(self):
"""
@@ -97,17 +103,19 @@ class BootAPI:
for human admins, who may, for instance, forget to properly set up
their TFTP servers for PXE, etc.
"""
- return self.__api_call(lambda: action_check.BootCheck(self._config).run())
+ check = action_check.BootCheck(self._config)
+ return self.__api_call(lambda: check.run())
- def sync(self,dry_run=True):
+ def sync(self,dryrun=True):
"""
Take the values currently written to the configuration files in
/etc, and /var, and build out the information tree found in
/tftpboot. Any operations done in the API that have not been
saved with serialize() will NOT be synchronized with this command.
"""
- return self.__api_call(lambda: action_sync.BootSync(self._config).sync(dry_run))
+ sync = action_sync.BootSync(self._config)
+ return self.__api_call(lambda: sync.run(dryrun=dryrun))
def serialize(self):