FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 10-27-2010, 10:51 AM
Ales Kozumplik
 
Default Simplify the way we hook to the iscsi kickstart command parsing.

more precisely: override execute() of the command or data, not parse().
---
pyanaconda/kickstart.py | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index bc1d8b6..7e5480c 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -382,25 +382,21 @@ class IgnoreDisk(commands.ignoredisk.RHEL6_IgnoreDisk):
if not self.interactive:
anaconda.ksdata.skipSteps.extend(["filter", "filtertype"])

-class Iscsi(commands.iscsi.F10_Iscsi):
- def parse(self, args):
- tg = commands.iscsi.F10_Iscsi.parse(self, args)
-
+class IscsiData(commands.iscsi.F10_IscsiData):
+ def execute(self, anaconda):
try:
- storage.iscsi.iscsi().addTarget(tg.ipaddr, tg.port,
- tg.user, tg.password, tg.user_in, tg.password_in)
- log.info("added iscsi target: %s" %(tg.ipaddr,))
+ storage.iscsi.iscsi().addTarget(self.ipaddr, self.port,
+ self.user, self.password,
+ self.user_in, self.password_in,
+ anaconda.intf)
+ log.info("added iscsi target: %s" %(self.ipaddr,))
except (IOError, ValueError), e:
raise KickstartValueError, formatErrorMsg(self.lineno,
msg=str(e))
- return tg

class IscsiName(commands.iscsiname.FC6_IscsiName):
- def parse(self, args):
- retval = commands.iscsiname.FC6_IscsiName.parse(self, args)
-
+ def execute(self, anaconda):
storage.iscsi.iscsi().initiator = self.iscsiname
- return retval

class Keyboard(commands.keyboard.FC3_Keyboard):
def execute(self, anaconda):
@@ -1092,7 +1088,6 @@ commandMap = {
"halt": Reboot,
"ignoredisk": IgnoreDisk,
"install": Upgrade,
- "iscsi": Iscsi,
"iscsiname": IscsiName,
"keyboard": Keyboard,
"lang": Lang,
@@ -1111,6 +1106,7 @@ commandMap = {
}

dataMap = {
+ "IscsiData" : IscsiData,
"LogVolData": LogVolData,
"NetworkData": NetworkData,
"PartData": PartitionData,
--
1.7.1.1

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

Thread Tools




All times are GMT. The time now is 03:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org