From 4494a9f367838913f1898faef81ba27a849008aa Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 9 May 2006 12:30:53 -0400 Subject: Simplified the command line, made a better 'list' function, some string and exception cleanup. --- cobbler/api.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'cobbler/api.py') 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): -- cgit