From: davidplunkett Date: Thu, 7 Mar 2019 04:43:53 +0000 (+0000) Subject: replace portnumber with port in all classes X-Git-Tag: 1.0.0~6 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=e219ba71d954fb8f6303959d5f05af4dc471784a;p=camunda_workflow.git replace portnumber with port in all classes Change-Id: I8ece4dc7105982e4fe2f213931a0c2fe33c278b6 Signed-off-by: davidplunkett --- diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/AirshipRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipRemoteScriptExecutorTaskDelegate.java index c658839..0e5ef5e 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/AirshipRemoteScriptExecutorTaskDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipRemoteScriptExecutorTaskDelegate.java @@ -38,7 +38,7 @@ public class AirshipRemoteScriptExecutorTaskDelegate implements JavaDelegate { public void execute(DelegateExecution ctx) throws Exception { String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String filename=(String)ctx.getVariable("remotefilename"); @@ -46,11 +46,11 @@ public class AirshipRemoteScriptExecutorTaskDelegate implements JavaDelegate { String srcdir=(String)ctx.getVariable("srcdir"); String destdir=(String)ctx.getVariable("destdir"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", - remoteserver,portnumber,username,password,filename,fileparams,srcdir,destdir); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remoteserver,port,username,password,filename,fileparams,srcdir,destdir); String command="cd "+destdir+ ";" +" ./"+filename+" "+ (fileparams!=null?fileparams:" ") ; logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,srcdir,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,srcdir,destdir,command); } } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteDeploymentVerificationDelegate.java index 0b16ca0..c0d1132 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteDeploymentVerificationDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteDeploymentVerificationDelegate.java @@ -45,19 +45,19 @@ public class ApacheRemoteDeploymentVerificationDelegate implements JavaDelegate int waittime=(Integer)ctx.getVariable("waittime"); int iterations=(Integer)ctx.getVariable("iterations"); String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String srcdir=(String)ctx.getVariable("srcdir"); String destdir=(String)ctx.getVariable("destdir"); String filepparams=(String)ctx.getVariable("verifierfileparams"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", - remoteserver,portnumber,username,password,verifierFilename,srcdir,destdir,waittime,iterations); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", + remoteserver,port,username,password,verifierFilename,srcdir,destdir,waittime,iterations); String command= "cd "+destdir+ ";" + (filepparams!=null?filepparams:" ") + " ./"+verifierFilename; logger.debug("Execution command {}",command); - remotedeploymentVerificationService.executeScript(remoteserver,username,password,portnumber,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); + remotedeploymentVerificationService.executeScript(remoteserver,username,password,port,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); }catch(TaskExecutorException ex) { throw ex; } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteScriptExecutorTaskDelegate.java index 8d39e8e..36044c1 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteScriptExecutorTaskDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteScriptExecutorTaskDelegate.java @@ -39,7 +39,7 @@ public class ApacheRemoteScriptExecutorTaskDelegate implements JavaDelegate { public void execute(DelegateExecution ctx) throws Exception { String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String filename=(String)ctx.getVariable("filename"); @@ -48,11 +48,11 @@ public class ApacheRemoteScriptExecutorTaskDelegate implements JavaDelegate { String destdir=(String)ctx.getVariable("destdir"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", - remoteserver,portnumber,username,password,filename,fileparams,srcdir,destdir); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remoteserver,port,username,password,filename,fileparams,srcdir,destdir); String command= "cd "+destdir+ ";" + (fileparams!=null?fileparams:" ") + " ./"+filename; logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,srcdir,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,srcdir,destdir,command); } } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeployPostVerficationRemoteScriptExecutor.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeployPostVerficationRemoteScriptExecutor.java index 6a25fd3..d412c24 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/DeployPostVerficationRemoteScriptExecutor.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeployPostVerficationRemoteScriptExecutor.java @@ -43,7 +43,7 @@ public class DeployPostVerficationRemoteScriptExecutor implements JavaDelegate { try { String remoteserver =(String) ctx.getVariable("remoteserver"); - int portnumber =(Integer)ctx.getVariable("port"); + int port =(Integer)ctx.getVariable("port"); String username =(String) ctx.getVariable("username"); String password =(String) ctx.getVariable("password"); String filename =(String) ctx.getVariable("postverificationscript"); @@ -54,13 +54,13 @@ public class DeployPostVerficationRemoteScriptExecutor implements JavaDelegate { String blueprint =(String) ctx.getVariable("blueprint"); deployResponseSenderService.sendResponse(new BuildResponse(null, null, null, null, "completed", sitename, null, null, null)); - logger.debug("task execution started blueprint {}, remoteserver {}, portnumber {}, username {}, password {}, filename {}, fileparams {}, src dir={}, dest dir={}", - blueprint, remoteserver, portnumber, username, password, filename, fileparams, srcdir, destdir); + logger.debug("task execution started blueprint {}, remoteserver {}, port {}, username {}, password {}, filename {}, fileparams {}, src dir={}, dest dir={}", + blueprint, remoteserver, port, username, password, filename, fileparams, srcdir, destdir); String command = String.format("/bin/bash %s/%s %s", destdir, filename, (fileparams!=null?fileparams.replaceAll(",", " "):"")); if ( filename != null && !filename.equals("null") && !filename.isEmpty() ) { logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,srcdir,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,srcdir,destdir,command); } else { logger.debug("Skipping invalid verification command: {}", command); } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteDeploymentVerificationDelegate.java index e1e2e93..b263843 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteDeploymentVerificationDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteDeploymentVerificationDelegate.java @@ -43,7 +43,7 @@ public class DeployRemoteDeploymentVerificationDelegate implements JavaDelegate try { String remoteserver =(String) ctx.getVariable("remoteserver"); - int portnumber =(Integer)ctx.getVariable("port"); + int port =(Integer)ctx.getVariable("port"); String username =(String) ctx.getVariable("username"); String password =(String) ctx.getVariable("password"); String filename =(String) ctx.getVariable("verifier"); @@ -57,13 +57,13 @@ public class DeployRemoteDeploymentVerificationDelegate implements JavaDelegate deployResponseSenderService.sendResponse(new BuildResponse(null, null, null, null, "verifying...", sitename,null,null,null)); - logger.debug("task execution started blueprint {}, remoteserver {}, portnumber {}, username {}, password {}, filename {}, waittime {}, No of iterations {}", - blueprint, remoteserver, portnumber, username, password, filename, waittime, iterations); + logger.debug("task execution started blueprint {}, remoteserver {}, port {}, username {}, password {}, filename {}, waittime {}, No of iterations {}", + blueprint, remoteserver, port, username, password, filename, waittime, iterations); String command = String.format("/bin/bash %s/%s %s", destdir, filename, (fileparams!=null?fileparams.replaceAll(",", " "):"")); if ( filename != null && !filename.equals("null") && !filename.isEmpty() ) { logger.debug("Execution command: {}",command); - remotedeploymentVerificationService.executeScript(remoteserver,username,password,portnumber,filename,fileparams,srcdir,destdir,waittime,iterations,command); + remotedeploymentVerificationService.executeScript(remoteserver,username,password,port,filename,fileparams,srcdir,destdir,waittime,iterations,command); } else { logger.debug("Skipping invalid verification command: {}", command); } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteScriptExecutorTaskDelegate.java index d2a5eb7..0ab8774 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteScriptExecutorTaskDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteScriptExecutorTaskDelegate.java @@ -40,7 +40,7 @@ public class DeployRemoteScriptExecutorTaskDelegate implements JavaDelegate { public void execute(DelegateExecution ctx) throws Exception { String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String filename=(String)ctx.getVariable("filename"); @@ -50,11 +50,11 @@ public class DeployRemoteScriptExecutorTaskDelegate implements JavaDelegate { String sitename=(String)ctx.getVariable("sitename"); deployResponseSenderService.sendResponse(new BuildResponse(null, null, null, null, "in progress...", sitename, null, null, null)); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", - remoteserver,portnumber,username,password,filename,fileparams,srcdir,destdir); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remoteserver,port,username,password,filename,fileparams,srcdir,destdir); String command = String.format("/bin/bash %s/%s %s", destdir, filename, (fileparams!=null?fileparams.replaceAll(",", " "):"")); logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,srcdir,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,srcdir,destdir,command); } } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/FileTransferDelegator.java b/akraino/src/main/java/com/akraino/bpm/delegate/FileTransferDelegator.java index c748ab0..a63a972 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/FileTransferDelegator.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/FileTransferDelegator.java @@ -50,7 +50,7 @@ public class FileTransferDelegator implements JavaDelegate { String srcdir=(String)ctx.getVariable("srcdir"); String destdir=(String)ctx.getVariable("destdir"); - logger.debug("File transfer started remoteserver {} , portnumber {},username {}, password {},src ={}, dest={}", + logger.debug("File transfer started remoteserver {} , port {},username {}, password {},src ={}, dest={}", remoteserver,port,username,password,srcdir,destdir); fileTransferService.transferFile(srcdir, destdir,remoteserver, username, password, port); }catch(TaskExecutorException ex) { diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript1ExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript1ExecutorTaskDelegate.java index f331085..d49629e 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript1ExecutorTaskDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript1ExecutorTaskDelegate.java @@ -45,18 +45,18 @@ public class MultiNodeDeployRemoteScript1ExecutorTaskDelegate implements JavaDel String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String filename=(String)ctx.getVariable("remotefile1"); String fileparams=(String)ctx.getVariable("remotefile1params"); String destdir=(String)ctx.getVariable("destdir1"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} ,fileparams={},dest dir={}", - remoteserver,portnumber,username,password,filename,fileparams,destdir); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} ,fileparams={},dest dir={}", + remoteserver,port,username,password,filename,fileparams,destdir); String command="cd "+destdir+ ";" +" bash "+filename+" "+ (fileparams!=null?fileparams:" ") ; logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,null,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,null,destdir,command); } } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript2ExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript2ExecutorTaskDelegate.java index 2261208..5e624dc 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript2ExecutorTaskDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/MultiNodeDeployRemoteScript2ExecutorTaskDelegate.java @@ -44,7 +44,7 @@ public class MultiNodeDeployRemoteScript2ExecutorTaskDelegate implements JavaDel public void execute(DelegateExecution ctx) throws Exception { String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String filename=(String)ctx.getVariable("remotefile2"); @@ -54,12 +54,12 @@ public class MultiNodeDeployRemoteScript2ExecutorTaskDelegate implements JavaDel deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "inprogress","not started",sitename,null,null,null)); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} ,fileparams={},dest dir={}", - remoteserver,portnumber,username,password,filename,fileparams,destdir); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} ,fileparams={},dest dir={}", + remoteserver,port,username,password,filename,fileparams,destdir); String command="cd "+destdir+ ";" +" bash "+filename+" "+ (fileparams!=null?fileparams:" ") ; logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,null,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,null,destdir,command); deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","completed",sitename,null,null,null)); } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/RemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteDeploymentVerificationDelegate.java index dc10c68..d68e77b 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/RemoteDeploymentVerificationDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteDeploymentVerificationDelegate.java @@ -45,20 +45,20 @@ public class RemoteDeploymentVerificationDelegate implements JavaDelegate { int waittime=(Integer)ctx.getVariable("waittime"); int iterations=(Integer)ctx.getVariable("iterations"); String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String srcdir=(String)ctx.getVariable("srcdir"); String destdir=(String)ctx.getVariable("destdir"); String filepparams=(String)ctx.getVariable("verifierfileparams"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", - remoteserver,portnumber,username,password,verifierFilename,srcdir,destdir,waittime,iterations); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", + remoteserver,port,username,password,verifierFilename,srcdir,destdir,waittime,iterations); // This looks wrong! String command = "/bin/bash " +destdir+"/"+(verifierFilename!=null?verifierFilename:" ")+" "+(filepparams!=null?filepparams.replaceAll(",", " "):" "); logger.debug("Execution command {}",command); - remotedeploymentVerificationService.executeScript(remoteserver,username,password,portnumber,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); + remotedeploymentVerificationService.executeScript(remoteserver,username,password,port,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); } catch(TaskExecutorException ex) { throw ex; } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/RemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteScriptExecutorTaskDelegate.java index 74dd3f7..c3ce16e 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/RemoteScriptExecutorTaskDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteScriptExecutorTaskDelegate.java @@ -35,7 +35,7 @@ public class RemoteScriptExecutorTaskDelegate implements JavaDelegate { public void execute(DelegateExecution ctx) throws Exception { String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String filename=(String)ctx.getVariable("filename"); @@ -43,10 +43,10 @@ public class RemoteScriptExecutorTaskDelegate implements JavaDelegate { String srcdir=(String)ctx.getVariable("srcdir"); String destdir=(String)ctx.getVariable("destdir"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", - remoteserver,portnumber,username,password,filename,fileparams,srcdir,destdir); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remoteserver,port,username,password,filename,fileparams,srcdir,destdir); String command = String.format("cd %s; /bin/bash %s %s", destdir, filename, (fileparams!=null?fileparams.replaceAll(",", " "):"")); logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,srcdir,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,srcdir,destdir,command); } } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteDeploymentVerificationDelegate.java index 878e24a..47363f9 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteDeploymentVerificationDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteDeploymentVerificationDelegate.java @@ -45,19 +45,19 @@ public class TempestRemoteDeploymentVerificationDelegate implements JavaDelegate int waittime=(Integer)ctx.getVariable("waittime"); int iterations=(Integer)ctx.getVariable("iterations"); String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String srcdir=(String)ctx.getVariable("srcdir"); String destdir=(String)ctx.getVariable("destdir"); String filepparams=(String)ctx.getVariable("verifierfileparams"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", - remoteserver,portnumber,username,password,verifierFilename,srcdir,destdir,waittime,iterations); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", + remoteserver,port,username,password,verifierFilename,srcdir,destdir,waittime,iterations); String command= "cd "+destdir+ ";" + (filepparams!=null?filepparams:" ")+ " ./"+verifierFilename; logger.debug("Execution command {}",command); - remotedeploymentVerificationService.executeScript(remoteserver,username,password,portnumber,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); + remotedeploymentVerificationService.executeScript(remoteserver,username,password,port,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); }catch(TaskExecutorException ex) { throw ex; } diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteScriptExecutorTaskDelegate.java index 348ee4e..88f0714 100644 --- a/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteScriptExecutorTaskDelegate.java +++ b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteScriptExecutorTaskDelegate.java @@ -39,7 +39,7 @@ public class TempestRemoteScriptExecutorTaskDelegate implements JavaDelegate { public void execute(DelegateExecution ctx) throws Exception { String remoteserver=(String)ctx.getVariable("remoteserver"); - int portnumber=(Integer)ctx.getVariable("port"); + int port=(Integer)ctx.getVariable("port"); String username=(String)ctx.getVariable("username"); String password=(String)ctx.getVariable("password"); String filename=(String)ctx.getVariable("filename"); @@ -48,12 +48,12 @@ public class TempestRemoteScriptExecutorTaskDelegate implements JavaDelegate { String destdir=(String)ctx.getVariable("destdir"); - logger.debug("task execution started remoteserver {} , portnumber {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", - remoteserver,portnumber,username,password,filename,fileparams,srcdir,destdir); + logger.debug("task execution started remoteserver {} , port {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remoteserver,port,username,password,filename,fileparams,srcdir,destdir); String command= "cd "+destdir+ ";" + (fileparams!=null?fileparams:" ") + " ./"+filename; logger.debug("Execution command {}",command); - remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,portnumber,filename,fileparams,srcdir,destdir,command); + remoteScriptExecutionService.executeRemoteScript(remoteserver,username,password,port,filename,fileparams,srcdir,destdir,command); } } diff --git a/akraino/src/main/java/com/akraino/bpm/model/Apache.java b/akraino/src/main/java/com/akraino/bpm/model/Apache.java index 036e748..afedbd2 100644 --- a/akraino/src/main/java/com/akraino/bpm/model/Apache.java +++ b/akraino/src/main/java/com/akraino/bpm/model/Apache.java @@ -22,7 +22,7 @@ public class Apache { private String remoteserver; private String username; private String password; - private int portnumber; + private int port; private String srcdir; private String destdir; private String filename; @@ -85,13 +85,13 @@ public class Apache { } - public int getPortnumber() { - return portnumber; + public int getPort() { + return port; } - public void setPortnumber(int portnumber) { - this.portnumber = portnumber; + public void setPort(int port) { + this.port = port; } @@ -193,7 +193,7 @@ public class Apache { @Override public String toString() { return "Apache [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username - + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir=" + + ", password=" + password + ", port=" + port + ", srcdir=" + srcdir + ", destdir=" + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier=" + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams=" diff --git a/akraino/src/main/java/com/akraino/bpm/model/Onap.java b/akraino/src/main/java/com/akraino/bpm/model/Onap.java index 65cd159..949098d 100644 --- a/akraino/src/main/java/com/akraino/bpm/model/Onap.java +++ b/akraino/src/main/java/com/akraino/bpm/model/Onap.java @@ -22,7 +22,7 @@ public class Onap { private String remoteserver; private String username; private String password; - private int portnumber; + private int port; private String srcdir; private String destdir; private String filename; @@ -99,13 +99,13 @@ public class Onap { } - public int getPortnumber() { - return portnumber; + public int getPort() { + return port; } - public void setPortnumber(int portnumber) { - this.portnumber = portnumber; + public void setPort(int port) { + this.port = port; } @@ -198,7 +198,7 @@ public class Onap { @Override public String toString() { return "Onap [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username - + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir=" + + ", password=" + password + ", port=" + port + ", srcdir=" + srcdir + ", destdir=" + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier=" + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams=" diff --git a/akraino/src/main/java/com/akraino/bpm/model/Tempest.java b/akraino/src/main/java/com/akraino/bpm/model/Tempest.java index 5d935df..13ff10c 100644 --- a/akraino/src/main/java/com/akraino/bpm/model/Tempest.java +++ b/akraino/src/main/java/com/akraino/bpm/model/Tempest.java @@ -22,7 +22,7 @@ public class Tempest { private String remoteserver; private String username; private String password; - private int portnumber; + private int port; private String srcdir; private String destdir; private String filename; @@ -98,13 +98,13 @@ public class Tempest { } - public int getPortnumber() { - return portnumber; + public int getPort() { + return port; } - public void setPortnumber(int portnumber) { - this.portnumber = portnumber; + public void setPort(int port) { + this.port = port; } @@ -198,7 +198,7 @@ public class Tempest { @Override public String toString() { return "Tempest [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username - + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir=" + + ", password=" + password + ", port=" + port + ", srcdir=" + srcdir + ", destdir=" + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier=" + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams=" diff --git a/akraino/src/main/java/com/akraino/bpm/service/RemoteDeploymentVerificationService.java b/akraino/src/main/java/com/akraino/bpm/service/RemoteDeploymentVerificationService.java index 9a1426e..01c0856 100644 --- a/akraino/src/main/java/com/akraino/bpm/service/RemoteDeploymentVerificationService.java +++ b/akraino/src/main/java/com/akraino/bpm/service/RemoteDeploymentVerificationService.java @@ -18,7 +18,7 @@ package com.akraino.bpm.service; public interface RemoteDeploymentVerificationService { - public void executeScript(String remoteserver,String username,String password,int portnumber,String filename, + public void executeScript(String remoteserver,String username,String password,int port,String filename, String fileparams,String srcdir,String destdir,int waittime,int iterations,String command); diff --git a/akraino/src/main/java/com/akraino/bpm/service/RemoteScriptExecutionService.java b/akraino/src/main/java/com/akraino/bpm/service/RemoteScriptExecutionService.java index 5968d63..ba54e4a 100644 --- a/akraino/src/main/java/com/akraino/bpm/service/RemoteScriptExecutionService.java +++ b/akraino/src/main/java/com/akraino/bpm/service/RemoteScriptExecutionService.java @@ -18,6 +18,6 @@ package com.akraino.bpm.service; public interface RemoteScriptExecutionService { - public void executeRemoteScript(String remoteserver,String username,String password,int portnumber,String filename,String fileparams,String srcdir,String destdir,String command); + public void executeRemoteScript(String remoteserver,String username,String password,int port,String filename,String fileparams,String srcdir,String destdir,String command); } diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/AsyncProcessExecutorServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/AsyncProcessExecutorServiceImpl.java index 6c2fdde..9f605ae 100644 --- a/akraino/src/main/java/com/akraino/bpm/service/impl/AsyncProcessExecutorServiceImpl.java +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/AsyncProcessExecutorServiceImpl.java @@ -180,7 +180,7 @@ public class AsyncProcessExecutorServiceImpl implements AsyncProcessExecutorServ .putValue("remoteserver", onap.getRemoteserver()) .putValue("username", onap.getUsername()) .putValue("password", onap.getPassword()) - .putValue("port", onap.getPortnumber()) + .putValue("port", onap.getPort()) .putValue("srcdir", onap.getSrcdir()) .putValue("destdir",onap.getDestdir()) .putValue("ScpScriptFilepath", transferfile) @@ -218,7 +218,7 @@ public class AsyncProcessExecutorServiceImpl implements AsyncProcessExecutorServ .putValue("remoteserver", tempest.getRemoteserver()) .putValue("username", tempest.getUsername()) .putValue("password", tempest.getPassword()) - .putValue("port", tempest.getPortnumber()) + .putValue("port", tempest.getPort()) .putValue("srcdir", tempest.getSrcdir()) .putValue("destdir",tempest.getDestdir()) .putValue("ScpScriptFilepath", transferfile) @@ -256,7 +256,7 @@ public class AsyncProcessExecutorServiceImpl implements AsyncProcessExecutorServ .putValue("remoteserver", apache.getRemoteserver()) .putValue("username", apache.getUsername()) .putValue("password", apache.getPassword()) - .putValue("port", apache.getPortnumber()) + .putValue("port", apache.getPort()) .putValue("srcdir", apache.getSrcdir()) .putValue("destdir",apache.getDestdir()) .putValue("scpfilename", transferfile) diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteDeploymentverificationServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteDeploymentverificationServiceImpl.java index c50fba5..3f2355b 100644 --- a/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteDeploymentverificationServiceImpl.java +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteDeploymentverificationServiceImpl.java @@ -38,7 +38,7 @@ public class RemoteDeploymentverificationServiceImpl implements RemoteDeployment private static Logger logger = LoggerFactory.getLogger(RemoteDeploymentverificationServiceImpl.class); - public void executeScript(String remoteserver,String username,String password,int portnumber, + public void executeScript(String remoteserver,String username,String password,int port, String filename,String fileparams,String srcdir,String destdir,int waitttime,int iterations,String command) { boolean issuccess=true; @@ -53,7 +53,7 @@ public class RemoteDeploymentverificationServiceImpl implements RemoteDeployment logger.debug("Executing the deployment verification script: {} iteration: {}", command, i); Thread.sleep(waitttime*1000); JSch jsch = new JSch(); - session = jsch.getSession(username, remoteserver, portnumber); + session = jsch.getSession(username, remoteserver, port); session.setConfig("StrictHostKeyChecking", "no"); session.setPassword(password); session.connect(); diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteScriptExecutionServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteScriptExecutionServiceImpl.java index b44117b..8da2670 100644 --- a/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteScriptExecutionServiceImpl.java +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteScriptExecutionServiceImpl.java @@ -41,14 +41,14 @@ public class RemoteScriptExecutionServiceImpl implements RemoteScriptExecutionSe * @param remoteserver the remote server to execute on * @param username the user name on the remote server * @param password the password for the user - * @param portnumber the port number on the remote server + * @param port the port number on the remote server * @param filename not used * @param fileparams not used * @param srcdir not used * @param destdir not used * @param command the command to execute */ - public void executeRemoteScript(String remoteserver,String username,String password,int portnumber,String filename, + public void executeRemoteScript(String remoteserver,String username,String password,int port,String filename, String fileparams,String srcdir,String destdir,String command) { //String filepath=destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" "); @@ -56,10 +56,10 @@ public class RemoteScriptExecutionServiceImpl implements RemoteScriptExecutionSe Session session=null; BufferedReader reader =null; try { - //tranferFile(remoteserver,portnumber,username,password,filename,srcdir,destdir); + //tranferFile(remoteserver,port,username,password,filename,srcdir,destdir); logger.debug("executing the script "+command); JSch jsch = new JSch(); - session = jsch.getSession(username, remoteserver, portnumber); + session = jsch.getSession(username, remoteserver, port); session.setConfig("StrictHostKeyChecking", "no"); session.setPassword(password); session.connect();