From d64cfdee21a8017a35c5163cdf29d31841d14931 Mon Sep 17 00:00:00 2001 From: barate Date: Thu, 17 Jan 2013 09:23:36 +0000 Subject: [PATCH] Remove job parameter USER that has been replaced by the BatchManager attribute username --- src/Core/Constants.cxx | 1 - src/Core/Constants.hxx | 1 - src/Core/ParameterTypeMap.cxx | 1 - src/Local/BatchManager_Local.cxx | 8 +------- src/Local/Test/Test_Local_RSH.cxx | 1 - src/Local/Test/Test_Local_SSH.cxx | 1 - 6 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Core/Constants.cxx b/src/Core/Constants.cxx index 2968e6f..602b725 100644 --- a/src/Core/Constants.cxx +++ b/src/Core/Constants.cxx @@ -47,7 +47,6 @@ namespace Batch { def_Constant(PID); def_Constant(QUEUE); def_Constant(STATE); - def_Constant(USER); def_Constant(WORKDIR); def_Constant(HOMEDIR); def_Constant(EXCLUSIVE); diff --git a/src/Core/Constants.hxx b/src/Core/Constants.hxx index 5d16505..648ab06 100644 --- a/src/Core/Constants.hxx +++ b/src/Core/Constants.hxx @@ -58,7 +58,6 @@ namespace Batch { decl_extern_Constant(PID); decl_extern_Constant(QUEUE); decl_extern_Constant(STATE); - decl_extern_Constant(USER); decl_extern_Constant(WORKDIR); decl_extern_Constant(HOMEDIR); decl_extern_Constant(EXCLUSIVE); diff --git a/src/Core/ParameterTypeMap.cxx b/src/Core/ParameterTypeMap.cxx index 60080da..0622583 100644 --- a/src/Core/ParameterTypeMap.cxx +++ b/src/Core/ParameterTypeMap.cxx @@ -60,7 +60,6 @@ namespace Batch { addParameter("PID", LONG, 1); addParameter("QUEUE", STRING, 1); addParameter("STATE", STRING, 1); - addParameter("USER", STRING, 1); addParameter("WORKDIR", STRING, 1); addParameter("HOMEDIR", STRING, 1); addParameter("EXCLUSIVE", BOOL, 1); diff --git a/src/Local/BatchManager_Local.cxx b/src/Local/BatchManager_Local.cxx index e5ee672..fc44883 100644 --- a/src/Local/BatchManager_Local.cxx +++ b/src/Local/BatchManager_Local.cxx @@ -296,13 +296,7 @@ namespace Batch { } } - string user; - Parametre::const_iterator it = param.find(USER); - if (it != param.end()) { - user = string(it->second); - } - - return _protocol.getExecCommandArgs(exec_sub_cmd.str(), _hostname, user); + return _protocol.getExecCommandArgs(exec_sub_cmd.str(), _hostname, _username); } diff --git a/src/Local/Test/Test_Local_RSH.cxx b/src/Local/Test/Test_Local_RSH.cxx index 246638e..25133a8 100644 --- a/src/Local/Test/Test_Local_RSH.cxx +++ b/src/Local/Test/Test_Local_RSH.cxx @@ -70,7 +70,6 @@ int main(int argc, char** argv) p[INFILE] = Couple("seta.sh", workdir + "/copied-seta.sh"); p[INFILE] += Couple("setb.sh", workdir + "/copied-setb.sh"); p[OUTFILE] = Couple("result.txt", workdir + "/orig-result.txt"); - p[USER] = user; job.setParametre(p); // ... and its environment Environnement e; diff --git a/src/Local/Test/Test_Local_SSH.cxx b/src/Local/Test/Test_Local_SSH.cxx index c99b3f9..82e857d 100644 --- a/src/Local/Test/Test_Local_SSH.cxx +++ b/src/Local/Test/Test_Local_SSH.cxx @@ -71,7 +71,6 @@ int main(int argc, char** argv) p[INFILE] = Couple("seta.sh", workdir + "/copied-seta.sh"); p[INFILE] += Couple("setb.sh", workdir + "/copied-setb.sh"); p[OUTFILE] = Couple("result.txt", workdir + "/orig-result.txt"); - p[USER] = user; job.setParametre(p); // ... and its environment (SSH_AUTH_SOCK env var is important for ssh agent authentication) Environnement e; -- 2.39.2