--- pykickstart/commands/logvol.py	4 Oct 2007 16:16:03 -0000	1.5
+++ pykickstart/commands/logvol.py	18 Oct 2007 22:13:56 -0000
@@ -92,9 +92,32 @@ class FC4_LogVolData(FC3_LogVolData):
 
         return retval
 
+class F9_LogVolData(FC4_LogVolData):
+    def __init__(self, bytesPerInode=4096, fsopts="", fstype="", grow=False,
+                 maxSizeMB=0, name="", format=True, percent=0,
+                 recommended=False, size=None, preexist=False, vgname="",
+                 mountpoint="", profile=None):
+        FC4_LogVolData.__init__(self, fstype=fstype, grow=grow,
+                               maxSizeMB=maxSizeMB, name=name,
+                               format=format, percent=percent,
+                               recommended=recommended, size=size,
+                               preexist=preexist, vgname=vgname,
+                               mountpoint=mountpoint,
+                               bytesPerInode=bytesPerInode, fsopts=fsopts)
+        self.profile = profile
+
+    def _getArgsAsStr(self):
+        retval = FC4_LogVolData._getArgsAsStr(self)
+
+        if self.profile:
+            retval += " --profile=%s" % self.profile
+
+        return retval
+
 class FC3_LogVol(KickstartCommand):
     def __init__(self, writePriority=132, lvList=None):
         KickstartCommand.__init__(self, writePriority)
+        self._setClassData()
 
         if lvList == None:
             lvList = []
@@ -109,6 +132,9 @@ class FC3_LogVol(KickstartCommand):
 
         return retval
 
+    def _setClassData(self):
+        self.dataType = FC3_RaidData
+
     def _getParser(self):
         def lv_cb (option, opt_str, value, parser):
             parser.values.format = False
@@ -141,7 +167,7 @@ class FC3_LogVol(KickstartCommand):
         if len(extra) == 0:
             raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "logvol")
 
-        lvd = FC3_LogVolData()
+        lvd = self.dataType()
         self._setToObj(op, opts, lvd)
         lvd.mountpoint=extra[0]
         self.add(lvd)
@@ -160,14 +186,15 @@ class FC4_LogVol(FC3_LogVol):
         op.add_option("--fsoptions", dest="fsopts")
         return op
 
-    def parse(self, args):
-        op = self._getParser()
-        (opts, extra) = op.parse_args(args=args)
+    def _setClassData(self):
+        self.dataType = FC4_RaidData
 
-        if len(extra) == 0:
-            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "logvol")
+class F9_LogVol(FC4_LogVol):
+    def _getParser(self):
+        op = FC4_LogVol._getParser(self)
+        op.add_option("--profile", dest="profile", action="store",
+                      type="string", nargs=1)
+        return op
 
-        lvd = FC4_LogVolData()
-        self._setToObj(op, opts, lvd)
-        lvd.mountpoint=extra[0]
-        self.add(lvd)
+    def _setClassData(self):
+        self.dataType = F9_RaidData
--- pykickstart/commands/partition.py	4 Oct 2007 16:16:03 -0000	1.6
+++ pykickstart/commands/partition.py	18 Oct 2007 22:13:56 -0000
@@ -111,9 +111,34 @@ class FC4_PartData(FC3_PartData):
 
         return retval
 
+class F9_PartData(FC4_PartData):
+    def __init__(self, active=False, primOnly=False, bytesPerInode=4096,
+                 end=0, fsopts="", fstype="", grow=False, label="",
+                 maxSizeMB=0, format=True, onbiosdisk="", disk="",
+                 onPart="", recommended=False, size=None, start=0,
+                 mountpoint="", profile=None):
+        FC4_PartData.__init__(self, active=active, primOnly=primOnly,
+                             end=end, fstype=fstype, grow=grow,
+                             maxSizeMB=maxSizeMB, format=format,
+                             onbiosdisk=onbiosdisk, disk=disk,
+                             onPart=onPart, size=size, start=start,
+                             recommended=recommended,
+                             mountpoint=mountpoint, bytesPerInode=bytesPerInode,
+                             fsopts=fsopts, label=label)
+        self.profile = profile
+
+    def _getArgsAsStr(self):
+        retval = FC4_PartData._getArgsAsStr(self)
+
+        if self.profile:
+            retval += " --profile=%s" % self.profile
+
+        return retval
+
 class FC3_Partition(KickstartCommand):
     def __init__(self, writePriority=130, partitions=None):
         KickstartCommand.__init__(self, writePriority)
+        self._setClassData()
 
         if partitions == None:
             partitions = []
@@ -131,6 +156,9 @@ class FC3_Partition(KickstartCommand):
         else:
             return ""
 
+    def _setClassData(self):
+        self.dataType = FC3_PartData
+
     def _getParser(self):
         def part_cb (option, opt_str, value, parser):
             if value.startswith("/dev/"):
@@ -170,7 +198,7 @@ class FC3_Partition(KickstartCommand):
         if len(extra) != 1:
             raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "partition")
 
-        pd = FC3_PartData()
+        pd = self.dataType()
         self._setToObj(op, opts, pd)
         pd.mountpoint=extra[0]
         self.add(pd)
@@ -188,6 +216,9 @@ class FC4_Partition(FC3_Partition):
             else:
                 parser.values.ensure_value(option.dest, value)
 
+    def _setClassData(self):
+        self.dataType = FC4_PartData
+
     def _getParser(self):
         op = FC3_Partition._getParser(self)
         op.add_option("--bytes-per-inode", dest="bytesPerInode", action="store",
@@ -196,14 +227,21 @@ class FC4_Partition(FC3_Partition):
         op.add_option("--label", dest="label")
         return op
 
-    def parse(self, args):
-        op = self._getParser()
-        (opts, extra) = op.parse_args(args=args)
+class F9_Partition(FC4_Partition):
+    def __init__(self, writePriority=130, partitions=None):
+        FC4_Partition.__init__(self, writePriority, partitions)
 
-        if len(extra) != 1:
-            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "partition")
+        def part_cb (option, opt_str, value, parser):
+            if value.startswith("/dev/"):
+                parser.values.ensure_value(option.dest, value[5:])
+            else:
+                parser.values.ensure_value(option.dest, value)
 
-        pd = FC4_PartData()
-        self._setToObj(op, opts, pd)
-        pd.mountpoint=extra[0]
-        self.add(pd)
+    def _setClassData(self):
+        self.dataType = F9_PartData
+
+    def _getParser(self):
+        op = FC4_Partition._getParser(self)
+        op.add_option("--profile", dest="profile", action="store",
+                      type="string", nargs=1)
+        return op
--- pykickstart/commands/raid.py	4 Oct 2007 16:16:03 -0000	1.9
+++ pykickstart/commands/raid.py	18 Oct 2007 22:13:56 -0000
@@ -107,9 +107,30 @@ class FC5_RaidData(FC4_RaidData):
 
 F7_RaidData = FC5_RaidData
 
+class F9_RaidData(F7_RaidData):
+    def __init__(self, device=None, fsopts="", fstype="", level="",
+                 format=True, spares=0, preexist=False, mountpoint="",
+                 members=None, bytesPerInode=4096, fsprofile=None):
+        F7_RaidData.__init__(self, device=device, fsopts=fsopts,
+                             fstype=fstype, level=level,
+                             format=format, spares=spares,
+                             preexist=preexist,
+                             mountpoint=mountpoint, members=members,
+                             bytesPerInode=bytesPerInode)
+        self.fsprofile = fsprofile
+
+    def _getArgsAsStr(self):
+        retval = F7_RaidData._getArgsAsStr(self)
+
+        if self.profile:
+            retval += " --fsprofile=%s" % self.fsprofile
+
+        return retval
+
 class FC3_Raid(KickstartCommand):
     def __init__(self, writePriority=140, raidList=None):
         KickstartCommand.__init__(self, writePriority)
+        self._setClassData()
 
         # A dict of all the RAID levels we support.  This means that if we
         # support more levels in the future, subclasses don't have to
@@ -132,6 +153,9 @@ class FC3_Raid(KickstartCommand):
 
         return retval
 
+    def _setClassData(self):
+        self.dataType = FC4_RaidData
+
     def _getParser(self):
         def raid_cb (option, opt_str, value, parser):
             parser.values.format = False
@@ -168,7 +192,7 @@ class FC3_Raid(KickstartCommand):
         if len(extra) == 0:
             raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "raid")
 
-        rd = FC3_RaidData()
+        rd = self.dataType()
         self._setToObj(op, opts, rd)
 
         # --device can't just take an int in the callback above, because it
@@ -186,33 +210,21 @@ class FC4_Raid(FC3_Raid):
     def __init__(self, writePriority=140, raidList=None):
         FC3_Raid.__init__(self, writePriority, raidList)
 
+    def _setClassData(self):
+        self.dataType = FC4_RaidData
+
     def _getParser(self):
         op = FC3_Raid._getParser(self)
         op.add_option("--fsoptions", dest="fsopts")
         return op
 
-    def parse(self, args):
-        op = self._getParser()
-        (opts, extra) = op.parse_args(args=args)
-
-        if len(extra) == 0:
-            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "raid")
-
-        rd = FC4_RaidData()
-        self._setToObj(op, opts, rd)
-
-        # --device can't just take an int in the callback above, because it
-        # could be specificed as "mdX", which causes optparse to error when
-        # it runs int().
-        rd.device = int(rd.device)
-        rd.mountpoint = extra[0]
-        rd.members = extra[1:]
-        self.add(rd)
-
 class FC5_Raid(FC4_Raid):
     def __init__(self, writePriority=140, raidList=None):
         FC4_Raid.__init__(self, writePriority, raidList)
 
+    def _setClassData(self):
+        self.dataType = FC5_RaidData
+
     def reset(self):
         self.raidList = []
 
@@ -222,26 +234,24 @@ class FC5_Raid(FC4_Raid):
                       type="int", nargs=1)
         return op
 
-    def parse(self, args):
-        op = self._getParser()
-        (opts, extra) = op.parse_args(args=args)
-
-        if len(extra) == 0:
-            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Mount point required for %s") % "raid")
-
-        rd = FC5_RaidData()
-        self._setToObj(op, opts, rd)
-
-        # --device can't just take an int in the callback above, because it
-        # could be specificed as "mdX", which causes optparse to error when
-        # it runs int().
-        rd.device = int(rd.device)
-        rd.mountpoint = extra[0]
-        rd.members = extra[1:]
-        self.add(rd)
-
 class F7_Raid(FC5_Raid):
     def __init__(self, writePriority=140, raidList=None):
         FC5_Raid.__init__(self, writePriority, raidList)
 
         self.levelMap.update({"RAID10": "RAID10", "10": "RAID10"})
+
+    def _setClassData(self):
+        self.dataType = F7_RaidData
+
+class F9_Raid(F7_Raid):
+    def __init__(self, writePriority=140, raidList=None):
+        F7_Raid.__init__(self, writePriority, raidList)
+
+    def _setClassData(self):
+        self.dataType = F9_RaidData
+
+    def _getParser(self):
+        op = F7_Raid._getParser(self)
+        op.add_option("--fsprofile", dest="fsprofile", action="store",
+                      type="string", nargs=1)
+        return op
--- pykickstart/handlers/control.py	3 Oct 2007 19:24:23 -0000	1.18
+++ pykickstart/handlers/control.py	18 Oct 2007 22:13:56 -0000
@@ -351,6 +351,64 @@ commandMap = {
         "zfcp": zfcp.FC3_ZFCP,
     },
 
+    # based on f8
+    F9: {
+        "auth": authconfig.FC3_Authconfig,
+        "authconfig": authconfig.FC3_Authconfig,
+        "autopart": autopart.FC3_AutoPart,
+        "autostep": autostep.FC3_AutoStep,
+        "bootloader": bootloader.F8_Bootloader,
+        "cdrom": method.FC6_Method,
+        "clearpart": clearpart.FC3_ClearPart,
+        "cmdline": displaymode.FC3_DisplayMode,
+        "device": device.F8_Device,
+        "deviceprobe": deviceprobe.FC3_DeviceProbe,
+        "dmraid": dmraid.FC6_DmRaid,
+        "driverdisk": driverdisk.FC3_DriverDisk,
+        "firewall": firewall.FC3_Firewall,
+        "firstboot": firstboot.FC3_Firstboot,
+        "graphical": displaymode.FC3_DisplayMode,
+        "halt": reboot.FC6_Reboot,
+        "harddrive": method.FC6_Method,
+        "ignoredisk": ignoredisk.F8_IgnoreDisk,
+        "install": upgrade.FC3_Upgrade,
+        "interactive": interactive.FC3_Interactive,
+        "iscsi": iscsi.FC6_Iscsi,
+        "iscsiname": iscsiname.FC6_IscsiName,
+        "key": key.F7_Key,
+        "keyboard": keyboard.FC3_Keyboard,
+        "lang": lang.FC3_Lang,
+        "logging": logging.FC6_Logging,
+        "logvol": logvol.FC4_LogVol,
+        "mediacheck": mediacheck.FC4_MediaCheck,
+        "monitor": monitor.FC6_Monitor,
+        "multipath": multipath.FC6_MultiPath,
+        "network": network.F8_Network,
+        "nfs": method.FC6_Method,
+        "part": partition.FC4_Partition,
+        "partition": partition.FC4_Partition,
+        "poweroff": reboot.FC6_Reboot,
+        "raid": raid.F7_Raid,
+        "reboot": reboot.FC6_Reboot,
+        "repo": repo.F8_Repo,
+        "rootpw": rootpw.F8_RootPw,
+        "selinux": selinux.FC3_SELinux,
+        "services": services.FC6_Services,
+        "shutdown": reboot.FC6_Reboot,
+        "skipx": skipx.FC3_SkipX,
+        "text": displaymode.FC3_DisplayMode,
+        "timezone": timezone.FC6_Timezone,
+        "updates": updates.F7_Updates,
+        "upgrade": upgrade.FC3_Upgrade,
+        "url": method.FC6_Method,
+        "user": user.F8_User,
+        "vnc": vnc.FC6_Vnc,
+        "volgroup": volgroup.FC3_VolGroup,
+        "xconfig": xconfig.FC6_XConfig,
+        "zerombr": zerombr.FC3_ZeroMbr,
+        "zfcp": zfcp.FC3_ZFCP,
+    },
+
     # based on fc1
     RHEL3: {
         "auth": authconfig.FC3_Authconfig,
@@ -577,6 +635,20 @@ dataMap = {
         "NetworkData": network.F8_NetworkData,
         "PartData": partition.FC4_PartData,
         "RaidData": raid.F7_RaidData,
+        "RepoData": repo.F8_RepoData,
+        "UserData": user.F8_UserData,
+        "VolGroupData": volgroup.FC3_VolGroupData,
+        "ZFCPData": zfcp.FC3_ZFCPData,
+    },
+    F9: {
+        "DeviceData": device.F8_DeviceData,
+        "DmRaidData": dmraid.FC6_DmRaidData,
+        "IscsiData": iscsi.FC6_IscsiData,
+        "LogVolData": logvol.F9_LogVolData,
+        "MultiPathData": multipath.FC6_MultiPathData,
+        "NetworkData": network.F8_NetworkData,
+        "PartData": partition.F9_PartData,
+        "RaidData": raid.F9_RaidData,
         "RepoData": repo.F8_RepoData,
         "UserData": user.F8_UserData,
         "VolGroupData": volgroup.FC3_VolGroupData,
--- /dev/null	2007-10-17 14:50:50.262040423 -0400
+++ pykickstart/handlers/f9.py	2007-10-18 18:25:34.000000000 -0400
@@ -0,0 +1,24 @@
+#
+# Peter Jones <pjones@redhat.com>
+#
+# Copyright 2007 Red Hat, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use, modify,
+# copy, or redistribute it subject to the terms and conditions of the GNU
+# General Public License v.2.  This program is distributed in the hope that it
+# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
+# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  Any Red Hat
+# trademarks that are incorporated in the source code or documentation are not
+# subject to the GNU General Public License and may only be used or replicated
+# with the express permission of Red Hat, Inc. 
+#
+from pykickstart.base import *
+from pykickstart.version import *
+
+class F9Handler(BaseHandler):
+    version = F9
