summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cobbler/item_distro.py4
-rw-r--r--cobbler/item_image.py6
-rw-r--r--cobbler/utils.py15
-rw-r--r--docs/cobbler.pod7
4 files changed, 20 insertions, 12 deletions
diff --git a/cobbler/item_distro.py b/cobbler/item_distro.py
index d941f2cd..ccd437be 100644
--- a/cobbler/item_distro.py
+++ b/cobbler/item_distro.py
@@ -111,10 +111,10 @@ class Distro(item.Item):
raise CX(_("kernel not found"))
def set_breed(self, breed):
- return utils.set_breed(breed)
+ return utils.set_breed(self,breed)
def set_os_version(self, os_version):
- return utils.set_os_version(os_version)
+ return utils.set_os_version(self,os_version)
def set_initrd(self,initrd):
"""
diff --git a/cobbler/item_image.py b/cobbler/item_image.py
index 97a7963b..046723d0 100644
--- a/cobbler/item_image.py
+++ b/cobbler/item_image.py
@@ -108,10 +108,10 @@ class Image(item.Item):
return True
def set_os_version(self,os_version):
- return utils.set_os_version(os_version)
+ return utils.set_os_version(self,os_version)
def set_breed(self,breed):
- return utils.set_breed(breed)
+ return utils.set_breed(self,breed)
def set_image_type(self,image_type):
"""
@@ -201,7 +201,7 @@ class Image(item.Item):
buf = buf + _("breed : %s\n") % self.breed
buf = buf + _("file : %s\n") % self.file
buf = buf + _("xml file : %s\n") % self.xml_file
- buf = buf + _("os version" : %s\n") % self.os_version
+ buf = buf + _("os version : %s\n") % self.os_version
buf = buf + _("owners : %s\n") % self.owners
buf = buf + _("virt bridge : %s\n") % self.virt_bridge
buf = buf + _("virt cpus : %s\n") % self.virt_cpus
diff --git a/cobbler/utils.py b/cobbler/utils.py
index a38a44cf..8fe1f72d 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -846,17 +846,20 @@ def set_os_version(self,os_version):
self.os_version = os_version.lower()
if self.breed is None or self.breed == "":
raise CX(_("cannot set --os-version without setting --breed first"))
- matched = codes.VALID_OS_VERSION[breed]
- if not matched.has_key("os_version"):
- raise CX(_("--os-version must be one of %s") % matched)
+ if not self.breed in codes.VALID_OS_BREEDS:
+ raise CX(_("fix --breed first before applying this setting"))
+ matched = codes.VALID_OS_VERSIONS[self.breed]
+ if not os_version in matched:
+ raise CX(_("--os-version for breed %s must be one of %s") % (self.breed, matched))
self.os_version = os_version
return True
def set_breed(self,breed):
- if breed is not None and breed.lower() in codes.VALID_OS_VERSION.keys()
+ valid_breeds = codes.VALID_OS_BREEDS
+ if breed is not None and breed.lower() in valid_breeds:
self.breed = breed.lower()
- return True
- raise CX(_("invalid value for --breed, see manpage"))
+ return True
+ raise CX(_("invalid value for --breed, must be one of %s, different breeds have different levels of support") % valid_breeds)
def set_repos(self,repos,bypass_check=False):
# WARNING: hack
diff --git a/docs/cobbler.pod b/docs/cobbler.pod
index 9444add1..52bb5966 100644
--- a/docs/cobbler.pod
+++ b/docs/cobbler.pod
@@ -106,13 +106,18 @@ See the section on "Kickstart Templating" for further information.
=item breed
-Controls how kernel arguments for automatic installation are to be treated. Defaults to "redhat", which is a suitable value for Fedora and Centos as well. It means anything redhat based.
+Controls how various physical and virtual parameters, including kernel arguments for automatic installation, are to be treated. Defaults to "redhat", which is a suitable value for Fedora and CentOS as well. It means anything redhat based.
There is limited experimental support for specifying "debian" or "suse", which treats the kickstart file as a different format and changes the kernel
arguments appropriately. Support for other types of distributions is possible in the future.
The file used for the answer file, regardless of the breed setting, is the value used for --kickstart when creating the profile.
+=item os-version
+
+Generally this is a comment field, but it can affect some hardware setup for virtualized instances when
+provisioning guests with koan. The valid options for --os-version vary depending on what is specified for --breed. If you specify an invalid option, the error message will contain a list of valid os versions that can be used. If you do not know the os version or it does not appear in the list, omitting this argument or using "other" should be perfectly fine. Largely this is needed to support older distributions in virtualized settings, such as "rhel2.1", one of the OS choices if the breed is set to "redhat".
+
=item owners
Users with small sites and a limited number of admins can probably ignore this option. All cobbler objects (distros, profiles, systems, and repos) can take a --owners parameter to specify what cobbler users can edit particular objects. This only applies to the Cobbler WebUI and XMLRPC interface, not the "cobbler" command line tool run from the shell. Furthermore, this is only respected by the "authz_ownership" module which must be enabled in /etc/cobbler/modules.conf. The value for --owners is a comma seperated list of users and groups as specified in /etc/cobbler/users.conf. For more information see the users.conf file as well as the Cobbler Wiki. In the default Cobbler configuration, this value is completely ignored, as is users.conf.