6.2. Classes

You can assign a system to different classes which can be defined in the control file. Unlike rules, classes have to be configured in the control file and represent a configuration which is typical for a group of systems.

Here is an example of a class definition:

<classes config:type="list">
    <class>
        <class_name>TrainingRoom</class_name>
        <configuration>Software.xml</configuration>
    </class>
</classes>

        

The file Software.xml must be in the directory "classes/TrainingRoom/" then and it will get fetched from the same place like the autoyast profile and the rules were fetched from.

If you have multiple kind of profiles and those profiles share parts, it's recommended to use classes for that. You just have to change the class and all profiles using that class are fixed too. By the way, you can reach something similar by using XIncludes.

Using the configuration management system, you can define a set of classes. The class definition consists of the following variable for each class:

Figure 6.2. Defining Classes

Defining Classes

You can create as many classes as you need, however it is recommended to keep the set of classes as small as possible to keep the configuration system concise. As an example, the following set of classes can be used:

A file saved in a class directory can have the same syntax and format as a regular control file but represents a subset of the configuration. For example, to create a new control file for a special computer with a specific network interface, only the resource in the control file, which controls the configuration of the network is needed. Having multiple network types, you can merge the one needed for a special type of hardware with other class files and create a new control file which suits the system being installed.