diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-07-26 17:45:10 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-07-26 17:45:10 -0400 |
commit | 63008ccf38a24aaf7304a81a1170603d1000b174 (patch) | |
tree | ab06af18b97fc6ab934cc53137625e55c887b6fe /cobbler | |
parent | 749c94d69b5cab6b217758af303fa41dcc9aa71f (diff) | |
download | third_party-cobbler-63008ccf38a24aaf7304a81a1170603d1000b174.tar.gz third_party-cobbler-63008ccf38a24aaf7304a81a1170603d1000b174.tar.xz third_party-cobbler-63008ccf38a24aaf7304a81a1170603d1000b174.zip |
Added kickstart validation code to cobbler + documentation.
Diffstat (limited to 'cobbler')
-rw-r--r-- | cobbler/api.py | 13 | ||||
-rwxr-xr-x | cobbler/cobbler.py | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/cobbler/api.py b/cobbler/api.py index 58f1046..a061b68 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -22,6 +22,7 @@ import action_enchant import action_import import action_reposync import action_status +import action_validate class BootAPI: @@ -117,6 +118,18 @@ class BootAPI: check = action_check.BootCheck(self._config) return check.run() + def validateks(self): + """ + Use ksvalidator (from pykickstart, if available) to determine + whether the cobbler kickstarts are going to be (likely) well + accepted by Anaconda. Presence of an error does not indicate + the kickstart is bad, only that the possibility exists. ksvalidator + is not available on all platforms and can not detect "future" + kickstart format correctness. + """ + validator = action_validate.Validate(self._config) + return validator.run() + def sync(self): """ Take the values currently written to the configuration files in diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py index b604e01..4b0fba6 100755 --- a/cobbler/cobbler.py +++ b/cobbler/cobbler.py @@ -84,6 +84,7 @@ class BootCLI: } self.commands['toplevel'] = { 'check' : self.check, + 'validateks' : self.validateks, 'list' : self.list, 'report' : self.report, 'distros' : self.distro, @@ -580,6 +581,12 @@ class BootCLI: self.api.reposync() return True + def validateks(self,args): + """ + Scan rendered kickstarts for potential errors, before actual install + """ + return self.api.validateks() + def check(self,args): """ Check system for network boot decency/prereqs: 'cobbler check' |