| |
- pykickstart.ko.KickstartObject(__builtin__.object)
-
- Packages
- Script
- Group
- KickstartParser
class Group |
|
A class representing a single group in the %packages section. |
|
Methods defined here:
- __cmp__(self, other)
- __init__(self, name='', include=1)
- Create a new Group instance. Instance attributes:
name -- The group's identifier
include -- The level of how much of the group should be included.
Values can be GROUP_* from pykickstart.constants.
- __str__(self)
- Return a string formatted for output to a kickstart file.
|
class KickstartParser |
|
The kickstart file parser class as represented by a basic state
machine. To create a specialized parser, make a subclass and override
any of the methods you care about. Methods that don't need to do
anything may just pass. However, _stateMachine should never be
overridden. |
|
Methods defined here:
- __init__(self, handler, followIncludes=True, errorsAreFatal=True, missingIncludeIsFatal=True)
- Create a new KickstartParser instance. Instance attributes:
errorsAreFatal -- Should errors cause processing to halt, or
just print a message to the screen? This
is most useful for writing syntax checkers
that may want to continue after an error is
encountered.
followIncludes -- If %include is seen, should the included
file be checked as well or skipped?
handler -- An instance of a BaseHandler subclass. If
None, the input file will still be parsed
but no data will be saved and no commands
will be executed.
missingIncludeIsFatal -- Should missing include files be fatal, even
if errorsAreFatal is False?
- addPackages(self, line)
- Add the single package, exclude, or group into the Version's
Packages instance. This method may be overridden in a subclass
if necessary.
- addScript(self)
- Create a new Script instance and add it to the Version object. This
is called when the end of a script section is seen and may be
overridden in a subclass if necessary.
- handleCommand(self, lineno, args)
- Given the list of command and arguments, call the Version's
dispatcher method to handle the command. Returns the command or
data object returned by the dispatcher. This method may be
overridden in a subclass if necessary.
- handlePackageHdr(self, lineno, args)
- Process the arguments to the %packages header and set attributes
on the Version's Packages instance appropriate. This method may be
overridden in a subclass if necessary.
- handleScriptHdr(self, lineno, args)
- Process the arguments to a %pre/%post/%traceback header for later
setting on a Script instance once the end of the script is found.
This method may be overridden in a subclass if necessary.
- readKickstart(self, f, reset=True)
- Process a kickstart file, given by the filename f.
- readKickstartFromString(self, str, reset=True)
- Process a kickstart file, provided as the string str.
|
class Packages(pykickstart.ko.KickstartObject) |
|
A class representing the %packages section of the kickstart file. |
|
- Method resolution order:
- Packages
- pykickstart.ko.KickstartObject
- __builtin__.object
Methods defined here:
- __init__(self, *args, **kwargs)
- Create a new Packages instance. Instance attributes:
addBase -- Should the Base group be installed even if it is
not specified?
default -- Should the default package set be selected?
excludedList -- A list of all the packages marked for exclusion in
the %packages section, without the leading minus
symbol.
excludeDocs -- Should documentation in each package be excluded?
groupList -- A list of Group objects representing all the groups
specified in the %packages section. Names will be
stripped of the leading @ symbol.
excludedGroupList -- A list of Group objects representing all the
groups specified for removal in the %packages
section. Names will be stripped of the leading
-@ symbols.
handleMissing -- If unknown packages are specified in the %packages
section, should it be ignored or not? Values can
be KS_MISSING_* from pykickstart.constants.
packageList -- A list of all the packages specified in the
%packages section.
instLangs -- A list of languages to install.
- __str__(self)
- Return a string formatted for output to a kickstart file.
- add(self, pkgList)
- Given a list of lines from the input file, strip off any leading
symbols and add the result to the appropriate list.
Data descriptors inherited from pykickstart.ko.KickstartObject:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Script(pykickstart.ko.KickstartObject) |
|
A class representing a single kickstart script. If functionality beyond
just a data representation is needed (for example, a run method in
anaconda), Script may be subclassed. Although a run method is not
provided, most of the attributes of Script have to do with running the
script. Instances of Script are held in a list by the Version object. |
|
- Method resolution order:
- Script
- pykickstart.ko.KickstartObject
- __builtin__.object
Methods defined here:
- __init__(self, script, *args, **kwargs)
- Create a new Script instance. Instance attributes:
errorOnFail -- If execution of the script fails, should anaconda
stop, display an error, and then reboot without
running any other scripts?
inChroot -- Does the script execute in anaconda's chroot
environment or not?
interp -- The program that should be used to interpret this
script.
lineno -- The line number this script starts on.
logfile -- Where all messages from the script should be logged.
script -- A string containing all the lines of the script.
type -- The type of the script, which can be KS_SCRIPT_* from
pykickstart.constants.
- __str__(self)
- Return a string formatted for output to a kickstart file.
Data descriptors inherited from pykickstart.ko.KickstartObject:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |