[pykickstart - PATCH 1/2] Add support for F21.
Chris Lumens
clumens at redhat.com
Fri Mar 14 19:20:51 UTC 2014
---
pykickstart/handlers/control.py | 85 ++++++++++++++++++++++++++++++++++++++++-
pykickstart/handlers/f21.py | 24 ++++++++++++
pykickstart/version.py | 7 ++--
tests/version.py | 6 ++-
4 files changed, 117 insertions(+), 5 deletions(-)
create mode 100644 pykickstart/handlers/f21.py
diff --git a/pykickstart/handlers/control.py b/pykickstart/handlers/control.py
index 6e654a5..9257703 100644
--- a/pykickstart/handlers/control.py
+++ b/pykickstart/handlers/control.py
@@ -1,7 +1,7 @@
#
# Chris Lumens <clumens at redhat.com>
#
-# Copyright 2007, 2008, 2009, 2010, 2012, 2013 Red Hat, Inc.
+# Copyright 2007-2014 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
@@ -1087,6 +1087,70 @@ commandMap = {
"zfcp": zfcp.F14_ZFCP,
},
+ # based on f20
+ F21: {
+ "auth": authconfig.FC3_Authconfig,
+ "authconfig": authconfig.FC3_Authconfig,
+ "autopart": autopart.F20_AutoPart,
+ "autostep": autostep.FC3_AutoStep,
+ "bootloader": bootloader.F19_Bootloader,
+ "btrfs": btrfs.F17_BTRFS,
+ "cdrom": cdrom.FC3_Cdrom,
+ "clearpart": clearpart.F17_ClearPart,
+ "cmdline": displaymode.FC3_DisplayMode,
+ "device": device.F8_Device,
+ "deviceprobe": deviceprobe.FC3_DeviceProbe,
+ "dmraid": dmraid.FC6_DmRaid,
+ "driverdisk": driverdisk.F14_DriverDisk,
+ "eula": eula.F20_Eula,
+ "fcoe": fcoe.F13_Fcoe,
+ "firewall": firewall.F20_Firewall,
+ "firstboot": firstboot.FC3_Firstboot,
+ "graphical": displaymode.FC3_DisplayMode,
+ "group": group.F12_Group,
+ "halt": reboot.F18_Reboot,
+ "harddrive": harddrive.FC3_HardDrive,
+ "ignoredisk": ignoredisk.F14_IgnoreDisk,
+ "install": upgrade.F11_Upgrade,
+ "iscsi": iscsi.F17_Iscsi,
+ "iscsiname": iscsiname.FC6_IscsiName,
+ "keyboard": keyboard.F18_Keyboard,
+ "lang": lang.F19_Lang,
+ "liveimg": liveimg.F19_Liveimg,
+ "logging": logging.FC6_Logging,
+ "logvol": logvol.F20_LogVol,
+ "mediacheck": mediacheck.FC4_MediaCheck,
+ "method": method.F19_Method,
+ "multipath": multipath.FC6_MultiPath,
+ "network": network.F20_Network,
+ "nfs": nfs.FC6_NFS,
+ "part": partition.F20_Partition,
+ "partition": partition.F20_Partition,
+ "poweroff": reboot.F18_Reboot,
+ "raid": raid.F20_Raid,
+ "realm": realm.F19_Realm,
+ "reboot": reboot.F18_Reboot,
+ "repo": repo.F15_Repo,
+ "rescue": rescue.F10_Rescue,
+ "rootpw": rootpw.F18_RootPw,
+ "selinux": selinux.FC3_SELinux,
+ "services": services.FC6_Services,
+ "shutdown": reboot.F18_Reboot,
+ "skipx": skipx.FC3_SkipX,
+ "sshpw": sshpw.F13_SshPw,
+ "text": displaymode.FC3_DisplayMode,
+ "timezone": timezone.F18_Timezone,
+ "updates": updates.F7_Updates,
+ "upgrade": upgrade.F20_Upgrade,
+ "url": url.F18_Url,
+ "user": user.F19_User,
+ "vnc": vnc.F9_Vnc,
+ "volgroup": volgroup.F20_VolGroup,
+ "xconfig": xconfig.F14_XConfig,
+ "zerombr": zerombr.F9_ZeroMbr,
+ "zfcp": zfcp.F14_ZFCP,
+ },
+
# based on fc1
RHEL3: {
"auth": authconfig.FC3_Authconfig,
@@ -1664,6 +1728,25 @@ dataMap = {
"VolGroupData": volgroup.FC16_VolGroupData,
"ZFCPData": zfcp.F14_ZFCPData,
},
+ F21: {
+ "BTRFSData": btrfs.F17_BTRFSData,
+ "DriverDiskData": driverdisk.F14_DriverDiskData,
+ "DeviceData": device.F8_DeviceData,
+ "DmRaidData": dmraid.FC6_DmRaidData,
+ "FcoeData": fcoe.F13_FcoeData,
+ "GroupData": group.F12_GroupData,
+ "IscsiData": iscsi.F17_IscsiData,
+ "LogVolData": logvol.F20_LogVolData,
+ "MultiPathData": multipath.FC6_MultiPathData,
+ "NetworkData": network.F20_NetworkData,
+ "PartData": partition.F18_PartData,
+ "RaidData": raid.F18_RaidData,
+ "RepoData": repo.F15_RepoData,
+ "SshPwData": sshpw.F13_SshPwData,
+ "UserData": user.F19_UserData,
+ "VolGroupData": volgroup.FC16_VolGroupData,
+ "ZFCPData": zfcp.F14_ZFCPData,
+ },
RHEL3: {
"DriverDiskData": driverdisk.FC3_DriverDiskData,
"LogVolData": logvol.FC3_LogVolData,
diff --git a/pykickstart/handlers/f21.py b/pykickstart/handlers/f21.py
new file mode 100644
index 0000000..1296f0d
--- /dev/null
+++ b/pykickstart/handlers/f21.py
@@ -0,0 +1,24 @@
+#
+# Chris Lumens <clumens at redhat.com>
+#
+# Copyright 2014 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 F21Handler(BaseHandler):
+ version = F21
diff --git a/pykickstart/version.py b/pykickstart/version.py
index 9b73102..70b897f 100644
--- a/pykickstart/version.py
+++ b/pykickstart/version.py
@@ -1,7 +1,7 @@
#
# Chris Lumens <clumens at redhat.com>
#
-# Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013 Red Hat, Inc.
+# Copyright 2006-2014 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
@@ -75,9 +75,10 @@ F18 = 16000
F19 = 17000
RHEL7 = 17100
F20 = 18000
+F21 = 19000
# This always points at the latest version and is the default.
-DEVEL = F20
+DEVEL = F21
# A one-to-one mapping from string representations to version numbers.
versionMap = {
@@ -85,7 +86,7 @@ versionMap = {
"FC3": FC3, "FC4": FC4, "FC5": FC5, "FC6": FC6, "F7": F7, "F8": F8,
"F9": F9, "F10": F10, "F11": F11, "F12": F12, "F13": F13,
"F14": F14, "F15": F15, "F16": F16, "F17": F17, "F18": F18,
- "F19": F19, "F20": F20,
+ "F19": F19, "F20": F20, "F21": F21,
"RHEL3": RHEL3, "RHEL4": RHEL4, "RHEL5": RHEL5, "RHEL6": RHEL6,
"RHEL7": RHEL7
}
diff --git a/tests/version.py b/tests/version.py
index 03b86f8..a9f4d10 100644
--- a/tests/version.py
+++ b/tests/version.py
@@ -93,6 +93,9 @@ class StringToVersion_TestCase(CommandTest):
# pass - F20
self.assertEqual(stringToVersion("Fedora 20"), F20)
self.assertEqual(stringToVersion("F20"), F20)
+ # pass - F21
+ self.assertEqual(stringToVersion("Fedora 21"), F21)
+ self.assertEqual(stringToVersion("F21"), F21)
# pass - RHEL3
self.assertEqual(stringToVersion("Red Hat Enterprise Linux 3"), RHEL3)
@@ -176,7 +179,8 @@ class VersionToString_TestCase(CommandTest):
self.assertEqual(versionToString(F18, skipDevel=True), "F18")
self.assertEqual(versionToString(F19, skipDevel=True), "F19")
self.assertEqual(versionToString(F20, skipDevel=True), "F20")
- self.assertEqual(versionToString(F20, skipDevel=False), "DEVEL")
+ self.assertEqual(versionToString(F21, skipDevel=True), "F21")
+ self.assertEqual(versionToString(F21, skipDevel=False), "DEVEL")
# RHEL series
self.assertEqual(versionToString(RHEL3), "RHEL3")
self.assertEqual(versionToString(RHEL4), "RHEL4")
--
1.8.3.1
More information about the anaconda-patches
mailing list