use the latest pykickstart 3th party code
authorbiao716.wang <biao716.wang@samsung.com>
Fri, 12 Aug 2022 08:55:01 +0000 (17:55 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Fri, 12 Aug 2022 08:55:01 +0000 (17:55 +0900)
Change-Id: Ie300706abc8628500e4d1be4bda8b19d4a0d0a67
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
49 files changed:
mic/3rdparty/pykickstart/__init__.py
mic/3rdparty/pykickstart/base.py
mic/3rdparty/pykickstart/commands/authconfig.py
mic/3rdparty/pykickstart/commands/autopart.py
mic/3rdparty/pykickstart/commands/bootloader.py
mic/3rdparty/pykickstart/commands/btrfs.py
mic/3rdparty/pykickstart/commands/clearpart.py
mic/3rdparty/pykickstart/commands/device.py
mic/3rdparty/pykickstart/commands/deviceprobe.py
mic/3rdparty/pykickstart/commands/dmraid.py
mic/3rdparty/pykickstart/commands/fcoe.py
mic/3rdparty/pykickstart/commands/ignoredisk.py
mic/3rdparty/pykickstart/commands/install.py
mic/3rdparty/pykickstart/commands/interactive.py
mic/3rdparty/pykickstart/commands/langsupport.py
mic/3rdparty/pykickstart/commands/lilocheck.py
mic/3rdparty/pykickstart/commands/logvol.py
mic/3rdparty/pykickstart/commands/method.py
mic/3rdparty/pykickstart/commands/monitor.py
mic/3rdparty/pykickstart/commands/mouse.py
mic/3rdparty/pykickstart/commands/multipath.py
mic/3rdparty/pykickstart/commands/ostreesetup.py
mic/3rdparty/pykickstart/commands/partition.py
mic/3rdparty/pykickstart/commands/raid.py
mic/3rdparty/pykickstart/commands/rootpw.py
mic/3rdparty/pykickstart/commands/updates.py
mic/3rdparty/pykickstart/commands/upgrade.py
mic/3rdparty/pykickstart/commands/user.py
mic/3rdparty/pykickstart/commands/volgroup.py
mic/3rdparty/pykickstart/commands/zfcp.py
mic/3rdparty/pykickstart/handlers/f15.py
mic/3rdparty/pykickstart/handlers/f18.py
mic/3rdparty/pykickstart/handlers/f25.py
mic/3rdparty/pykickstart/handlers/f26.py
mic/3rdparty/pykickstart/handlers/f27.py
mic/3rdparty/pykickstart/handlers/f28.py
mic/3rdparty/pykickstart/handlers/f29.py
mic/3rdparty/pykickstart/handlers/f34.py
mic/3rdparty/pykickstart/handlers/f35.py [new file with mode: 0644]
mic/3rdparty/pykickstart/handlers/f36.py [new file with mode: 0644]
mic/3rdparty/pykickstart/handlers/f37.py [new file with mode: 0644]
mic/3rdparty/pykickstart/handlers/f7.py
mic/3rdparty/pykickstart/handlers/fc4.py
mic/3rdparty/pykickstart/handlers/rhel9.py [new file with mode: 0644]
mic/3rdparty/pykickstart/i18n.py
mic/3rdparty/pykickstart/load.py
mic/3rdparty/pykickstart/parser.py
mic/3rdparty/pykickstart/sections.py
mic/3rdparty/pykickstart/version.py

index 006da835230b1476087dd1a27f255a3e194777c5..c4f8ae1ce336e0e05a7cd7e36effe2cf7acc2e85 100644 (file)
@@ -1 +1 @@
-__version__ = '3.31'
+__version__ = '3.41'
index f08a8c184f3a5711e8061a0c9267c59a0bc3afec..b1b7c1993d8394421cf30715559bae1ac71d26d9 100644 (file)
@@ -34,13 +34,17 @@ This module exports several important base classes:
                         a subclass is used, a warning message will be
                         printed.
 
+    RemovedCommand - an abstract subclass of KickstartCommand that should
+                     be subclassed to update the description with the version
+                     it was removed in.
+                     Any use of the command will raise an error.
+
     KickstartCommand - The base abstract class for all kickstart commands.
                        Command objects are contained within a BaseHandler
                        object.
 """
 from pykickstart.i18n import _
 
-import six
 import warnings
 from pykickstart import __version__
 from pykickstart.errors import KickstartParseError, KickstartParseWarning, KickstartDeprecationWarning
@@ -214,6 +218,38 @@ class DeprecatedCommand(KickstartCommand):
         """Print a warning message if the command is seen in the input file."""
         mapping = {"lineno": self.lineno, "cmd": self.currentCmd}
         warnings.warn(_("Ignoring deprecated command on line %(lineno)s:  The %(cmd)s command has been deprecated and no longer has any effect.  It may be removed from future releases, which will result in a fatal error from kickstart.  Please modify your kickstart file to remove this command.") % mapping, KickstartDeprecationWarning)
+        return None
+
+class RemovedCommand(KickstartCommand):
+    """Specify that a command has been removed and no longer has any function.
+       Any command that is removed should be subclassed from this class, and
+       should set its description to add the version that the command was removed in.
+       This is an abstract class.
+    """
+    def __init__(self, writePriority=None, *args, **kwargs):
+        # We don't want people using this class by itself.
+        if self.__class__ is RemovedCommand:
+            raise TypeError("RemovedCommand is an abstract class.")
+
+        # Create a new RemovedCommand instance.
+        KickstartCommand.__init__(self, writePriority, *args, **kwargs)
+
+    def dataList(self):
+        """Override the method of the removed command."""
+        return None
+
+    @property
+    def dataClass(self):
+        """Override the attribute of the removed command."""
+        return None
+
+    def __str__(self):
+        """Placeholder since RemovedCommands don't work anymore."""
+        return ""
+
+    def parse(self, args):
+        """Raise an error if the command is found in the input file"""
+        raise KickstartParseError(_("%s has been removed.") % self.currentCmd, lineno=self.lineno)
 
 ###
 ### HANDLERS
@@ -264,14 +300,17 @@ class KickstartHandler(KickstartObject):
 
         for prio in lst:
             for obj in self._writeOrder[prio]:
-                obj_str = obj.__str__()
-                if isinstance(obj_str, six.text_type) and not six.PY3:
-                    obj_str = obj_str.encode("utf-8")
-                retval += obj_str
+                retval += obj.__str__()
 
         return retval
 
     def _insertSorted(self, lst, obj):
+        def cmdName(cmdObj):
+            if cmdObj.__class__.__name__.find("_") != -1:
+                return cmdObj.__class__.__name__.split("_", 1)[1]
+            else:
+                return cmdObj.__class__.__name__
+
         length = len(lst)
         i = 0
 
@@ -279,12 +318,12 @@ class KickstartHandler(KickstartObject):
             # If the two classes have the same name, it's because we are
             # overriding an existing class with one from a later kickstart
             # version, so remove the old one in favor of the new one.
-            if obj.__class__.__name__ > lst[i].__class__.__name__:
+            if cmdName(obj) > cmdName(lst[i]):
                 i += 1
-            elif obj.__class__.__name__ == lst[i].__class__.__name__:
+            elif cmdName(obj) == cmdName(lst[i]):
                 lst[i] = obj
                 return
-            elif obj.__class__.__name__ < lst[i].__class__.__name__:
+            elif cmdName(obj) < cmdName(lst[i]):
                 break
 
         if i >= length:
@@ -298,12 +337,8 @@ class KickstartHandler(KickstartObject):
         # off the version part from the front of the name.
         if cmdObj.__class__.__name__.find("_") != -1:
             name = cmdObj.__class__.__name__.split("_", 1)[1]
-            if not six.PY3:
-                name = unicode(name)    # pylint: disable=undefined-variable
         else:
             name = cmdObj.__class__.__name__.lower()
-            if not six.PY3:
-                name = unicode(name)    # pylint: disable=undefined-variable
 
         setattr(self, name.lower(), cmdObj)
 
@@ -469,10 +504,7 @@ class BaseHandler(KickstartHandler):
         retval += KickstartHandler.__str__(self)
 
         for script in self.scripts:
-            script_str = script.__str__()
-            if isinstance(script_str, six.text_type) and not six.PY3:
-                script_str = script_str.encode("utf-8")
-            retval += script_str
+            retval += script.__str__()
 
         if self._null_section_strings:
             retval += "\n"
index e0895a6c353eb6d1dd19527c42260e9b141bd3cf..01b36e165438dcc1cb0b0faa38ae130b50432af0 100644 (file)
 # 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. 
+# with the express permission of Red Hat, Inc.
 #
 import warnings
 from textwrap import dedent
 
 from pykickstart.errors import KickstartDeprecationWarning
-from pykickstart.version import FC3, versionToLongString, F28
-from pykickstart.base import KickstartCommand
+from pykickstart.version import FC3, versionToLongString, F28, F35
+from pykickstart.base import KickstartCommand, RemovedCommand
 from pykickstart.options import KSOptionParser
 
 
@@ -84,3 +84,9 @@ class F28_Authconfig(FC3_Authconfig):
 
         """ % versionToLongString(F28))
         return op
+
+class F35_Authconfig(RemovedCommand, F28_Authconfig):
+    def _getParser(self):
+        op = F28_Authconfig._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F35)
+        return op
index 9e00d4376ad5999adbab4cbf8379845516e1c24a..38d28d36b399e60b630276b4ff6fe0bc71e7d400 100644 (file)
@@ -649,3 +649,8 @@ class RHEL8_AutoPart(F29_AutoPart):
 
                     Partitioning scheme 'btrfs' was removed.""" % versionToLongString(RHEL8)
         return op
+
+
+class RHEL9_AutoPart(RHEL8_AutoPart):
+    pass
+
index fba058c213dc33051d5c09576ca5fda34558fdd9..66055e879966beaabe4bd0204d09039ba63ccfcd 100644 (file)
@@ -18,8 +18,8 @@
 # with the express permission of Red Hat, Inc.
 #
 from pykickstart.version import RHEL5, RHEL6, versionToLongString
-from pykickstart.version import FC3, FC4, F8, F12, F14, F15, F17, F18, F19, F21, F29
-from pykickstart.base import KickstartCommand
+from pykickstart.version import FC3, FC4, F8, F12, F14, F15, F17, F18, F19, F21, F29, F34
+from pykickstart.base import KickstartCommand, RemovedCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.options import KSOptionParser, commaSplit
 
@@ -160,7 +160,12 @@ class FC3_Lilo(FC3_Bootloader):
     def _getParser(self):
         op = super(FC3_Lilo, self)._getParser()
         op.prog = "lilo"
-        op.description += "\n\n.. deprecated:: %s" % versionToLongString(FC4)
+        return op
+
+class FC4_Lilo(RemovedCommand, FC3_Lilo):
+    def _getParser(self):
+        op = FC3_Lilo._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(FC4)
         return op
 
 
@@ -275,9 +280,8 @@ class F15_Bootloader(F14_Bootloader):
                         If given, the password specified by ``--password=`` is
                         already encrypted and should be passed to the bootloader
                         configuration without additional modification.""")
-        op.add_argument("--md5pass", dest="_md5pass", version=F15, help="""
-                        If using GRUB, similar to ``--password=`` except the password
-                        should already be encrypted.""")
+        op.add_argument("--md5pass", dest="_md5pass", metavar="MD5PASS", version=F15,
+                        help="Alias for ``--password=MD5PASS --iscrypted``.")
         return op
 
     def parse(self, args):
@@ -401,9 +405,8 @@ class RHEL6_Bootloader(F12_Bootloader):
                         If given, the password specified by ``--password=`` is
                         already encrypted and should be passed to the bootloader
                         configuration without additional modification.""")
