--- pykickstart/commands/fcoe.py | 30 ++++++++++++++++++++++++++---- pykickstart/handlers/control.py | 4 ++-- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/pykickstart/commands/fcoe.py b/pykickstart/commands/fcoe.py index 2959fd5..15c6125 100644 --- a/pykickstart/commands/fcoe.py +++ b/pykickstart/commands/fcoe.py @@ -35,15 +35,31 @@ 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): + 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 +99,9 @@ class F12_Fcoe(KickstartCommand): def dataList(self): return self.fcoe + +class F13_Fcoe(F12_Fcoe): + 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