diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-09-20 16:31:28 -0400 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-09-20 16:31:28 -0400 |
commit | a41a57d28f03efaac45562d3540f6c9e212b0602 (patch) | |
tree | fd145ea069e6fc1bdf6bfd9b389f7e0364b67d8c /cobbler/item_profile.py | |
parent | 8b6f480d0b7991fd96f6cd28ba238274483f0ddf (diff) | |
download | third_party-cobbler-a41a57d28f03efaac45562d3540f6c9e212b0602.tar.gz third_party-cobbler-a41a57d28f03efaac45562d3540f6c9e212b0602.tar.xz third_party-cobbler-a41a57d28f03efaac45562d3540f6c9e212b0602.zip |
Cobbler was missing the set_xen_ram function so the CLI wasn't
usable for editing the YAML for that parameter. Fixing.
Diffstat (limited to 'cobbler/item_profile.py')
-rw-r--r-- | cobbler/item_profile.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py index dd3df80..6a626d3 100644 --- a/cobbler/item_profile.py +++ b/cobbler/item_profile.py @@ -113,6 +113,25 @@ class Profile(item.Item): except: return cexceptions.CobblerException("exc_xen_file") + def set_xen_ram(self,num): + """ + For Xen only. + Specifies the size of the Xen RAM in MB. + 0 tells Koan to just choose a reasonable default. + """ + # num is a non-negative integer (0 means default) + try: + inum = int(num) + if inum != float(num): + return cexceptions.CobblerException("exc_xen_ram") + if inum >= 0: + self.xen_ram = inum + return True + return cexceptions.CobblerException("exc_xen_ram") + except: + return cexceptions.CobblerException("exc_xen_ram") + + def set_xen_paravirt(self,truthiness): """ For Xen only. |