-        op.add_argument("--md5pass", dest="_md5pass", version=RHEL6, help="""
-                        If using GRUB, similar to ``--password=`` except the
-                        password should already be encrypted.""")
+        op.add_argument("--md5pass", dest="_md5pass", metavar="MD5PASS", version=RHEL6,
+                        help="Alias for ``--password=MD5PASS --iscrypted``.")
         return op
 
     def parse(self, args):
@@ -499,3 +502,15 @@ class F29_Bootloader(F21_Bootloader):
 
 class RHEL8_Bootloader(F29_Bootloader):
     pass
+
+class F34_Bootloader(F29_Bootloader):
+    removedKeywords = F29_Bootloader.removedKeywords
+    removedAttrs = F29_Bootloader.removedAttrs
+
+    def _getParser(self):
+        op = F29_Bootloader._getParser(self)
+        op.remove_argument("--upgrade", version=F34)
+        return op
+
+class RHEL9_Bootloader(F34_Bootloader):
+    pass
index 084f25b0f064e440fcf48b9712984a3173f28276..ddfce527cf6b9afbf7bfbf8df2c9d8f140669717 100644 (file)
@@ -276,3 +276,6 @@ class RHEL8_BTRFS(DeprecatedCommand, F23_BTRFS):
         op = F23_BTRFS._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(RHEL8)
         return op
+
+class RHEL9_BTRFS(RHEL8_BTRFS):
+    pass
index f7ef529586e1f25ef70356baf5516df8078006d0..0e459c46921e9d929ed8cf7fa4438236580793c1 100644 (file)
@@ -17,7 +17,7 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import FC3, F17, F21, F28
+from pykickstart.version import FC3, F17, F21, F25, F28
 from pykickstart.base import KickstartCommand
 from pykickstart.constants import CLEARPART_TYPE_ALL, CLEARPART_TYPE_LINUX, CLEARPART_TYPE_LIST, CLEARPART_TYPE_NONE
 from pykickstart.options import KSOptionParser, commaSplit
@@ -151,7 +151,43 @@ class F21_ClearPart(F17_ClearPart):
                         and gpt for x86_64 but not dasd.""")
         return op
 
-class F28_ClearPart(F21_ClearPart):
+class F25_ClearPart(F21_ClearPart):
+    def _getParser(self):
+        op = super(F25_ClearPart, self)._getParser()
+        op.add_argument("--drives", type=commaSplit, version=F25, help="""
+                        The following clears the partitions on the first
+                        two drives on the system:
+
+                        ``clearpart --drives=sda,sdb``
+
+                        or clear as many drives as it could and skip the missing
+                        (at least one must be matched):
+
+                        ``clearpart --drives=sda|sdb1``
+
+                        or clear all virtio drives and only first scsi device if
+                        exists
+
+                        ``clearpart --drives=sda|vd*``""")
+        op.add_argument("--list", dest="devices", type=commaSplit,
+                        version=F25, help="""
+                        The following clears the partitions on the first
+                        two drives on the system:
+
+                        ``clearpart --list=sda,sdb``
+
+                        or clear as many drives as it could and skip the missing
+                        (at least one must be matched):
+
+                        ``clearpart --list=sda|sdb1``
+
+                        or clear all virtio drives and only first scsi device if
+                        exists
+
+                        ``clearpart --list=sda|vd*``""")
+        return op
+
+class F28_ClearPart(F25_ClearPart):
     def __init__(self, *args, **kwargs):
         super(F28_ClearPart, self).__init__(*args, **kwargs)
         self.cdl = kwargs.get("cdl", False)
index 39d42a19bc9f18b518cfa90c3842990a08dfd677..99d80c7b8589f1324085bfcb608b80e78a7e1f08 100644 (file)
@@ -17,8 +17,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import versionToLongString, FC3, F24
-from pykickstart.base import BaseData, DeprecatedCommand, KickstartCommand
+from pykickstart.version import versionToLongString, FC3, F24, F34
+from pykickstart.base import BaseData, DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.errors import KickstartParseError, KickstartParseWarning
 from pykickstart.options import KSOptionParser
 
@@ -172,3 +172,9 @@ class F24_Device(DeprecatedCommand, F8_Device):
         op = F8_Device._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(F24)
         return op
+
+class F34_Device(RemovedCommand, F24_Device):
+    def _getParser(self):
+        op = F24_Device._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F34)
+        return op
index a3ec0bd4a499f8661c31ff4090cccbb25b3b2ea7..bc6dbf98002191ad49739391ecf9621164a8c1ab 100644 (file)
@@ -17,8 +17,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import FC3, F29, versionToLongString
-from pykickstart.base import KickstartCommand, DeprecatedCommand
+from pykickstart.version import FC3, F29, F34, versionToLongString
+from pykickstart.base import KickstartCommand, DeprecatedCommand, RemovedCommand
 from pykickstart.options import KSOptionParser
 
 
@@ -55,3 +55,9 @@ class F29_DeviceProbe(DeprecatedCommand, FC3_DeviceProbe):
         op = FC3_DeviceProbe._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(F29)
         return op
+
+class F34_DeviceProbe(RemovedCommand, F29_DeviceProbe):
+    def _getParser(self):
+        op = F29_DeviceProbe._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F34)
+        return op
index 83c220f16a1505959a705951006eaa04a14d4221..b818e03d367c171c10f8e3ef182e6d3e451a2a1c 100644 (file)
@@ -19,8 +19,8 @@
 # with the express permission of Red Hat, Inc.
 #
 from pykickstart.errors import KickstartParseWarning
-from pykickstart.version import versionToLongString, FC6, F24
-from pykickstart.base import BaseData, DeprecatedCommand, KickstartCommand
+from pykickstart.version import versionToLongString, FC6, F24, F34
+from pykickstart.base import BaseData, DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.options import KSOptionParser
 
 import warnings
@@ -107,3 +107,9 @@ class F24_DmRaid(DeprecatedCommand, FC6_DmRaid):
         op = FC6_DmRaid._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(F24)
         return op
+
+class F34_DmRaid(RemovedCommand, F24_DmRaid):
+    def _getParser(self):
+        op = F24_DmRaid._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F34)
+        return op
index 6bb2a7e69d45233a5df0a1e25066e88b9227b2be..e4e1fb6aa10096a8c51f5e44b455d0bf919bd173 100644 (file)
@@ -106,6 +106,9 @@ class F28_FcoeData(F13_FcoeData):
 class RHEL8_FcoeData(F28_FcoeData):
     pass
 
+class RHEL9_FcoeData(F28_FcoeData):
+    pass
+
 class F12_Fcoe(KickstartCommand):
     removedKeywords = KickstartCommand.removedKeywords
     removedAttrs = KickstartCommand.removedAttrs
@@ -192,3 +195,6 @@ class F28_Fcoe(F13_Fcoe):
 
 class RHEL8_Fcoe(F28_Fcoe):
     pass
+
+class RHEL9_Fcoe(F28_Fcoe):
+    pass
index cae818b1231aa7094183ca08d3530839dff9b864..9545abc9653d15a8c1f61470b924a381bbe5fd8e 100644 (file)
@@ -17,7 +17,7 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import FC3, F8, RHEL6, F29
+from pykickstart.version import FC3, F8, RHEL6, F25, F29, F34
 from pykickstart.base import KickstartCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.i18n import _
@@ -146,17 +146,67 @@ class RHEL6_IgnoreDisk(F8_IgnoreDisk):
 class F14_IgnoreDisk(RHEL6_IgnoreDisk):
     pass
 
-class F29_IgnoreDisk(F14_IgnoreDisk):
+class F25_IgnoreDisk(F14_IgnoreDisk):
     removedKeywords = F14_IgnoreDisk.removedKeywords
     removedAttrs = F14_IgnoreDisk.removedAttrs
 
+    def _getParser(self):
+        op = F14_IgnoreDisk._getParser(self)
+        op.add_argument("--drives", dest="ignoredisk", version=F25,
+                        type=commaSplit, help="""
+                        The following ignores the partitions on the first
+                        two drives on the system:
+
+                        ``ignoredisk --drives=sda,sdb``
+
+                        or ignores as many drives as it could and skip the missing
+                        (at least one must be matched):
+
+                        ``ignoredisk --drives=sda|sdb1``
+
+                        or ignores all virtio drives and only first scsi device if
+                        exists
+
+                        ``ignoredisk --drives=sda|vd*``""")
+        op.add_argument("--only-use", dest="onlyuse",
+                        type=commaSplit, version=F25, help="""
+                        The following ignores the partitions on the first
+                        two drives on the system:
+
+                        ``ignoredisk --only-use=sda,sdb``
+
+                        or ignores as many drives as it could and skip the missing
+                        (at least one must be matched):
+
+                        ``ignoredisk --only-use=sda|sdb1``
+
+                        or ignores all virtio drives and only first scsi device if
+                        exists
+
+                        ``ignoredisk --only-use=sda|vd*``""")
+        return op
+
+
+class F29_IgnoreDisk(F25_IgnoreDisk):
+    removedKeywords = F25_IgnoreDisk.removedKeywords
+    removedAttrs = F25_IgnoreDisk.removedAttrs
+
     def parse(self, args):
         return F8_IgnoreDisk.parse(self, args)
 
     def _getParser(self):
-        op = F14_IgnoreDisk._getParser(self)
+        op = F25_IgnoreDisk._getParser(self)
         op.add_argument("--interactive", action="store_true",
                         default=False, deprecated=F29, help="""
                         Allow the user manually navigate the advanced storage
                         screen.""")
         return op
+
+class F34_IgnoreDisk(F29_IgnoreDisk):
+    removedKeywords = F29_IgnoreDisk.removedKeywords
+    removedAttrs = F29_IgnoreDisk.removedAttrs
+
+    def _getParser(self):
+        op = F29_IgnoreDisk._getParser(self)
+        op.remove_argument("--interactive", version=F34)
+        return op
index 9b404a3f59cdf90668a7db1c0983e40c49bfef88..96c34b9e14caae9930e9ce4fd13dc8cf99658d70 100644 (file)
@@ -17,8 +17,8 @@
 # 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 DeprecatedCommand
-from pykickstart.version import F20, F29, versionToLongString
+from pykickstart.base import DeprecatedCommand, RemovedCommand
+from pykickstart.version import F20, F29, F34, versionToLongString
 from pykickstart.commands.upgrade import F11_Upgrade
 
 
@@ -64,3 +64,10 @@ class F29_Install(DeprecatedCommand, F20_Install):
         op = F20_Install._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(F29)
         return op
+
+
+class F34_Install(RemovedCommand, F29_Install):
+    def _getParser(self):
+        op = F29_Install._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F34)
+        return op
index c8028f53193b80b380d64fc5439ee34b5bbe8c77..fe98c4af24a7ccf61f73bd2a56113c15f59886a6 100644 (file)
@@ -17,8 +17,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import versionToLongString, FC3, F14
-from pykickstart.base import DeprecatedCommand, KickstartCommand
+from pykickstart.version import versionToLongString, FC3, F14, F15
+from pykickstart.base import DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.options import KSOptionParser
 
 class FC3_Interactive(KickstartCommand):
@@ -56,3 +56,9 @@ class F14_Interactive(DeprecatedCommand, FC3_Interactive):
         op = FC3_Interactive._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(F14)
         return op
+
+class F15_Interactive(RemovedCommand, F14_Interactive):
+    def _getParser(self):
+        op = F14_Interactive._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F15)
+        return op
index 9f739ff056bac7a6d03da41e62e3ac95a73c56bc..db39dac779f38dccebebb6ab761c6a47ae763961 100644 (file)
@@ -17,8 +17,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import FC3, FC5, versionToLongString
-from pykickstart.base import DeprecatedCommand, KickstartCommand
+from pykickstart.version import FC3, FC5, F7, versionToLongString
+from pykickstart.base import DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.i18n import _
 from pykickstart.options import KSOptionParser
@@ -70,3 +70,9 @@ class FC5_LangSupport(DeprecatedCommand, FC3_LangSupport):
         op = FC3_LangSupport._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(FC5)
         return op
+
+class F7_LangSupport(RemovedCommand, FC5_LangSupport):
+    def _getParser(self):
+        op = FC5_LangSupport._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F7)
+        return op
index 72f8785f4ae16ee3cf3a704dded18891d496541c..fcd29521f6b11c66d0a51e5c3a6a9e7ea914b46d 100644 (file)
@@ -18,7 +18,7 @@
 # with the express permission of Red Hat, Inc.
 #
 from pykickstart.version import FC3, FC4, versionToLongString
-from pykickstart.base import KickstartCommand
+from pykickstart.base import KickstartCommand, RemovedCommand
 from pykickstart.options import KSOptionParser
 
 class FC3_LiloCheck(KickstartCommand):
@@ -40,10 +40,15 @@ class FC3_LiloCheck(KickstartCommand):
 
     def _getParser(self):
         op = KSOptionParser(prog="lilocheck", description="check LILO boot loader", version=FC3)
-        op.description += "\n\n.. deprecated:: %s" % versionToLongString(FC4)
         return op
 
     def parse(self, args):
         self.op.parse_args(args=args, lineno=self.lineno)
         self.check = True
         return self
+
+class FC4_LiloCheck(RemovedCommand, FC3_LiloCheck):
+    def _getParser(self):
+        op = FC3_LiloCheck._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(FC4)
+        return op
index 2bf3b012204dcc0eb9624d185b5d852fc036b72e..ae703e31352144cdab7ef298197cebc7d4f72d58 100644 (file)
@@ -942,3 +942,6 @@ class RHEL8_LogVol(F29_LogVol):
 
                     Btrfs support was removed.""" % versionToLongString(RHEL8)
         return op
+
+class RHEL9_LogVol(RHEL8_LogVol):
+    pass
index 92f677078abe3484abbb7405a9557c0b4b5ec2c6..a863d6f97e52db5f50c08ca587a3a469b17a5b90 100644 (file)
@@ -17,8 +17,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import FC3
-from pykickstart.base import KickstartCommand
+from pykickstart.version import FC3, F34, versionToLongString
+from pykickstart.base import KickstartCommand, DeprecatedCommand
 from pykickstart.options import KSOptionParser
 
 class FC3_Method(KickstartCommand):
@@ -140,3 +140,12 @@ class RHEL7_Method(F19_Method):
 
 class F28_Method(RHEL7_Method):
     pass
+
+class F34_Method(DeprecatedCommand, F19_Method):
+    def __init__(self):  # pylint: disable=super-init-not-called
+        DeprecatedCommand.__init__(self)
+
+    def _getParser(self):
+        op = F19_Method._getParser(self)
+        op.description += "\n\n.. deprecated:: %s" % versionToLongString(F34)
+        return op
index 49151b088ccbd82c2eb04b749a1d4e1bc6869889..6448f219c0fae30cf796adb24ec0ff1954cfd5e0 100644 (file)
@@ -17,8 +17,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import FC3, FC6, F10, versionToLongString
-from pykickstart.base import DeprecatedCommand, KickstartCommand
+from pykickstart.version import FC3, FC6, F10, F18, versionToLongString
+from pykickstart.base import DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.options import KSOptionParser
 
 class FC3_Monitor(KickstartCommand):
@@ -116,3 +116,9 @@ class F10_Monitor(DeprecatedCommand, FC6_Monitor):
         op = FC6_Monitor._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(F10)
         return op
+
+class F18_Monitor(RemovedCommand, F10_Monitor):
+    def _getParser(self):
+        op = F10_Monitor._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F18)
+        return op
index ede50da82a8fbe3e094b7d3fe735a92635459aa9..2268327869e35d5ce722ba5fa1ea974eb55506f5 100644 (file)
@@ -17,8 +17,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import versionToLongString, RHEL3, FC3
-from pykickstart.base import DeprecatedCommand, KickstartCommand
+from pykickstart.version import versionToLongString, RHEL3, FC3, F7
+from pykickstart.base import DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.options import KSOptionParser
 
@@ -79,3 +79,9 @@ class FC3_Mouse(DeprecatedCommand, RHEL3_Mouse):
         op = RHEL3_Mouse._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(FC3)
         return op
+
+class F7_Mouse(RemovedCommand, FC3_Mouse):
+    def _getParser(self):
+        op = FC3_Mouse._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F7)
+        return op
index 6bb47a31b8317cc6d50906200c196528a9011b1b..acb58bb9d95b86ef451ffa70e295aa6f92d8cd54 100644 (file)
@@ -18,8 +18,8 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import versionToLongString, FC6, F24
-from pykickstart.base import BaseData, DeprecatedCommand, KickstartCommand
+from pykickstart.version import versionToLongString, FC6, F24, F34
+from pykickstart.base import BaseData, DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.options import KSOptionParser
 
@@ -123,3 +123,9 @@ class F24_MultiPath(DeprecatedCommand, FC6_MultiPath):
         op = FC6_MultiPath._getParser(self)
         op.description += "\n\n.. deprecated:: %s" % versionToLongString(F24)
         return op
+
+class F34_MultiPath(RemovedCommand, F24_MultiPath):
+    def _getParser(self):
+        op = F24_MultiPath._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F34)
+        return op
index 49d100e8f43fb5b98c77b5831030ecf5bb034f1f..27e94638a83f3a922736a401d8f218b846b10ee9 100644 (file)
@@ -90,3 +90,6 @@ class RHEL7_OSTreeSetup(F21_OSTreeSetup):
 
 class RHEL8_OSTreeSetup(F21_OSTreeSetup):
     pass
+
+class RHEL9_OSTreeSetup(F21_OSTreeSetup):
+    pass
index c43080fd335a6e26a6df28b576b2b59f299ce934..16034bec7aa326f1e7544522bbfd4f5696de9110 100644 (file)
@@ -18,7 +18,7 @@
 # with the express permission of Red Hat, Inc.
 #
 from pykickstart.version import RHEL5, RHEL6, RHEL8, versionToLongString
-from pykickstart.version import FC3, FC4, F9, F11, F12, F14, F17, F18, F23, F29
+from pykickstart.version import FC3, FC4, F9, F11, F12, F14, F17, F18, F23, F29, F34
 from pykickstart.base import BaseData, KickstartCommand
 from pykickstart.errors import KickstartParseError, KickstartParseWarning
 from pykickstart.options import KSOptionParser, mountpoint
@@ -760,3 +760,35 @@ class RHEL8_Partition(F29_Partition):
 
                     Btrfs support was removed.""" % versionToLongString(RHEL8)
         return op
+
+class F34_Partition(F29_Partition):
+    removedKeywords = F29_Partition.removedKeywords
+    removedAttrs = F29_Partition.removedAttrs
+
+    def _getParser(self):
+        op = F29_Partition._getParser(self)
+        op.remove_argument("--active", version=F34)
+        return op
+
+
+class RHEL9_Partition(F34_Partition):
+    removedKeywords = F34_Partition.removedKeywords
+    removedAttrs = F34_Partition.removedAttrs
+
+    def parse(self, args):
+        retval = F34_Partition.parse(self, args)
+        if retval.mountpoint.startswith("btrfs.") or retval.fstype == "btrfs":
+            raise KickstartParseError(_("Btrfs file system is not supported"), lineno=self.lineno)
+        return retval
+
+    def _getParser(self):
+        "Only necessary for the type change documentation"
+        op = F34_Partition._getParser(self)
+        for action in op._actions:
+            if "--fstype" in action.option_strings:
+                action.help += """
+
+                    .. versionchanged:: %s
+
+                    Btrfs support was removed.""" % versionToLongString(RHEL8)
+        return op
index 90844e57190928b410c76bfb52e8de9ee757c073..7c00ea53be63c713269137d7dcb775de5655370e 100644 (file)
@@ -810,3 +810,6 @@ class RHEL8_Raid(F29_Raid):
 
                     Btrfs support was removed.""" % versionToLongString(RHEL8)
         return op
+
+class RHEL9_Raid(RHEL8_Raid):
+    pass
index 22be1f927a28c757abf11195d315c70a5cca6d4b..cdc6d376d1f0d4d7f2aba21eefda13b0cc7132e4 100644 (file)
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import FC3, F8
+from pykickstart.version import FC3, F8, F37
 from pykickstart.base import KickstartCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.options import KSOptionParser
 
 from pykickstart.i18n import _
 
-import six
 
 class FC3_RootPw(KickstartCommand):
     removedKeywords = KickstartCommand.removedKeywords
@@ -49,9 +48,7 @@ class FC3_RootPw(KickstartCommand):
         retval = KickstartCommand.__str__(self)
 
         if self.password:
-            if isinstance(self.password, six.binary_type) and b'#' in self.password:
-                password = '\"' + self.password + '\"'
-            elif not isinstance(self.password, six.binary_type) and u'#' in self.password:
+            if '#' in self.password:
                 password = '\"' + self.password + '\"'
             else:
                 password = self.password
@@ -146,3 +143,27 @@ class F18_RootPw(F8_RootPw):
 
         self.set_to_self(ns)
         return self
+
+class F37_RootPw(F18_RootPw):
+    removedKeywords = F18_RootPw.removedKeywords
+    removedAttrs = F18_RootPw.removedAttrs
+
+    def __init__(self, writePriority=0, *args, **kwargs):
+        F18_RootPw.__init__(self, writePriority, *args, **kwargs)
+        self.allow_ssh = kwargs.get("allow_ssh", False)
+
+    def _getArgsAsStr(self):
+        retval = F18_RootPw._getArgsAsStr(self)
+
+        if self.allow_ssh:
+            retval += " --allow-ssh"
+
+        return retval
+
+    def _getParser(self):
+        op = F18_RootPw._getParser(self)
+        op.add_argument("--allow-ssh", action="store_true", default=False,
+                        version=F37, help="""
+                        This will allow remote root logins via ssh using only
+                        the password. Only use as a last resort.""")
+        return op
index 600830828e2b70dca9573b6591650a283e1f0fc5..637a7d1cb5947f3e4d26b0fe65a582679d1b75ab 100644 (file)
@@ -17,7 +17,9 @@
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.version import F7
+from textwrap import dedent
+
+from pykickstart.version import F7, F34, versionToLongString
 from pykickstart.base import KickstartCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.options import KSOptionParser
@@ -71,3 +73,45 @@ class F7_Updates(KickstartCommand):
             self.url = _ns.updates[0]
 
         return self
+
+
+class F34_Updates(F7_Updates):
+    removedKeywords = F7_Updates.removedKeywords
+    removedAttrs = F7_Updates.removedAttrs
+
+    def __str__(self):
+        retval = KickstartCommand.__str__(self)
+
+        if self.url:
+            retval += "updates %s\n" % self.url
+
+        return retval
+
+    def _getParser(self):
+        op = KSOptionParser(
+            prog="updates", version=F7, description="""
+            Specify the location of an updates.img for use in installation.
+            """
+        )
+        url_action = op.add_argument(
+            "url", metavar="[URL]", version=F7, help="""
+            If present, the URL for an updates image.
+
+            If not present, anaconda will attempt to load from a floppy disk.
+            """
+        )
+        url_action.help += dedent(
+            """
+
+            .. versionchanged:: %s
+
+            The URL for an updates image is required. Anaconda no longer supports
+            updates on a floppy disk.
+            """ % versionToLongString(F34)
+        )
+        return op
+
+    def parse(self, args):
+        ns = self.op.parse_args(args=args, lineno=self.lineno)
+        self.set_to_self(ns)
+        return self
index 766f927419f1d1fb750b69630096d7d3a58507a8..58ef7b365dc723eb9e1afd8cc5a71e0f67ec6dd1 100644 (file)
@@ -18,8 +18,8 @@
 # with the express permission of Red Hat, Inc.
 #
 from textwrap import dedent
-from pykickstart.version import versionToLongString, FC3, F11, F20
-from pykickstart.base import DeprecatedCommand, KickstartCommand
+from pykickstart.version import versionToLongString, FC3, F11, F20, F29
+from pykickstart.base import DeprecatedCommand, KickstartCommand, RemovedCommand
 from pykickstart.errors import KickstartParseError
 from pykickstart.options import KSOptionParser
 
@@ -128,3 +128,9 @@ class F20_Upgrade(DeprecatedCommand, F11_Upgrade):
                         recommended instead.  Therefore, the upgrade command
                         essentially does nothing.""" % versionToLongString(F20))
         return op
+
+class F29_Upgrade(RemovedCommand, F20_Upgrade):
+    def _getParser(self):
+        op = F20_Upgrade._getParser(self)
+        op.description += "\n\n.. versionremoved:: %s" % versionToLongString(F29)
+        return op
index e675e85fe91cd9a63334978eccb3c23c9dbd84bb..a20d16c50d667af7d0b8ed27708d1f8d5650c4fd 100644 (file)
@@ -23,7 +23,6 @@ from pykickstart.base import BaseData, KickstartCommand
 from pykickstart.options import KSOptionParser, commaSplit
 
 import warnings
-import six
 from pykickstart.i18n import _
 
 class FC6_UserData(BaseData):
@@ -68,9 +67,7 @@ class FC6_UserData(BaseData):
         if self.name:
             retval += " --name=%s" % self.name
         if self.password:
-            if isinstance(self.password, six.binary_type) and b'#' in self.password:
-                retval += " --password=\"%s\"" % self.password
-            elif not isinstance(self.password, six.binary_type) and u'#' in self.password:
+            if '#' in self.password:
                 retval += " --password=\"%s\"" % self.password
             else:
                 retval += " --password=%s" % self.password
index bcda6e661d2cf6abeacff99abf8d455a1bd0686f..d52a5031e4a16f67716f2dad839b08f901aa8246 100644 (file)
@@ -95,6 +95,9 @@ class RHEL7_VolGroupData(F21_VolGroupData):
 class RHEL8_VolGroupData(F21_VolGroupData):
     pass
 
+class RHEL9_VolGroupData(F21_VolGroupData):
+    pass
+
 class FC3_VolGroup(KickstartCommand):
     removedKeywords = KickstartCommand.removedKeywords
     removedAttrs = KickstartCommand.removedAttrs
@@ -236,3 +239,6 @@ class RHEL7_VolGroup(F21_VolGroup):
 
 class RHEL8_VolGroup(F21_VolGroup):
     pass
+
+class RHEL9_VolGroup(F21_VolGroup):
+    pass
index 073c1d6db38b24ee567218d8bd970cdfd575e154..17790558f0d17ad6b33f24f45159346408dbf2cd 100644 (file)
 # subject to the GNU General Public License and may only be used or replicated
 # with the express permission of Red Hat, Inc.
 #
-from pykickstart.errors import KickstartParseWarning
-from pykickstart.version import FC3, F12, F14
+from textwrap import dedent
+
+from pykickstart.errors import KickstartParseWarning, KickstartParseError
+from pykickstart.version import FC3, F12, F14, F37, versionToLongString
 from pykickstart.base import BaseData, KickstartCommand
 from pykickstart.options import KSOptionParser
 
@@ -83,6 +85,9 @@ class F12_ZFCPData(FC3_ZFCPData):
 class F14_ZFCPData(F12_ZFCPData):
     pass
 
+class F37_ZFCPData(F14_ZFCPData):
+    pass
+
 class FC3_ZFCP(KickstartCommand):
     removedKeywords = KickstartCommand.removedKeywords
     removedAttrs = KickstartCommand.removedAttrs
@@ -101,12 +106,19 @@ class FC3_ZFCP(KickstartCommand):
         return retval
 
     def _getParser(self):
-        op = KSOptionParser(prog="zfcp", description="define a zFCP storage device (IBM System z only)", version=FC3)
-        op.add_argument("--devnum", required=True, version=FC3, help="zFCP device number")
-        op.add_argument("--fcplun", required=True, version=FC3, help="zFCP LUN")
+        op = KSOptionParser(prog="zfcp", version=FC3, description="""
+                        Define a Fibre channel device. This option only applies
+                        on IBM System z.""")
+        op.add_argument("--devnum", required=True, version=FC3, help="""
+                        The device number (zFCP adaptor device bus ID).""")
+        op.add_argument("--fcplun", required=True, version=FC3, help="""
+                        The device's Logical Unit Number (LUN). Takes the form
+                        of a 16-digit number, preceded by 0x.""")
+        op.add_argument("--wwpn", required=True, version=FC3, help="""
+                        The device's World Wide Port Name (WWPN). Takes the form
+                        of a 16-digit number, preceded by 0x.""")
         op.add_argument("--scsiid", required=True, version=FC3, help="SCSI ID")
         op.add_argument("--scsilun", required=True, version=FC3, help="SCSI LUN")
-        op.add_argument("--wwpn", required=True, version=FC3, help="World Wide Port Name")
         return op
 
     def parse(self, args):
@@ -151,3 +163,50 @@ class F14_ZFCP(F12_ZFCP):
         op.remove_argument("--scsiid", version=F14)
         op.remove_argument("--scsilun", version=F14)
         return op
+
+class F37_ZFCP(F14_ZFCP):
+    removedKeywords = F14_ZFCP.removedKeywords
+    removedAttrs = F14_ZFCP.removedAttrs
+
+    def _getParser(self):
+        op = F14_ZFCP._getParser(self)
+        op.description += dedent("""
+
+            .. versionchanged:: %s
+
+            It is sufficient to specify an FCP device bus ID if automatic LUN scanning
+            is available. Otherwise all three parameters are required.
+
+            ``zfcp --devnum=<devnum> [--wwpn=<wwpn> --fcplun=<lun>]``
+
+            Automatic LUN scanning is available for FCP devices operating in NPIV mode
+            if it is not disabled through the `zfcp.allow_lun_scan` module parameter
+            (enabled by default). It provides access to all SCSI devices, that is, WWPNs
+            and FCP LUNs, found in the storage area network attached to the FCP device
+            with the specified bus ID.
+
+        """ % versionToLongString(F37))
+
+        op.epilog += dedent("""
+        For example::
+
+            zfcp --devnum=0.0.6000
+            zfcp --devnum=0.0.4000 --wwpn=0x5005076300C213e9 --fcplun=0x5022000000000000
+
+        """)
+
+        op.add_argument("--wwpn", default="", required=False, version=F37, help="""
+                        The argument is optional.""")
+        op.add_argument("--fcplun", default="", required=False, version=F37, help="""
+                        The argument is optional.""")
+        return op
+
+    def parse(self, args):
+        data = F14_ZFCP.parse(self, args)
+
+        if not ((data.devnum and not data.wwpn and not data.fcplun)
+                or (data.devnum and data.wwpn and data.fcplun)):
+            msg = _("Only --devnum or --devnum with --wwpn and --fcplun are allowed.")
+            raise KickstartParseError(msg, lineno=self.lineno)
+
+        return data
index 26e7f72158b045b824be0d1b8d6f1860c82baf62..194806c1ea3cbb2372ba4689d1817fd21abbe4c7 100644 (file)
@@ -48,6 +48,7 @@ class F15Handler(BaseHandler):
         "harddrive": commands.harddrive.FC3_HardDrive,
         "ignoredisk": commands.ignoredisk.F14_IgnoreDisk,
         "install": commands.upgrade.F11_Upgrade,
+        "interactive": commands.interactive.F15_Interactive,        # RemovedCommand
         "iscsi": commands.iscsi.F10_Iscsi,
         "iscsiname": commands.iscsiname.FC6_IscsiName,
         "keyboard": commands.keyboard.FC3_Keyboard,
index 174fdff0aab6d6b7f6f8d04d0f10f78172808af2..128d75282ff63a145678a36bbb2e851822140fb1 100644 (file)
@@ -57,6 +57,7 @@ class F18Handler(BaseHandler):
         "logvol": commands.logvol.F18_LogVol,
         "mediacheck": commands.mediacheck.FC4_MediaCheck,
         "method": commands.method.F18_Method,
+        "monitor": commands.monitor.F18_Monitor,  # RemovedCommand
         "multipath": commands.multipath.FC6_MultiPath,
         "network": commands.network.F18_Network,
         "nfs": commands.nfs.FC6_NFS,
index 9ef23cbd1939d0d635ac62e538ccd049e4abfbd3..5ff744fcb62ae4372e8a94a9bfbf4d7a7cf8102e 100644 (file)
@@ -34,7 +34,7 @@ class F25Handler(BaseHandler):
         "bootloader": commands.bootloader.F21_Bootloader,
         "btrfs": commands.btrfs.F23_BTRFS,
         "cdrom": commands.cdrom.FC3_Cdrom,
-        "clearpart": commands.clearpart.F21_ClearPart,
+        "clearpart": commands.clearpart.F25_ClearPart,
         "cmdline": commands.displaymode.FC3_DisplayMode,
         "device": commands.device.F24_Device,
         "deviceprobe": commands.deviceprobe.FC3_DeviceProbe,
@@ -48,7 +48,7 @@ class F25Handler(BaseHandler):
         "group": commands.group.F12_Group,
         "halt": commands.reboot.F23_Reboot,
         "harddrive": commands.harddrive.FC3_HardDrive,
-        "ignoredisk": commands.ignoredisk.F14_IgnoreDisk,
+        "ignoredisk": commands.ignoredisk.F25_IgnoreDisk,
         "install": commands.install.F20_Install,
         "iscsi": commands.iscsi.F17_Iscsi,
         "iscsiname": commands.iscsiname.FC6_IscsiName,
index 5756ae32cef9293708f1c2cd8519e3208f8316d4..0bfa9ba1b3ec0fa8d212f9fbd3b26b376974464a 100644 (file)
@@ -34,7 +34,7 @@ class F26Handler(BaseHandler):
         "bootloader": commands.bootloader.F21_Bootloader,
         "btrfs": commands.btrfs.F23_BTRFS,
         "cdrom": commands.cdrom.FC3_Cdrom,
-        "clearpart": commands.clearpart.F21_ClearPart,
+        "clearpart": commands.clearpart.F25_ClearPart,
         "cmdline": commands.displaymode.F26_DisplayMode,
         "device": commands.device.F24_Device,
         "deviceprobe": commands.deviceprobe.FC3_DeviceProbe,
@@ -48,7 +48,7 @@ class F26Handler(BaseHandler):
         "group": commands.group.F12_Group,
         "halt": commands.reboot.F23_Reboot,
         "harddrive": commands.harddrive.FC3_HardDrive,
-        "ignoredisk": commands.ignoredisk.F14_IgnoreDisk,
+        "ignoredisk": commands.ignoredisk.F25_IgnoreDisk,
         "install": commands.install.F20_Install,
         "iscsi": commands.iscsi.F17_Iscsi,
         "iscsiname": commands.iscsiname.FC6_IscsiName,
index 639c4e218361d6866e38cfedc4e1429d31e9616c..465fd8d9f7660e7fa26f2079d8cd6d8448738f7b 100644 (file)
@@ -34,7 +34,7 @@ class F27Handler(BaseHandler):
         "bootloader": commands.bootloader.F21_Bootloader,
         "btrfs": commands.btrfs.F23_BTRFS,
         "cdrom": commands.cdrom.FC3_Cdrom,
-        "clearpart": commands.clearpart.F21_ClearPart,
+        "clearpart": commands.clearpart.F25_ClearPart,
         "cmdline": commands.displaymode.F26_DisplayMode,
         "device": commands.device.F24_Device,
         "deviceprobe": commands.deviceprobe.FC3_DeviceProbe,
@@ -48,7 +48,7 @@ class F27Handler(BaseHandler):
         "group": commands.group.F12_Group,
         "halt": commands.reboot.F23_Reboot,
         "harddrive": commands.harddrive.FC3_HardDrive,
-        "ignoredisk": commands.ignoredisk.F14_IgnoreDisk,
+        "ignoredisk": commands.ignoredisk.F25_IgnoreDisk,
         "install": commands.install.F20_Install,
         "iscsi": commands.iscsi.F17_Iscsi,
         "iscsiname": commands.iscsiname.FC6_IscsiName,
index 70c66d636c15fb1da3d98e6ab0f6607c0cf0da33..e972dc10d41f93f1fccf6005ec46e498cd4dc711 100644 (file)
@@ -50,7 +50,7 @@ class F28Handler(BaseHandler):
         "halt": commands.reboot.F23_Reboot,
         "harddrive": commands.harddrive.FC3_HardDrive,
         "hmc" : commands.hmc.F28_Hmc,
-        "ignoredisk": commands.ignoredisk.F14_IgnoreDisk,
+        "ignoredisk": commands.ignoredisk.F25_IgnoreDisk,
         "install": commands.install.F20_Install,
         "iscsi": commands.iscsi.F17_Iscsi,
         "iscsiname": commands.iscsiname.FC6_IscsiName,
index 9f1740b238df152a63d1ee20aca6755a894c1ede..93fdf602cedaa12f76103137cfbde1a77585a8d9 100644 (file)
@@ -88,6 +88,7 @@ class F29Handler(BaseHandler):
         "text": commands.displaymode.F26_DisplayMode,
         "timezone": commands.timezone.F25_Timezone,
         "updates": commands.updates.F7_Updates,
+        "upgrade": commands.upgrade.F29_Upgrade,  # RemovedCommand
         "url": commands.url.F27_Url,
         "user": commands.user.F24_User,
         "vnc": commands.vnc.F9_Vnc,
index f4ac15ea9966e5b2d5806c5f6140dec1c42ad8a3..dc2f7eced2827370f437e98d5fe8f0904af3c09c 100644 (file)
@@ -30,14 +30,14 @@ class F34Handler(BaseHandler):
         "authselect": commands.authselect.F28_Authselect,
         "autopart": commands.autopart.F29_AutoPart,
         "autostep": commands.autostep.F34_AutoStep,
-        "bootloader": commands.bootloader.F29_Bootloader,
+        "bootloader": commands.bootloader.F34_Bootloader,
         "btrfs": commands.btrfs.F23_BTRFS,
         "cdrom": commands.cdrom.FC3_Cdrom,
         "clearpart": commands.clearpart.F28_ClearPart,
         "cmdline": commands.displaymode.F26_DisplayMode,
-        "device": commands.device.F24_Device,
-        "deviceprobe": commands.deviceprobe.F29_DeviceProbe,
-        "dmraid": commands.dmraid.F24_DmRaid,
+        "device": commands.device.F34_Device,
+        "deviceprobe": commands.deviceprobe.F34_DeviceProbe,
+        "dmraid": commands.dmraid.F34_DmRaid,
         "driverdisk": commands.driverdisk.F14_DriverDisk,
         "module": commands.module.F31_Module,
         "eula": commands.eula.F20_Eula,
@@ -49,8 +49,8 @@ class F34Handler(BaseHandler):
         "halt": commands.reboot.F23_Reboot,
         "harddrive": commands.harddrive.F33_HardDrive,
         "hmc": commands.hmc.F28_Hmc,
-        "ignoredisk": commands.ignoredisk.F29_IgnoreDisk,
-        "install": commands.install.F29_Install,
+        "ignoredisk": commands.ignoredisk.F34_IgnoreDisk,
+        "install": commands.install.F34_Install,
         "iscsi": commands.iscsi.F17_Iscsi,
         "iscsiname": commands.iscsiname.FC6_IscsiName,
         "keyboard": commands.keyboard.F18_Keyboard,
@@ -59,16 +59,16 @@ class F34Handler(BaseHandler):
         "logging": commands.logging.F34_Logging,
         "logvol": commands.logvol.F29_LogVol,
         "mediacheck": commands.mediacheck.FC4_MediaCheck,
-        "method": commands.method.F28_Method,
+        "method": commands.method.F34_Method,
         "mount": commands.mount.F27_Mount,
-        "multipath": commands.multipath.F24_MultiPath,
+        "multipath": commands.multipath.F34_MultiPath,
         "network": commands.network.F27_Network,
         "nfs": commands.nfs.FC6_NFS,
         "nvdimm": commands.nvdimm.F28_Nvdimm,
         "timesource": commands.timesource.F33_Timesource,
         "ostreesetup": commands.ostreesetup.F21_OSTreeSetup,
-        "part": commands.partition.F29_Partition,
-        "partition": commands.partition.F29_Partition,
+        "part": commands.partition.F34_Partition,
+        "partition": commands.partition.F34_Partition,
         "poweroff": commands.reboot.F23_Reboot,
         "raid": commands.raid.F29_Raid,
         "realm": commands.realm.F19_Realm,
@@ -86,7 +86,7 @@ class F34Handler(BaseHandler):
         "sshkey": commands.sshkey.F22_SshKey,
         "text": commands.displaymode.F26_DisplayMode,
         "timezone": commands.timezone.F33_Timezone,
-        "updates": commands.updates.F7_Updates,
+        "updates": commands.updates.F34_Updates,
         "url": commands.url.F30_Url,
         "user": commands.user.F24_User,
         "vnc": commands.vnc.F9_Vnc,
diff --git a/mic/3rdparty/pykickstart/handlers/f35.py b/mic/3rdparty/pykickstart/handlers/f35.py
new file mode 100644 (file)
index 0000000..be5a81e
--- /dev/null
@@ -0,0 +1,124 @@
+#
+# Copyright 2021 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.
+#
+__all__ = ["F35Handler"]
+
+from pykickstart import commands
+from pykickstart.base import BaseHandler
+from pykickstart.version import F35
+
+class F35Handler(BaseHandler):
+    version = F35
+
+    commandMap = {
+        "auth": commands.authconfig.F35_Authconfig, # RemovedCommand
+        "authconfig": commands.authconfig.F35_Authconfig, # RemovedCommand
+        "authselect": commands.authselect.F28_Authselect,
+        "autopart": commands.autopart.F29_AutoPart,
+        "autostep": commands.autostep.F34_AutoStep,
+        "bootloader": commands.bootloader.F34_Bootloader,
+        "btrfs": commands.btrfs.F23_BTRFS,
+        "cdrom": commands.cdrom.FC3_Cdrom,
+        "clearpart": commands.clearpart.F28_ClearPart,
+        "cmdline": commands.displaymode.F26_DisplayMode,
+        "device": commands.device.F34_Device,
+        "deviceprobe": commands.deviceprobe.F34_DeviceProbe,
+        "dmraid": commands.dmraid.F34_DmRaid,
+        "driverdisk": commands.driverdisk.F14_DriverDisk,
+        "module": commands.module.F31_Module,
+        "eula": commands.eula.F20_Eula,
+        "fcoe": commands.fcoe.F28_Fcoe,
+        "firewall": commands.firewall.F28_Firewall,
+        "firstboot": commands.firstboot.FC3_Firstboot,
+        "graphical": commands.displaymode.F26_DisplayMode,
+        "group": commands.group.F12_Group,
+        "halt": commands.reboot.F23_Reboot,
+        "harddrive": commands.harddrive.F33_HardDrive,
+        "hmc": commands.hmc.F28_Hmc,
+        "ignoredisk": commands.ignoredisk.F34_IgnoreDisk,
+        "install": commands.install.F34_Install,
+        "iscsi": commands.iscsi.F17_Iscsi,
+        "iscsiname": commands.iscsiname.FC6_IscsiName,
+        "keyboard": commands.keyboard.F18_Keyboard,
+        "lang": commands.lang.F19_Lang,
+        "liveimg": commands.liveimg.F19_Liveimg,
+        "logging": commands.logging.F34_Logging,
+        "logvol": commands.logvol.F29_LogVol,
+        "mediacheck": commands.mediacheck.FC4_MediaCheck,
+        "method": commands.method.F34_Method,
+        "mount": commands.mount.F27_Mount,
+        "multipath": commands.multipath.F34_MultiPath,
+        "network": commands.network.F27_Network,
+        "nfs": commands.nfs.FC6_NFS,
+        "nvdimm": commands.nvdimm.F28_Nvdimm,
+        "timesource": commands.timesource.F33_Timesource,
+        "ostreesetup": commands.ostreesetup.F21_OSTreeSetup,
+        "part": commands.partition.F34_Partition,
+        "partition": commands.partition.F34_Partition,
+        "poweroff": commands.reboot.F23_Reboot,
+        "raid": commands.raid.F29_Raid,
+        "realm": commands.realm.F19_Realm,
+        "reboot": commands.reboot.F23_Reboot,
+        "repo": commands.repo.F33_Repo,
+        "reqpart": commands.reqpart.F23_ReqPart,
+        "rescue": commands.rescue.F10_Rescue,
+        "rootpw": commands.rootpw.F18_RootPw,
+        "selinux": commands.selinux.FC3_SELinux,
+        "services": commands.services.FC6_Services,
+        "shutdown": commands.reboot.F23_Reboot,
+        "skipx": commands.skipx.FC3_SkipX,
+        "snapshot": commands.snapshot.F26_Snapshot,
+        "sshpw": commands.sshpw.F24_SshPw,
+        "sshkey": commands.sshkey.F22_SshKey,
+        "text": commands.displaymode.F26_DisplayMode,
+        "timezone": commands.timezone.F33_Timezone,
+        "updates": commands.updates.F34_Updates,
+        "url": commands.url.F30_Url,
+        "user": commands.user.F24_User,
+        "vnc": commands.vnc.F9_Vnc,
+        "volgroup": commands.volgroup.F21_VolGroup,
+        "xconfig": commands.xconfig.F14_XConfig,
+        "zerombr": commands.zerombr.F9_ZeroMbr,
+        "zfcp": commands.zfcp.F14_ZFCP,
+        "zipl": commands.zipl.F32_Zipl,
+    }
+
+    dataMap = {
+        "BTRFSData": commands.btrfs.F23_BTRFSData,
+        "DriverDiskData": commands.driverdisk.F14_DriverDiskData,
+        "DeviceData": commands.device.F8_DeviceData,
+        "DmRaidData": commands.dmraid.FC6_DmRaidData,
+        "ModuleData": commands.module.F31_ModuleData,
+        "TimesourceData": commands.timesource.F33_TimesourceData,
+        "FcoeData": commands.fcoe.F28_FcoeData,
+        "GroupData": commands.group.F12_GroupData,
+        "IscsiData": commands.iscsi.F17_IscsiData,
+        "LogVolData": commands.logvol.F29_LogVolData,
+        "MountData": commands.mount.F27_MountData,
+        "MultiPathData": commands.multipath.FC6_MultiPathData,
+        "NetworkData": commands.network.F27_NetworkData,
+        "NvdimmData": commands.nvdimm.F28_NvdimmData,
+        "PartData": commands.partition.F29_PartData,
+        "RaidData": commands.raid.F29_RaidData,
+        "RepoData": commands.repo.F30_RepoData,
+        "SnapshotData": commands.snapshot.F26_SnapshotData,
+        "SshPwData": commands.sshpw.F24_SshPwData,
+        "SshKeyData": commands.sshkey.F22_SshKeyData,
+        "UserData": commands.user.F19_UserData,
+        "VolGroupData": commands.volgroup.F21_VolGroupData,
+        "ZFCPData": commands.zfcp.F14_ZFCPData,
+    }
diff --git a/mic/3rdparty/pykickstart/handlers/f36.py b/mic/3rdparty/pykickstart/handlers/f36.py
new file mode 100644 (file)
index 0000000..8241d1a
--- /dev/null
@@ -0,0 +1,124 @@
+#
+# Copyright 2021 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.
+#
+__all__ = ["F36Handler"]
+
+from pykickstart import commands
+from pykickstart.base import BaseHandler
+from pykickstart.version import F36
+
+class F36Handler(BaseHandler):
+    version = F36
+
+    commandMap = {
+        "auth": commands.authconfig.F35_Authconfig, # RemovedCommand
+        "authconfig": commands.authconfig.F35_Authconfig, # RemovedCommand
+        "authselect": commands.authselect.F28_Authselect,
+        "autopart": commands.autopart.F29_AutoPart,
+        "autostep": commands.autostep.F34_AutoStep,
+        "bootloader": commands.bootloader.F34_Bootloader,
+        "btrfs": commands.btrfs.F23_BTRFS,
+        "cdrom": commands.cdrom.FC3_Cdrom,
+        "clearpart": commands.clearpart.F28_ClearPart,
+        "cmdline": commands.displaymode.F26_DisplayMode,
+        "device": commands.device.F34_Device,
+        "deviceprobe": commands.deviceprobe.F34_DeviceProbe,
+        "dmraid": commands.dmraid.F34_DmRaid,
+        "driverdisk": commands.driverdisk.F14_DriverDisk,
+        "module": commands.module.F31_Module,
+        "eula": commands.eula.F20_Eula,
+        "fcoe": commands.fcoe.F28_Fcoe,
+        "firewall": commands.firewall.F28_Firewall,
+        "firstboot": commands.firstboot.FC3_Firstboot,
+        "graphical": commands.displaymode.F26_DisplayMode,
+        "group": commands.group.F12_Group,
+        "halt": commands.reboot.F23_Reboot,
+        "harddrive": commands.harddrive.F33_HardDrive,
+        "hmc": commands.hmc.F28_Hmc,
+        "ignoredisk": commands.ignoredisk.F34_IgnoreDisk,
+        "install": commands.install.F34_Install,
+        "iscsi": commands.iscsi.F17_Iscsi,
+        "iscsiname": commands.iscsiname.FC6_IscsiName,
+        "keyboard": commands.keyboard.F18_Keyboard,
+        "lang": commands.lang.F19_Lang,
+        "liveimg": commands.liveimg.F19_Liveimg,
+        "logging": commands.logging.F34_Logging,
+        "logvol": commands.logvol.F29_LogVol,
+        "mediacheck": commands.mediacheck.FC4_MediaCheck,
+        "method": commands.method.F34_Method,
+        "mount": commands.mount.F27_Mount,
+        "multipath": commands.multipath.F34_MultiPath,
+        "network": commands.network.F27_Network,
+        "nfs": commands.nfs.FC6_NFS,
+        "nvdimm": commands.nvdimm.F28_Nvdimm,
+        "timesource": commands.timesource.F33_Timesource,
+        "ostreesetup": commands.ostreesetup.F21_OSTreeSetup,
+        "part": commands.partition.F34_Partition,
+        "partition": commands.partition.F34_Partition,
+        "poweroff": commands.reboot.F23_Reboot,
+        "raid": commands.raid.F29_Raid,
+        "realm": commands.realm.F19_Realm,
+        "reboot": commands.reboot.F23_Reboot,
+        "repo": commands.repo.F33_Repo,
+        "reqpart": commands.reqpart.F23_ReqPart,
+        "rescue": commands.rescue.F10_Rescue,
+        "rootpw": commands.rootpw.F18_RootPw,
+        "selinux": commands.selinux.FC3_SELinux,
+        "services": commands.services.FC6_Services,
+        "shutdown": commands.reboot.F23_Reboot,
+        "skipx": commands.skipx.FC3_SkipX,
+        "snapshot": commands.snapshot.F26_Snapshot,
+        "sshpw": commands.sshpw.F24_SshPw,
+        "sshkey": commands.sshkey.F22_SshKey,
+        "text": commands.displaymode.F26_DisplayMode,
+        "timezone": commands.timezone.F33_Timezone,
+        "updates": commands.updates.F34_Updates,
+        "url": commands.url.F30_Url,
+        "user": commands.user.F24_User,
+        "vnc": commands.vnc.F9_Vnc,
+        "volgroup": commands.volgroup.F21_VolGroup,
+        "xconfig": commands.xconfig.F14_XConfig,
+        "zerombr": commands.zerombr.F9_ZeroMbr,
+        "zfcp": commands.zfcp.F14_ZFCP,
+        "zipl": commands.zipl.F32_Zipl,
+    }
+
+    dataMap = {
+        "BTRFSData": commands.btrfs.F23_BTRFSData,
+        "DriverDiskData": commands.driverdisk.F14_DriverDiskData,
+        "DeviceData": commands.device.F8_DeviceData,
+        "DmRaidData": commands.dmraid.FC6_DmRaidData,
+        "ModuleData": commands.module.F31_ModuleData,
+        "TimesourceData": commands.timesource.F33_TimesourceData,
+        "FcoeData": commands.fcoe.F28_FcoeData,
+        "GroupData": commands.group.F12_GroupData,
+        "IscsiData": commands.iscsi.F17_IscsiData,
+        "LogVolData": commands.logvol.F29_LogVolData,
+        "MountData": commands.mount.F27_MountData,
+        "MultiPathData": commands.multipath.FC6_MultiPathData,
+        "NetworkData": commands.network.F27_NetworkData,
+        "NvdimmData": commands.nvdimm.F28_NvdimmData,
+        "PartData": commands.partition.F29_PartData,
+        "RaidData": commands.raid.F29_RaidData,
+        "RepoData": commands.repo.F30_RepoData,
+        "SnapshotData": commands.snapshot.F26_SnapshotData,
+        "SshPwData": commands.sshpw.F24_SshPwData,
+        "SshKeyData": commands.sshkey.F22_SshKeyData,
+        "UserData": commands.user.F19_UserData,
+        "VolGroupData": commands.volgroup.F21_VolGroupData,
+        "ZFCPData": commands.zfcp.F14_ZFCPData,
+    }
diff --git a/mic/3rdparty/pykickstart/handlers/f37.py b/mic/3rdparty/pykickstart/handlers/f37.py
new file mode 100644 (file)
index 0000000..c393bb8
--- /dev/null
@@ -0,0 +1,124 @@
+#
+# Copyright 2021 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.
+#
+__all__ = ["F37Handler"]
+
+from pykickstart import commands
+from pykickstart.base import BaseHandler
+from pykickstart.version import F37
+
+class F37Handler(BaseHandler):
+    version = F37
+
+    commandMap = {
+        "auth": commands.authconfig.F35_Authconfig, # RemovedCommand
+        "authconfig": commands.authconfig.F35_Authconfig, # RemovedCommand
+        "authselect": commands.authselect.F28_Authselect,
+        "autopart": commands.autopart.F29_AutoPart,
+        "autostep": commands.autostep.F34_AutoStep,
+        "bootloader": commands.bootloader.F34_Bootloader,
+        "btrfs": commands.btrfs.F23_BTRFS,
+        "cdrom": commands.cdrom.FC3_Cdrom,
+        "clearpart": commands.clearpart.F28_ClearPart,
+        "cmdline": commands.displaymode.F26_DisplayMode,
+        "device": commands.device.F34_Device,
+        "deviceprobe": commands.deviceprobe.F34_DeviceProbe,
+        "dmraid": commands.dmraid.F34_DmRaid,
+        "driverdisk": commands.driverdisk.F14_DriverDisk,
+        "module": commands.module.F31_Module,
+        "eula": commands.eula.F20_Eula,
+        "fcoe": commands.fcoe.F28_Fcoe,
+        "firewall": commands.firewall.F28_Firewall,
+        "firstboot": commands.firstboot.FC3_Firstboot,
+        "graphical": commands.displaymode.F26_DisplayMode,
+        "group": commands.group.F12_Group,
+        "halt": commands.reboot.F23_Reboot,
+        "harddrive": commands.harddrive.F33_HardDrive,
+        "hmc": commands.hmc.F28_Hmc,
+        "ignoredisk": commands.ignoredisk.F34_IgnoreDisk,
+        "install": commands.install.F34_Install,
+        "iscsi": commands.iscsi.F17_Iscsi,
+        "iscsiname": commands.iscsiname.FC6_IscsiName,
+        "keyboard": commands.keyboard.F18_Keyboard,
+        "lang": commands.lang.F19_Lang,
+        "liveimg": commands.liveimg.F19_Liveimg,
+        "logging": commands.logging.F34_Logging,
+        "logvol": commands.logvol.F29_LogVol,
+        "mediacheck": commands.mediacheck.FC4_MediaCheck,
+        "method": commands.method.F34_Method,
+        "mount": commands.mount.F27_Mount,
+        "multipath": commands.multipath.F34_MultiPath,
+        "network": commands.network.F27_Network,
+        "nfs": commands.nfs.FC6_NFS,
+        "nvdimm": commands.nvdimm.F28_Nvdimm,
+        "timesource": commands.timesource.F33_Timesource,
+        "ostreesetup": commands.ostreesetup.F21_OSTreeSetup,
+        "part": commands.partition.F34_Partition,
+        "partition": commands.partition.F34_Partition,
+        "poweroff": commands.reboot.F23_Reboot,
+        "raid": commands.raid.F29_Raid,
+        "realm": commands.realm.F19_Realm,
+        "reboot": commands.reboot.F23_Reboot,
+        "repo": commands.repo.F33_Repo,
+        "reqpart": commands.reqpart.F23_ReqPart,
+        "rescue": commands.rescue.F10_Rescue,
+        "rootpw": commands.rootpw.F37_RootPw,
+        "selinux": commands.selinux.FC3_SELinux,
+        "services": commands.services.FC6_Services,
+        "shutdown": commands.reboot.F23_Reboot,
+        "skipx": commands.skipx.FC3_SkipX,
+        "snapshot": commands.snapshot.F26_Snapshot,
+        "sshpw": commands.sshpw.F24_SshPw,
+        "sshkey": commands.sshkey.F22_SshKey,
+        "text": commands.displaymode.F26_DisplayMode,
+        "timezone": commands.timezone.F33_Timezone,
+        "updates": commands.updates.F34_Updates,
+        "url": commands.url.F30_Url,
+        "user": commands.user.F24_User,
+        "vnc": commands.vnc.F9_Vnc,
+        "volgroup": commands.volgroup.F21_VolGroup,
+        "xconfig": commands.xconfig.F14_XConfig,
+        "zerombr": commands.zerombr.F9_ZeroMbr,
+        "zfcp": commands.zfcp.F37_ZFCP,
+        "zipl": commands.zipl.F32_Zipl,
+    }
+
+    dataMap = {
+        "BTRFSData": commands.btrfs.F23_BTRFSData,
+        "DriverDiskData": commands.driverdisk.F14_DriverDiskData,
+        "DeviceData": commands.device.F8_DeviceData,
+        "DmRaidData": commands.dmraid.FC6_DmRaidData,
+        "ModuleData": commands.module.F31_ModuleData,
+        "TimesourceData": commands.timesource.F33_TimesourceData,
+        "FcoeData": commands.fcoe.F28_FcoeData,
+        "GroupData": commands.group.F12_GroupData,
+        "IscsiData": commands.iscsi.F17_IscsiData,
+        "LogVolData": commands.logvol.F29_LogVolData,
+        "MountData": commands.mount.F27_MountData,
+        "MultiPathData": commands.multipath.FC6_MultiPathData,
+        "NetworkData": commands.network.F27_NetworkData,
+        "NvdimmData": commands.nvdimm.F28_NvdimmData,
+        "PartData": commands.partition.F29_PartData,
+        "RaidData": commands.raid.F29_RaidData,
+        "RepoData": commands.repo.F30_RepoData,
+        "SnapshotData": commands.snapshot.F26_SnapshotData,
+        "SshPwData": commands.sshpw.F24_SshPwData,
+        "SshKeyData": commands.sshkey.F22_SshKeyData,
+        "UserData": commands.user.F19_UserData,
+        "VolGroupData": commands.volgroup.F21_VolGroupData,
+        "ZFCPData": commands.zfcp.F37_ZFCPData,
+    }
index 747b8efbbdfa102c58183c8310083f04de0f2137..3abe0df5d763b15cc96d3614363444aef83fda33 100644 (file)
@@ -51,11 +51,13 @@ class F7Handler(BaseHandler):
         "iscsiname": commands.iscsiname.FC6_IscsiName,
         "keyboard": commands.keyboard.FC3_Keyboard,
         "lang": commands.lang.FC3_Lang,
+        "langsupport": commands.langsupport.F7_LangSupport,  # RemovedCommand
         "logging": commands.logging.FC6_Logging,
         "logvol": commands.logvol.FC4_LogVol,
         "mediacheck": commands.mediacheck.FC4_MediaCheck,
         "method": commands.method.FC6_Method,
         "monitor": commands.monitor.FC6_Monitor,
+        "mouse": commands.mouse.F7_Mouse,  # RemovedCommand
         "multipath": commands.multipath.FC6_MultiPath,
         "network": commands.network.FC6_Network,
         "nfs": commands.nfs.FC6_NFS,
index 0d87481e4b8522b2c0e5a9cf06435986f3704854..91c3d990a87dc9e9fd464b6d29b289c418f03e03 100644 (file)
@@ -49,6 +49,8 @@ class FC4Handler(BaseHandler):
         "keyboard": commands.keyboard.FC3_Keyboard,
         "lang": commands.lang.FC3_Lang,
         "langsupport": commands.langsupport.FC3_LangSupport,
+        "lilo": commands.bootloader.FC4_Lilo,  # RemovedCommand
+        "lilocheck": commands.lilocheck.FC4_LiloCheck,  # RemovedCommand
         "logvol": commands.logvol.FC4_LogVol,
         "mediacheck": commands.mediacheck.FC4_MediaCheck,
         "method": commands.method.FC3_Method,
diff --git a/mic/3rdparty/pykickstart/handlers/rhel9.py b/mic/3rdparty/pykickstart/handlers/rhel9.py
new file mode 100644 (file)
index 0000000..3c11575
--- /dev/null
@@ -0,0 +1,128 @@
+#
+# Martin Kolman <mkolman@redhat.com>
+#
+# Copyright 2021 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.
+#
+__all__ = ["RHEL9Handler"]
+
+from pykickstart import commands
+from pykickstart.base import BaseHandler
+from pykickstart.version import RHEL9
+
+class RHEL9Handler(BaseHandler):
+    version = RHEL9
+
+    commandMap = {
+        "auth": commands.authconfig.F28_Authconfig,
+        "authconfig": commands.authconfig.F28_Authconfig,
+        "authselect": commands.authselect.F28_Authselect,
+        "autopart": commands.autopart.RHEL9_AutoPart,
+        "autostep": commands.autostep.F34_AutoStep,
+        "bootloader": commands.bootloader.RHEL9_Bootloader,
+        "btrfs": commands.btrfs.RHEL9_BTRFS,
+        "cdrom": commands.cdrom.FC3_Cdrom,
+        "clearpart": commands.clearpart.F28_ClearPart,
+        "cmdline": commands.displaymode.F26_DisplayMode,
+        "device": commands.device.F34_Device,
+        "deviceprobe": commands.deviceprobe.F34_DeviceProbe,
+        "dmraid": commands.dmraid.F34_DmRaid,
+        "driverdisk": commands.driverdisk.F14_DriverDisk,
+        "module": commands.module.F31_Module,
+        "eula": commands.eula.F20_Eula,
+        "fcoe": commands.fcoe.RHEL9_Fcoe,
+        "firewall": commands.firewall.F28_Firewall,
+        "firstboot": commands.firstboot.FC3_Firstboot,
+        "graphical": commands.displaymode.F26_DisplayMode,
+        "group": commands.group.F12_Group,
+        "halt": commands.reboot.F23_Reboot,
+        "harddrive": commands.harddrive.F33_HardDrive,
+        "hmc": commands.hmc.F28_Hmc,
+        "ignoredisk": commands.ignoredisk.F34_IgnoreDisk,
+        "install": commands.install.F34_Install,
+        "iscsi": commands.iscsi.F17_Iscsi,
+        "iscsiname": commands.iscsiname.FC6_IscsiName,
+        "keyboard": commands.keyboard.F18_Keyboard,
+        "lang": commands.lang.F19_Lang,
+        "liveimg": commands.liveimg.F19_Liveimg,
+        "logging": commands.logging.F34_Logging,
+        "logvol": commands.logvol.RHEL9_LogVol,
+        "mediacheck": commands.mediacheck.FC4_MediaCheck,
+        "method": commands.method.F34_Method,
+        "mount": commands.mount.F27_Mount,
+        "multipath": commands.multipath.F34_MultiPath,
+        "network": commands.network.F27_Network,
+        "nfs": commands.nfs.FC6_NFS,
+        "nvdimm": commands.nvdimm.F28_Nvdimm,
+        "timesource": commands.timesource.F33_Timesource,
+        "ostreesetup": commands.ostreesetup.RHEL9_OSTreeSetup,
+        "part": commands.partition.RHEL9_Partition,
+        "partition": commands.partition.RHEL9_Partition,
+        "poweroff": commands.reboot.F23_Reboot,
+        "raid": commands.raid.RHEL9_Raid,
+        "realm": commands.realm.F19_Realm,
+        "reboot": commands.reboot.F23_Reboot,
+        "repo": commands.repo.F33_Repo,
+        "reqpart": commands.reqpart.F23_ReqPart,
+        "rescue": commands.rescue.F10_Rescue,
+        "rhsm": commands.rhsm.RHEL8_RHSM,
+        "rootpw": commands.rootpw.F37_RootPw,
+        "selinux": commands.selinux.FC3_SELinux,
+        "services": commands.services.FC6_Services,
+        "shutdown": commands.reboot.F23_Reboot,
+        "skipx": commands.skipx.FC3_SkipX,
+        "snapshot": commands.snapshot.F26_Snapshot,
+        "sshpw": commands.sshpw.F24_SshPw,
+        "sshkey": commands.sshkey.F22_SshKey,
+        "syspurpose" : commands.syspurpose.RHEL8_Syspurpose,
+        "text": commands.displaymode.F26_DisplayMode,
+        "timezone": commands.timezone.F33_Timezone,
+        "updates": commands.updates.F34_Updates,
+        "url": commands.url.F30_Url,
+        "user": commands.user.F24_User,
+        "vnc": commands.vnc.F9_Vnc,
+        "volgroup": commands.volgroup.RHEL9_VolGroup,
+        "xconfig": commands.xconfig.F14_XConfig,
+        "zerombr": commands.zerombr.F9_ZeroMbr,
+        "zfcp": commands.zfcp.F14_ZFCP,
+        "zipl": commands.zipl.F32_Zipl,
+    }
+
+    dataMap = {
+        "BTRFSData": commands.btrfs.F23_BTRFSData,
+        "DriverDiskData": commands.driverdisk.F14_DriverDiskData,
+        "DeviceData": commands.device.F8_DeviceData,
+        "DmRaidData": commands.dmraid.FC6_DmRaidData,
+        "ModuleData": commands.module.F31_ModuleData,
+        "TimesourceData": commands.timesource.F33_TimesourceData,
+        "FcoeData": commands.fcoe.RHEL9_FcoeData,
+        "GroupData": commands.group.F12_GroupData,
+        "IscsiData": commands.iscsi.F17_IscsiData,
+        "LogVolData": commands.logvol.F29_LogVolData,
+        "MountData": commands.mount.F27_MountData,
+        "MultiPathData": commands.multipath.FC6_MultiPathData,
+        "NetworkData": commands.network.F27_NetworkData,
+        "NvdimmData": commands.nvdimm.F28_NvdimmData,
+        "PartData": commands.partition.F29_PartData,
+        "RaidData": commands.raid.F29_RaidData,
+        "RepoData": commands.repo.F30_RepoData,
+        "SnapshotData": commands.snapshot.F26_SnapshotData,
+        "SshPwData": commands.sshpw.F24_SshPwData,
+        "SshKeyData": commands.sshkey.F22_SshKeyData,
+        "UserData": commands.user.F19_UserData,
+        "VolGroupData": commands.volgroup.RHEL9_VolGroupData,
+        "ZFCPData": commands.zfcp.F14_ZFCPData,
+    }
index 49fb84f543380c26dc323c2a2465f8db1e93eac4..0fcbd1271dcbef1c4e6ed7b83d5a5d49cf99b1a9 100644 (file)
 #
 import gettext
 import os
-import six
 
 def _find_locale_files():
     module_path = os.path.abspath(__file__)
     locale_path = os.path.join(os.path.dirname(module_path), 'locale')
 
     gettext.bindtextdomain("pykickstart", locale_path)
-    gettext.textdomain("pykickstart")
 _find_locale_files()
 
-if six.PY3:
-    _ = lambda x: gettext.gettext(x) if x else ''
-else:
-    _ = lambda x: gettext.lgettext(x) if x else ''
+_ = lambda x: gettext.translation("pykickstart", fallback=True).gettext(x) if x != "" else ""
index fb935f2f037fcfdfbe5574a770d8022a499e7573..eb76b65f4ec4dbc8c3ff1bc8abda325bc1423814 100644 (file)
 #
 import requests
 import shutil
-import six
 
 from pykickstart.errors import KickstartError
 from pykickstart.i18n import _
 from requests.exceptions import SSLError, RequestException
 
-_is_url = lambda location: '://' in location  # RFC 3986
+is_url = lambda location: '://' in location  # RFC 3986
 
 SSL_VERIFY = True
 
@@ -39,7 +38,7 @@ def load_to_str(location):
     Returns: string with contents
     Raises: KickstartError on error reading'''
 
-    if _is_url(location):
+    if is_url(location):
         return _load_url(location)
     else:
         return _load_file(location)
@@ -55,7 +54,7 @@ def load_to_file(location, destination):
     Returns: file name with contents
     Raises: KickstartError on error reading or writing'''
 
-    if _is_url(location):
+    if is_url(location):
         contents = _load_url(location)
 
         # Write to file
@@ -89,12 +88,8 @@ def _load_file(filename):
     '''Load a file's contents and return them as a string'''
 
     try:
-        if six.PY3:
-            with open(filename, 'rb') as fh:
-                contents = fh.read().decode("utf-8")
-        else:
-            with open(filename, 'r') as fh:
-                contents = fh.read()
+        with open(filename, 'rb') as fh:
+            contents = fh.read().decode("utf-8")
     except IOError as e:
         raise KickstartError(_('Error opening file: %s') % str(e))
 
index afabb11ee51b6644ead14e5f851a0d1d63fbdf40..7edf8aa486138323859d7d65dcf85984c3594615 100644 (file)
@@ -30,16 +30,9 @@ This module exports several important classes:
 
     KickstartParser - The kickstart file parser state machine.
 """
-
-from __future__ import print_function
-
-try:
-    from collections.abc import Iterator
-except ImportError:  # python2 compatibility
-    from collections import Iterator
+from collections.abc import Iterator
 
 import os
-import six
 import shlex
 import sys
 import warnings
@@ -63,8 +56,7 @@ def _preprocessStateMachine(lineIter):
     lineno = 0
     retval = ""
 
-    if six.PY3:
-        retval = retval.encode(sys.getdefaultencoding())
+    retval = retval.encode(sys.getdefaultencoding())
 
     while True:
         try:
@@ -81,9 +73,7 @@ def _preprocessStateMachine(lineIter):
 
         ll = l.strip()
         if not ll.startswith("%ksappend"):
-            if six.PY3:
-                l = l.encode(sys.getdefaultencoding())
-            retval += l
+            retval += l.encode(sys.getdefaultencoding())
             continue
 
         # Try to pull down the remote file.
@@ -134,7 +124,7 @@ def preprocessFromString(s):
        run.  Returns the location of the complete kickstart file.
     """
     s = preprocessFromStringToString(s)
-    if s:
+    if s.strip():
         import tempfile
         (outF, outName) = tempfile.mkstemp(suffix="-ks.cfg")
 
@@ -151,7 +141,7 @@ def preprocessKickstart(f):
        run.  Returns the location of the complete kickstart file.
     """
     s = preprocessKickstartToString(f)
-    if s:
+    if s.strip():
         import tempfile
         (outF, outName) = tempfile.mkstemp(suffix="-ks.cfg")
 
index 70ba0847cd5f6398e06fe79665734f0c7cc40996..bf797c137b2522ae6443d206098c48560702e254 100644 (file)
@@ -36,7 +36,8 @@ from pykickstart.constants import KS_SCRIPT_PRE, KS_SCRIPT_POST, KS_SCRIPT_TRACE
                                   KS_BROKEN_IGNORE, KS_BROKEN_REPORT
 from pykickstart.errors import KickstartParseError, KickstartDeprecationWarning
 from pykickstart.options import KSOptionParser
-from pykickstart.version import FC4, F7, F9, F18, F21, F22, F24, F32, RHEL6, RHEL7
+from pykickstart.version import FC4, F7, F9, F18, F21, F22, F24, F32, F34, RHEL6, RHEL7, RHEL9, \
+    isRHEL
 from pykickstart.i18n import _
 
 class Section(object):
@@ -168,9 +169,9 @@ class ScriptSection(Section):
                         The error message will direct you to where the cause of
                         the failure is logged.""", version=FC4)
         op.add_argument("--interpreter", dest="interpreter", default="/bin/sh",
-                        version=FC4, metavar="/usr/bin/python3", help="""
+                        version=FC4, metavar="/usr/bin/python", help="""
                         Allows you to specify a different scripting language,
-                        such as Python. Replace /usr/bin/python3 with the
+                        such as Python. Replace /usr/bin/python with the
                         scripting language of your choice.
                         """)
         op.add_argument("--log", "--logfile", dest="log", version=FC4,
@@ -239,7 +240,7 @@ class PreScriptSection(ScriptSection):
 
         .. note::
 
-            The pre-install script is not run in the chroot environment.
+            The pre-installation script is not run in the chroot environment.
     """
     _epilog = """
     Example
@@ -387,7 +388,7 @@ class OnErrorScriptSection(ScriptSection):
     a bug in the installer.  Some examples of these situations include errors in
     packages that have been requested to be installed, failures when starting VNC
     when requested, and error when scanning storage.  When these situations happen,
-    installaton cannot continue.  The installer will run all %onerror scripts in
+    installation cannot continue.  The installer will run all %onerror scripts in
     the order they are provided in the kickstart file.
 
     In addition, %onerror scripts will be run on a traceback as well.  To be exact,
@@ -436,6 +437,17 @@ class TracebackScriptSection(OnErrorScriptSection):
         OnErrorScriptSection._resetScript(self)
         self._script["type"] = KS_SCRIPT_TRACEBACK
 
+    def handleHeader(self, lineno, args):
+        super().handleHeader(lineno, args)
+
+        if self.version < F34:
+            return
+
+        warnings.warn("The %traceback section has been deprecated. It may be removed in the "
+                      "future, which will result in a fatal error from kickstart. Please modify "
+                      "your kickstart file to use the %onerror section instead.",
+                      KickstartDeprecationWarning)
+
 class PackageSection(Section):
     sectionOpen = "%packages"
     _title = "Package Selection"
@@ -616,7 +628,7 @@ class PackageSection(Section):
 
         op.remove_argument("--ignoredeps", version=F9)
         op.remove_argument("--resolvedeps", version=F9)
-        op.add_argument("--instLangs", "--inst-langs", default=None, version=F9, help="""
+        op.add_argument("--instLangs", default=None, version=F9, help="""
                         Specify the list of languages that should be installed.
                         This is different from the package group level
                         selections, though. This option does not specify what
@@ -675,7 +687,7 @@ class PackageSection(Section):
         if self.version < F24:
             return op
 
-        op.add_argument("--excludeWeakdeps", "--exclude-weakdeps", dest="excludeWeakdeps",
+        op.add_argument("--excludeWeakdeps", dest="excludeWeakdeps",
                         action="store_true", default=False, version=F24,
                         help="""
                         Do not install packages from weak dependencies. These
@@ -686,6 +698,13 @@ class PackageSection(Section):
         if self.version < F32:
             return op
 
+        op.add_argument("--instLangs", "--inst-langs", dest="instLangs", default=None,
+                        version=F32, help="Added ``--inst-langs`` alias")
+
+        op.add_argument("--excludeWeakdeps", "--exclude-weakdeps", dest="excludeWeakdeps",
+                        action="store_true", default=False, version=F32,
+                        help="Added ``--exclude-weakdeps`` alias")
+
         op.add_argument("--ignorebroken", action="store_true", default=False, version=F32,
                         help="""
                         Ignore any packages, groups or modules with conflicting files.
@@ -698,6 +717,10 @@ class PackageSection(Section):
                         were skipped. Using this option may result in an unusable system.**
                         """)
 
+        if isRHEL(self.version):
+            # The --ignorebroken feature is not supported on RHEL.
+            op.remove_argument("--ignorebroken", version=RHEL9)
+
         return op
 
     def handleHeader(self, lineno, args):
@@ -763,16 +786,17 @@ class PackageSection(Section):
         if self.version < F32:
             return
 
-        if ns.ignorebroken:
+        if getattr(ns, "ignorebroken", False):
             self.handler.packages.handleBroken = KS_BROKEN_IGNORE
         else:
             self.handler.packages.handleBroken = KS_BROKEN_REPORT
 
-        for option, new_option in \
+        for arg in args:
+            for option, new_option in \
                 {"--instLangs": "--inst-langs", "--excludeWeakdeps": "--exclude-weakdeps"}.items():
-            if option in args:
-                warnings.warn(_("The %(option)s option on line %(lineno)s will be deprecated in "
-                                "future releases. Please modify your kickstart file to replace "
-                                "this option with its preferred alias %(new_option)s.")
-                              % {"option": option, "lineno": lineno, "new_option": new_option},
-                              KickstartDeprecationWarning)
+                if option in arg:
+                    warnings.warn(_("The %(option)s option on line %(lineno)s will be deprecated in "
+                                    "future releases. Please modify your kickstart file to replace "
+                                    "this option with its preferred alias %(new_option)s.")
+                                  % {"option": option, "lineno": lineno, "new_option": new_option},
+                                  KickstartDeprecationWarning)
index d9666372d9affa45846c7e375a3d9fc198019cb3..6a8cf21163a810a08ca21ebb6cf35d883d04c2c3 100644 (file)
@@ -93,9 +93,13 @@ F31 = 31000
 F32 = 32000
 F33 = 33000
 F34 = 34000
+RHEL9 = 34100
+F35 = 35000
+F36 = 36000
+F37 = 37000
 
 # This always points at the latest version and is the default.
-DEVEL = F34
+DEVEL = F37
 
 # A one-to-one mapping from string representations to version numbers.
 versionMap = {
@@ -106,9 +110,9 @@ versionMap = {
     "F19": F19, "F20": F20, "F21": F21, "F22": F22, "F23": F23,
     "F24": F24, "F25": F25, "F26": F26, "F27": F27, "F28": F28,
     "F29": F29, "F30": F30, "F31": F31, "F32": F32, "F33": F33,
-    "F34": F34,
+    "F34": F34, "F35": F35, "F36": F36, "F37": F37,
     "RHEL3": RHEL3, "RHEL4": RHEL4, "RHEL5": RHEL5, "RHEL6": RHEL6,
-    "RHEL7": RHEL7, "RHEL8": RHEL8
+    "RHEL7": RHEL7, "RHEL8": RHEL8, "RHEL9": RHEL9
 }
 
 def stringToVersion(s):
@@ -224,3 +228,6 @@ def makeVersion(version=DEVEL):
 
 def getVersionFromCommandClass(cls):
     return versionMap[cls.__name__.split('_')[0]]
+
+def isRHEL(version):
+    return "RHEL" in versionToString(version, skipDevel=True)