From 797f9e2e45eba39f2d10e1a8437c052202cc9a41 Mon Sep 17 00:00:00 2001 From: barate Date: Wed, 28 Mar 2012 13:59:42 +0000 Subject: [PATCH] Remove parameters that are no more necessary for local Vishnu --- src/engine/BL_Job.cxx | 55 --------- src/engine/BL_Job.hxx | 17 --- src/engine/BL_SALOMEServices.cxx | 52 --------- src/genericgui/BL_CreateJobWizard.cxx | 155 -------------------------- src/genericgui/BL_CreateJobWizard.hxx | 14 --- src/genericgui/BL_JobTab.cxx | 23 ---- src/genericgui/BL_JobTab.hxx | 8 -- src/genericgui/BL_JobsManager_QT.cxx | 4 - 8 files changed, 328 deletions(-) diff --git a/src/engine/BL_Job.cxx b/src/engine/BL_Job.cxx index f7b0b45..19b8084 100644 --- a/src/engine/BL_Job.cxx +++ b/src/engine/BL_Job.cxx @@ -37,10 +37,6 @@ BL::Job::Job() _salome_launcher_id = -1; _dump_yacs_state = 0; _ll_jobtype = ""; - _vishnu_password = ""; - _vishnu_hostname = ""; - _vishnu_host_login = ""; - _vishnu_host_workdir = ""; } BL::Job::Job(const std::string & name) @@ -61,10 +57,6 @@ BL::Job::Job(const std::string & name) _salome_launcher_id = -1; _dump_yacs_state = 0; _ll_jobtype = ""; - _vishnu_password = ""; - _vishnu_hostname = ""; - _vishnu_host_login = ""; - _vishnu_host_workdir = ""; } BL::Job::~Job() @@ -212,53 +204,6 @@ BL::Job::getLoadLevelerJobType() return _ll_jobtype; } -void -BL::Job::setVishnuPassword(const std::string & vishnu_password) -{ - _vishnu_password = vishnu_password; -} - -const std::string & -BL::Job::getVishnuPassword() -{ - return _vishnu_password; -} - -void BL::Job::setVishnuHostname(const std::string & vishnu_hostname) -{ - _vishnu_hostname = vishnu_hostname; -} - -const std::string & -BL::Job::getVishnuHostname() -{ - return _vishnu_hostname; -} - -void -BL::Job::setVishnuHostLogin(const std::string & vishnu_host_login) -{ - _vishnu_host_login = vishnu_host_login; -} - -const std::string & -BL::Job::getVishnuHostLogin() -{ - return _vishnu_host_login; -} - -void -BL::Job::setVishnuHostWorkdir(const std::string & vishnu_host_workdir) -{ - _vishnu_host_workdir = vishnu_host_workdir; -} - -const std::string & -BL::Job::getVishnuHostWorkdir() -{ - return _vishnu_host_workdir; -} - void BL::Job::setState(BL::Job::State state) { diff --git a/src/engine/BL_Job.hxx b/src/engine/BL_Job.hxx index 719831d..d1355b2 100644 --- a/src/engine/BL_Job.hxx +++ b/src/engine/BL_Job.hxx @@ -84,18 +84,6 @@ namespace BL{ void setLoadLevelerJobType(const std::string & jobtype); std::string & getLoadLevelerJobType(); - void setVishnuPassword(const std::string & vishnu_password); - const std::string & getVishnuPassword(); - - void setVishnuHostname(const std::string & vishnu_hostname); - const std::string & getVishnuHostname(); - - void setVishnuHostLogin(const std::string & vishnu_host_login); - const std::string & getVishnuHostLogin(); - - void setVishnuHostWorkdir(const std::string & vishnu_host_workdir); - const std::string & getVishnuHostWorkdir(); - enum State {CREATED, IN_PROCESS, QUEUED, RUNNING, PAUSED, FINISHED, ERROR, FAILED, NOT_CREATED}; void setState(BL::Job::State state); BL::Job::State getState(); @@ -125,11 +113,6 @@ namespace BL{ std::string _batch_queue; std::string _ll_jobtype; - std::string _vishnu_password; - std::string _vishnu_hostname; - std::string _vishnu_host_login; - std::string _vishnu_host_workdir; - int _salome_launcher_id; }; diff --git a/src/engine/BL_SALOMEServices.cxx b/src/engine/BL_SALOMEServices.cxx index 80ed3c5..0fb24e0 100644 --- a/src/engine/BL_SALOMEServices.cxx +++ b/src/engine/BL_SALOMEServices.cxx @@ -273,38 +273,6 @@ BL::SALOMEServices::create_job(BL::Job * job) new_parameter->value = CORBA::string_dup(job->getLoadLevelerJobType().c_str()); job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter; } - if (job->getVishnuPassword() != "") - { - job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1); - Engines::Parameter_var new_parameter = new Engines::Parameter; - new_parameter->name = CORBA::string_dup("VishnuPassword"); - new_parameter->value = CORBA::string_dup(job->getVishnuPassword().c_str()); - job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter; - } - if (job->getVishnuHostname() != "") - { - job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1); - Engines::Parameter_var new_parameter = new Engines::Parameter; - new_parameter->name = CORBA::string_dup("VishnuHostname"); - new_parameter->value = CORBA::string_dup(job->getVishnuHostname().c_str()); - job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter; - } - if (job->getVishnuHostLogin() != "") - { - job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1); - Engines::Parameter_var new_parameter = new Engines::Parameter; - new_parameter->name = CORBA::string_dup("VishnuHostLogin"); - new_parameter->value = CORBA::string_dup(job->getVishnuHostLogin().c_str()); - job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter; - } - if (job->getVishnuHostWorkdir() != "") - { - job_parameters->specific_parameters.length(job_parameters->specific_parameters.length() + 1); - Engines::Parameter_var new_parameter = new Engines::Parameter; - new_parameter->name = CORBA::string_dup("VishnuHostWorkdir"); - new_parameter->value = CORBA::string_dup(job->getVishnuHostWorkdir().c_str()); - job_parameters->specific_parameters[job_parameters->specific_parameters.length() - 1] = new_parameter; - } // Files job_parameters->job_name = CORBA::string_dup(job->getName().c_str()); @@ -636,26 +604,6 @@ BL::SALOMEServices::get_new_job(int job_number) std::string user_value = job_parameters->specific_parameters[i].value.in(); job_return->setLoadLevelerJobType(user_value); } - if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuPassword") - { - std::string user_value = job_parameters->specific_parameters[i].value.in(); - job_return->setVishnuPassword(user_value); - } - if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuHostname") - { - std::string user_value = job_parameters->specific_parameters[i].value.in(); - job_return->setVishnuHostname(user_value); - } - if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuHostLogin") - { - std::string user_value = job_parameters->specific_parameters[i].value.in(); - job_return->setVishnuHostLogin(user_value); - } - if (std::string(job_parameters->specific_parameters[i].name.in()) == "VishnuHostWorkdir") - { - std::string user_value = job_parameters->specific_parameters[i].value.in(); - job_return->setVishnuHostWorkdir(user_value); - } } // Get current state diff --git a/src/genericgui/BL_CreateJobWizard.cxx b/src/genericgui/BL_CreateJobWizard.cxx index dcebacf..a97c52d 100644 --- a/src/genericgui/BL_CreateJobWizard.cxx +++ b/src/genericgui/BL_CreateJobWizard.cxx @@ -57,11 +57,6 @@ BL::CreateJobWizard::CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALO dump_yacs_state = -1; ll_jobtype = ""; - vishnu_password = ""; - vishnu_hostname = ""; - vishnu_host_login = ""; - vishnu_host_workdir = ""; - setOptions(QWizard::IndependentPages | QWizard::NoBackButtonOnStartPage); // Common pages @@ -172,11 +167,6 @@ BL::CreateJobWizard::clone(const std::string & name) setField("resource_choosed", QString(job->getResource().c_str())); setField("batch_queue", QString(job->getBatchQueue().c_str())); setField("ll_jobtype", QString(job->getLoadLevelerJobType().c_str())); - - setField("vishnu_password", QString(job->getVishnuPassword().c_str())); - setField("vishnu_hostname", QString(job->getVishnuHostname().c_str())); - setField("vishnu_host_login", QString(job->getVishnuHostLogin().c_str())); - setField("vishnu_host_workdir", QString(job->getVishnuHostWorkdir().c_str())); } } @@ -281,26 +271,6 @@ BL::CreateJobWizard::end(int result) ll_jobtype = ""; } - // Vishnu parameters - if (batch == "vishnu") - { - QString f_vishnu_password = field("vishnu_password").toString(); - vishnu_password = f_vishnu_password.toStdString(); - QString f_vishnu_hostname = field("vishnu_hostname").toString(); - vishnu_hostname = f_vishnu_hostname.toStdString(); - QString f_vishnu_host_login = field("vishnu_host_login").toString(); - vishnu_host_login = f_vishnu_host_login.toStdString(); - QString f_vishnu_host_workdir = field("vishnu_host_workdir").toString(); - vishnu_host_workdir = f_vishnu_host_workdir.toStdString(); - } - else - { - vishnu_password = ""; - vishnu_hostname = ""; - vishnu_host_login = ""; - vishnu_host_workdir = ""; - } - start_job = field("start_job").toBool(); } } @@ -954,35 +924,6 @@ BL::ResourcePage::ResourcePage(BL::CreateJobWizard * parent, BL::SALOMEServices _ll_label->hide(); _ll_value->hide(); - _vishnu_password_label = new QLabel("Vishnu password (not secure!!!):", this); - _vishnu_password_value = new QLineEdit(this); - QString tt = "This password will be transmitted and stored without encryption. " - "This mechanism is absolutely not secure. " - "Do never use any of your \"real\" passwords here."; - _vishnu_password_label->setToolTip(tt); - _vishnu_password_value->setToolTip(tt); - registerField("vishnu_password", _vishnu_password_value); - _vishnu_password_label->hide(); - _vishnu_password_value->hide(); - - _vishnu_hostname_label = new QLabel("Vishnu hostname:", this); - _vishnu_hostname_value = new QLineEdit(this); - registerField("vishnu_hostname", _vishnu_hostname_value); - _vishnu_hostname_label->hide(); - _vishnu_hostname_value->hide(); - - _vishnu_host_login_label = new QLabel("Vishnu host login:", this); - _vishnu_host_login_value = new QLineEdit(this); - registerField("vishnu_host_login", _vishnu_host_login_value); - _vishnu_host_login_label->hide(); - _vishnu_host_login_value->hide(); - - _vishnu_host_workdir_label = new QLabel("Vishnu host working directory:", this); - _vishnu_host_workdir_value = new QLineEdit(this); - registerField("vishnu_host_workdir", _vishnu_host_workdir_value); - _vishnu_host_workdir_label->hide(); - _vishnu_host_workdir_value->hide(); - _main_layout = new QGridLayout; _main_layout->addWidget(resource_group_box, 0, 0, 1, -1); _main_layout->addWidget(resource_label, 1, 0); @@ -1006,29 +947,6 @@ BL::ResourcePage::initializePage() _ll_label->show(); _ll_value->show(); } - - if (field("vishnu_password").toString() != "") - { - _main_layout->addWidget(_vishnu_password_label, 3, 0); - _main_layout->addWidget(_vishnu_password_value, 3, 1); - _vishnu_password_label->show(); - _vishnu_password_value->show(); - - _main_layout->addWidget(_vishnu_hostname_label, 4, 0); - _main_layout->addWidget(_vishnu_hostname_value, 4, 1); - _vishnu_hostname_label->show(); - _vishnu_hostname_value->show(); - - _main_layout->addWidget(_vishnu_host_login_label, 5, 0); - _main_layout->addWidget(_vishnu_host_login_value, 5, 1); - _vishnu_host_login_label->show(); - _vishnu_host_login_value->show(); - - _main_layout->addWidget(_vishnu_host_workdir_label, 6, 0); - _main_layout->addWidget(_vishnu_host_workdir_value, 6, 1); - _vishnu_host_workdir_label->show(); - _vishnu_host_workdir_value->show(); - } } bool @@ -1052,33 +970,6 @@ BL::ResourcePage::validatePage() return false; } } - if (batch == "vishnu") - { - QString vishnu_password = field("vishnu_password").toString(); - if (vishnu_password == "") - { - QMessageBox::warning(NULL, "Vishnu Error", "Please define a Vishnu password"); - return false; - } - QString vishnu_hostname = field("vishnu_hostname").toString(); - if (vishnu_hostname == "") - { - QMessageBox::warning(NULL, "Vishnu Error", "Please define a Vishnu hostname"); - return false; - } - QString vishnu_host_login = field("vishnu_host_login").toString(); - if (vishnu_host_login == "") - { - QMessageBox::warning(NULL, "Vishnu Error", "Please define a login for Vishnu host"); - return false; - } - QString vishnu_host_workdir = field("vishnu_host_workdir").toString(); - if (vishnu_host_workdir == "") - { - QMessageBox::warning(NULL, "Vishnu Error", "Please define a working directory on Vishnu host"); - return false; - } - } return true; } @@ -1106,52 +997,6 @@ BL::ResourcePage::itemSelected(QListWidgetItem * item) _ll_label->hide(); _ll_value->hide(); } - - // Specific parameters for Vishnu - if (batch == "vishnu") - { - _main_layout->addWidget(_vishnu_password_label, 3, 0); - _main_layout->addWidget(_vishnu_password_value, 3, 1); - _vishnu_password_label->show(); - _vishnu_password_value->show(); - - _main_layout->addWidget(_vishnu_hostname_label, 4, 0); - _main_layout->addWidget(_vishnu_hostname_value, 4, 1); - _vishnu_hostname_label->show(); - _vishnu_hostname_value->show(); - - _main_layout->addWidget(_vishnu_host_login_label, 5, 0); - _main_layout->addWidget(_vishnu_host_login_value, 5, 1); - _vishnu_host_login_label->show(); - _vishnu_host_login_value->show(); - - _main_layout->addWidget(_vishnu_host_workdir_label, 6, 0); - _main_layout->addWidget(_vishnu_host_workdir_value, 6, 1); - _vishnu_host_workdir_label->show(); - _vishnu_host_workdir_value->show(); - } - else - { - _main_layout->removeWidget(_vishnu_password_label); - _main_layout->removeWidget(_vishnu_password_value); - _vishnu_password_label->hide(); - _vishnu_password_value->hide(); - - _main_layout->removeWidget(_vishnu_hostname_label); - _main_layout->removeWidget(_vishnu_hostname_value); - _vishnu_hostname_label->hide(); - _vishnu_hostname_value->hide(); - - _main_layout->removeWidget(_vishnu_host_login_label); - _main_layout->removeWidget(_vishnu_host_login_value); - _vishnu_host_login_label->hide(); - _vishnu_host_login_value->hide(); - - _main_layout->removeWidget(_vishnu_host_workdir_label); - _main_layout->removeWidget(_vishnu_host_workdir_value); - _vishnu_host_workdir_label->hide(); - _vishnu_host_workdir_value->hide(); - } } int diff --git a/src/genericgui/BL_CreateJobWizard.hxx b/src/genericgui/BL_CreateJobWizard.hxx index 1d78f31..6a0d096 100644 --- a/src/genericgui/BL_CreateJobWizard.hxx +++ b/src/genericgui/BL_CreateJobWizard.hxx @@ -84,11 +84,6 @@ namespace BL{ int dump_yacs_state; std::string ll_jobtype; - std::string vishnu_password; - std::string vishnu_hostname; - std::string vishnu_host_login; - std::string vishnu_host_workdir; - public: enum {Page_JobName, Page_YACSSchema, @@ -204,15 +199,6 @@ namespace BL{ QLabel * _ll_label; QLineEdit * _ll_value; QGridLayout * _main_layout; - - QLabel * _vishnu_password_label; - QLineEdit * _vishnu_password_value; - QLabel * _vishnu_hostname_label; - QLineEdit * _vishnu_hostname_value; - QLabel * _vishnu_host_login_label; - QLineEdit * _vishnu_host_login_value; - QLabel * _vishnu_host_workdir_label; - QLineEdit * _vishnu_host_workdir_value; }; class YACSSchemaPage: virtual public QWizardPage diff --git a/src/genericgui/BL_JobTab.cxx b/src/genericgui/BL_JobTab.cxx index d9f5cde..31ce3c1 100644 --- a/src/genericgui/BL_JobTab.cxx +++ b/src/genericgui/BL_JobTab.cxx @@ -108,14 +108,6 @@ BL::JobTab::createJobSummaryTab() _batch_queue_value = new QLabel(""); _ll_jobtype_label = new QLabel("LoadLeveler JobType:"); _ll_jobtype_value = new QLabel(""); - _vishnu_password_label = new QLabel("Vishnu password:"); - _vishnu_password_value = new QLabel(""); - _vishnu_hostname_label = new QLabel("Vishnu hostname:"); - _vishnu_hostname_value = new QLabel(""); - _vishnu_host_login_label = new QLabel("Vishnu host login:"); - _vishnu_host_login_value = new QLabel(""); - _vishnu_host_workdir_label = new QLabel("Vishnu host working directory:"); - _vishnu_host_workdir_value = new QLabel(""); QGroupBox * run_values_box = new QGroupBox("Run values"); _run_values_form = new QFormLayout; @@ -259,17 +251,6 @@ BL::JobTab::job_selected(const QModelIndex & index) _ll_jobtype_value->setText(QVariant(job->getLoadLevelerJobType().c_str()).toString()); _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _ll_jobtype_label, _ll_jobtype_value); } - if (job->getVishnuPassword() != "") - { - _vishnu_password_value->setText(QVariant(job->getVishnuPassword().c_str()).toString()); - _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_password_label, _vishnu_password_value); - _vishnu_hostname_value->setText(QVariant(job->getVishnuHostname().c_str()).toString()); - _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_hostname_label, _vishnu_hostname_value); - _vishnu_host_login_value->setText(QVariant(job->getVishnuHostLogin().c_str()).toString()); - _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_host_login_label, _vishnu_host_login_value); - _vishnu_host_workdir_value->setText(QVariant(job->getVishnuHostWorkdir().c_str()).toString()); - _other_run_values_form->insertRow(_other_run_values_form->rowCount(), _vishnu_host_workdir_label, _vishnu_host_workdir_value); - } } else DEBTRACE ("itemFromIndex returns 0 !"); @@ -332,9 +313,5 @@ BL::JobTab::reset(QString job_name) _yacs_dump_state_value->setText(""); _batch_queue_value->setText(""); _ll_jobtype_value->setText(""); - _vishnu_password_value->setText(""); - _vishnu_hostname_value->setText(""); - _vishnu_host_login_value->setText(""); - _vishnu_host_workdir_value->setText(""); } } diff --git a/src/genericgui/BL_JobTab.hxx b/src/genericgui/BL_JobTab.hxx index 0bd87c5..7587d2f 100644 --- a/src/genericgui/BL_JobTab.hxx +++ b/src/genericgui/BL_JobTab.hxx @@ -80,14 +80,6 @@ namespace BL QLabel * _batch_queue_value; QLabel * _ll_jobtype_label; QLabel * _ll_jobtype_value; - QLabel * _vishnu_password_label; - QLabel * _vishnu_password_value; - QLabel * _vishnu_hostname_label; - QLabel * _vishnu_hostname_value; - QLabel * _vishnu_host_login_label; - QLabel * _vishnu_host_login_value; - QLabel * _vishnu_host_workdir_label; - QLabel * _vishnu_host_workdir_value; QListWidget * _input_files_list; QListWidget * _output_files_list; diff --git a/src/genericgui/BL_JobsManager_QT.cxx b/src/genericgui/BL_JobsManager_QT.cxx index b6cef72..8951cc6 100644 --- a/src/genericgui/BL_JobsManager_QT.cxx +++ b/src/genericgui/BL_JobsManager_QT.cxx @@ -301,10 +301,6 @@ BL::JobsManager_QT::create_job_with_wizard(BL::CreateJobWizard & wizard) new_job->setResource(wizard.resource_choosed); new_job->setBatchQueue(wizard.batch_queue); new_job->setLoadLevelerJobType(wizard.ll_jobtype); - new_job->setVishnuPassword(wizard.vishnu_password); - new_job->setVishnuHostname(wizard.vishnu_hostname); - new_job->setVishnuHostLogin(wizard.vishnu_host_login); - new_job->setVishnuHostWorkdir(wizard.vishnu_host_workdir); // End addJobToLauncher(wizard.job_name); -- 2.39.2