[PATCH pykickstart] Add --dcb option to fcoe command (#513011)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pykickstart/commands/fcoe.py    |   36 ++++++++++++++++++++++++++++++++----
 pykickstart/handlers/control.py |    4 ++--
 2 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/pykickstart/commands/fcoe.py b/pykickstart/commands/fcoe.py
index 2959fd5..3e85b1b 100644
--- a/pykickstart/commands/fcoe.py
+++ b/pykickstart/commands/fcoe.py
@@ -35,15 +35,34 @@ class F12_FcoeData(BaseData):
     def __eq__(self, y):
         return self.nic == y.nic
 
-    def __str__(self):
-        retval = BaseData.__str__(self)
-        retval += "fcoe"
+    def _getArgsAsStr(self):
+        retval = ""
 
         if self.nic:
             retval += " --nic=%s" % self.nic
 
-        return retval + "\n"
+        return retval
+
+    def __str__(self):
+        retval = BaseData.__str__(self)
+        retval += "fcoe%s\n" % self._getArgsAsStr()
+        return retval
+
+class F13_FcoeData(F12_FcoeData):
+    removedKeywords = F12_FcoeData.removedKeywords
+    removedAttrs = F12_FcoeData.removedAttrs
 
+    def __init__(self, *args, **kwargs):
+        F12_FcoeData.__init__(self, *args, **kwargs)
+        self.dcb = kwargs.get("dcb", False)
+
+    def _getArgsAsStr(self):
+        retval = F12_FcoeData._getArgsAsStr(self)
+
+        if self.dcb:
+            retval += " --dcb"
+
+        return retval
 
 class F12_Fcoe(KickstartCommand):
     removedKeywords = KickstartCommand.removedKeywords
@@ -83,3 +102,12 @@ class F12_Fcoe(KickstartCommand):
 
     def dataList(self):
         return self.fcoe
+
+class F13_Fcoe(F12_Fcoe):
+    removedKeywords = F12_Fcoe.removedKeywords
+    removedAttrs = F12_Fcoe.removedAttrs
+
+    def _getParser(self):
+        op = F12_Fcoe._getParser(self)
+        op.add_option("--dcb", dest="dcb", action="store_true", default=False)
+        return op
diff --git a/pykickstart/handlers/control.py b/pykickstart/handlers/control.py
index c017580..f706371 100644
--- a/pykickstart/handlers/control.py
+++ b/pykickstart/handlers/control.py
@@ -602,7 +602,7 @@ commandMap = {
         "deviceprobe": deviceprobe.FC3_DeviceProbe,
         "dmraid": dmraid.FC6_DmRaid,
         "driverdisk": driverdisk.FC3_DriverDisk,
-        "fcoe": fcoe.F12_Fcoe,
+        "fcoe": fcoe.F13_Fcoe,
         "firewall": firewall.F10_Firewall,
         "firstboot": firstboot.FC3_Firstboot,
         "graphical": displaymode.FC3_DisplayMode,
@@ -953,7 +953,7 @@ dataMap = {
         "DriverDiskData": driverdisk.F12_DriverDiskData,
         "DeviceData": device.F8_DeviceData,
         "DmRaidData": dmraid.FC6_DmRaidData,
-        "FcoeData": fcoe.F12_FcoeData,
+        "FcoeData": fcoe.F13_FcoeData,
         "GroupData": group.F12_GroupData,
         "IscsiData": iscsi.F10_IscsiData,
         "LogVolData": logvol.F12_LogVolData,
-- 
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux