/** * File: clients/autoinst_storage.ycp * Package: Autoinstallation Configuration System * Summary: Storage * Authors: Anas Nashif * * $Id$ */ { textdomain "autoinst"; y2milestone("----------------------------------------"); y2milestone("Storage auto started"); import "Storage"; Storage::GetTargetMap(); // initialize libstorage import "Wizard"; /*import "AutoinstStorage";*/ import "AutoinstPartPlan"; import "FileSystems"; import "Label"; /* include "autoinstall/partition_dialogs.ycp"; */ include "autoinstall/StorageDialog.ycp"; any ret = nil; string func = ""; list param = []; /* Check arguments */ if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) { func = (string)WFM::Args(0); if(size(WFM::Args()) > 1 && is(WFM::Args(1), list)) { param = (list)WFM::Args(1); } } y2debug("func=%1", func); y2debug("param=%1", param); /* Import Data*/ if(func == "Import") { ret = AutoinstPartPlan::Import ((list)param); if (ret == nil) { y2error ("Parameter to 'Import' is probably wrong, should be list of maps"); ret = false; } y2milestone("Import: %1",list param ); } else if(func == "Read") { ret = AutoinstPartPlan::Read(); } /* Create a summary*/ else if(func == "Summary") { ret = AutoinstPartPlan::Summary(); } /* Reset configuration */ else if (func == "Reset") { AutoinstPartPlan::Reset(); ret = []; } /* Change configuration (run AutoSequence) */ else if (func == "Change") { ret = StorageDialog(); UI::CloseDialog(); } /* Return actual state */ else if (func == "Export") { ret = AutoinstPartPlan::Export(); } /* Return true if modified */ else if (func == "GetModified") { ret = AutoinstPartPlan::GetModified(); } else if (func == "SetModified") { AutoinstPartPlan::SetModified(); } /* Unknown function */ else { y2error("Unknown function: %1", func); ret = false; } y2debug("ret=%1", ret); y2milestone("Storage auto finished"); y2milestone("----------------------------------------"); return ret; /* EOF */ }