diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-07-27 13:34:01 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-07-27 13:34:01 -0400 |
commit | dd05c92699e657990c77af311b85fbef30472c11 (patch) | |
tree | 25eed399bd27ddcb867c19c1db3724e0e0a92a42 /cobbler/api.py | |
parent | 31a8dfef9c42b77a17ba09d92651cf222b525a00 (diff) | |
download | third_party-cobbler-dd05c92699e657990c77af311b85fbef30472c11.tar.gz third_party-cobbler-dd05c92699e657990c77af311b85fbef30472c11.tar.xz third_party-cobbler-dd05c92699e657990c77af311b85fbef30472c11.zip |
Added a SNIPPET::foo feature which can do the equivalent of %include in kickstart without the need
for a wget and http hosting.
Snippets live in /var/lib/cobbler/snippets -- Cobbler ships with only one snippet now (as a demo), though
users can create as many as they want.
Diffstat (limited to 'cobbler/api.py')
-rw-r--r-- | cobbler/api.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cobbler/api.py b/cobbler/api.py index d520cc9..bd597b2 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -53,7 +53,8 @@ class BootAPI: result = cmd.communicate()[0].replace("cobbler-","") if result.find("not installed") != -1: return "?" - return result[:result.rfind(".")] + tokens = result[:result.rfind("-")].split(".") + return int(tokens[0]) + 0.1 * int(tokens[1]) + 0.001 * int(tokens[2]) def clear(self): |