home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
usr
/
share
/
YaST2
/
clients
/
iscsi-client_proposal.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
88 lines
/**
* File: clients/iscsi-client_proposal.ycp
* Package: Configuration of iscsi-client
* Summary: Proposal function dispatcher.
* Authors: Michal Zugec <mzugec@suse.cz>
*
* $Id: iscsi-client_proposal.ycp 28596 2006-03-06 11:28:57Z mzugec $
*
* Proposal function dispatcher for iscsi-client configuration.
* See source/installation/proposal/proposal-API.txt
*/
{
textdomain "iscsi-client";
import "IscsiClient";
import "Progress";
/* The main () */
y2milestone("----------------------------------------");
y2milestone("IscsiClient proposal started");
string func = (string) WFM::Args(0);
map param = (map) WFM::Args(1);
map ret = $[];
/* create a textual proposal */
if(func == "MakeProposal") {
string proposal = "";
string warning = nil;
symbol warning_level = nil;
boolean force_reset = param["force_reset"]:false;
if(force_reset || !IscsiClient::proposal_valid) {
IscsiClient::proposal_valid = true;
boolean progress_orig = Progress::set (false);
IscsiClient::Read();
Progress::set (progress_orig);
}
list sum = IscsiClient::Summary();
proposal = sum[0]:"";
ret = $[
"preformatted_proposal" : proposal,
"warning_level" : warning_level,
"warning" : warning,
];
}
/* run the module */
else if(func == "AskUser") {
map stored = IscsiClient::Export();
symbol seq = (symbol) WFM::CallFunction("iscsi-client", [.propose]);
if(seq != `next) IscsiClient::Import(stored);
y2debug("stored=%1",stored);
y2debug("seq=%1",seq);
ret = $[
"workflow_sequence" : seq
];
}
/* create titles */
else if(func == "Description") {
ret = $[
/* Rich text title for IscsiClient in proposals */
"rich_text_title" : _("iSCSI Initiator"),
/* Menu title for IscsiClient in proposals */
"menu_title" : _("&iSCSI Initiator"),
"id" : "iscsi-client",
];
}
/* write the proposal */
else if(func == "Write") {
IscsiClient::Write();
}
/* unknown function */
else {
y2error("unknown function: %1", func);
}
/* Finish */
y2debug("ret=%1",ret);
y2milestone("IscsiClient proposal finished");
y2milestone("----------------------------------------");
return ret;
/* EOF */
}