Skip to content

Commit

Permalink
Merge pull request #1413 from CloudSlang/port_code
Browse files Browse the repository at this point in the history
port python executor code
  • Loading branch information
QueueUpX authored Apr 4, 2023
2 parents 0fe69da + 1c43a6f commit 860e1cd
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import io.cloudslang.lang.entities.bindings.values.ValueFactory;
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.runtime.api.python.PythonEvaluationResult;
import io.cloudslang.runtime.api.python.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.enums.PythonStrategy;
import io.cloudslang.runtime.impl.python.external.ExternalPythonScriptException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,19 @@
import io.cloudslang.lang.entities.bindings.values.ValueFactory;
import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator;
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorCommunicationService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails;
import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionNotCachedEngine;
import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.executor.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorCommunicationServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine;
import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.external.StatefulRestEasyClientsHolder;
import io.cloudslang.score.events.EventBus;
import io.cloudslang.score.events.EventBusImpl;
import org.junit.Assert;
Expand Down Expand Up @@ -470,9 +469,8 @@ public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataSer
}

@Bean(name = "pythonExecutorCommunicationService")
public PythonExecutorCommunicationServiceImpl pythonExecutorCommunicationService() {
return new PythonExecutorCommunicationServiceImpl(
mock(StatefulRestEasyClientsHolder.class), mock(PythonExecutorConfigurationDataService.class));
public PythonExecutorCommunicationService pythonExecutorCommunicationService() {
return mock(PythonExecutorCommunicationService.class);
}

@Bean(name = "pythonExecutorLifecycleManagerService")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@
import io.cloudslang.lang.entities.bindings.values.ValueFactory;
import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator;
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorCommunicationService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails;
import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionEngine;
import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.executor.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorCommunicationServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine;
import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.external.StatefulRestEasyClientsHolder;
import io.cloudslang.score.events.EventBus;
import io.cloudslang.score.events.EventBusImpl;
import org.junit.Assert;
Expand Down Expand Up @@ -569,9 +568,8 @@ public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataSer
}

@Bean(name = "pythonExecutorCommunicationService")
public PythonExecutorCommunicationServiceImpl pythonExecutorCommunicationService() {
return new PythonExecutorCommunicationServiceImpl(
mock(StatefulRestEasyClientsHolder.class), mock(PythonExecutorConfigurationDataService.class));
public PythonExecutorCommunicationService pythonExecutorCommunicationService() {
return mock(PythonExecutorCommunicationService.class);
}

@Bean(name = "pythonExecutorLifecycleManagerService")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@
import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator;
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.lang.runtime.steps.ReadOnlyContextAccessor;
import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorCommunicationService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails;
import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionEngine;
import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.executor.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorCommunicationServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine;
import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.external.StatefulRestEasyClientsHolder;
import io.cloudslang.score.events.EventBus;
import io.cloudslang.score.events.EventBusImpl;
import junit.framework.Assert;
Expand Down Expand Up @@ -277,9 +276,8 @@ public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataSer
}

@Bean(name = "pythonExecutorCommunicationService")
public PythonExecutorCommunicationServiceImpl pythonExecutorCommunicationService() {
return new PythonExecutorCommunicationServiceImpl(
mock(StatefulRestEasyClientsHolder.class), mock(PythonExecutorConfigurationDataService.class));
public PythonExecutorCommunicationService pythonExecutorCommunicationService() {
return mock(PythonExecutorCommunicationService.class);
}

@Bean(name = "pythonExecutorLifecycleManagerService")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@
import io.cloudslang.lang.entities.bindings.values.ValueFactory;
import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator;
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorCommunicationService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails;
import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionEngine;
import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.executor.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorCommunicationServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine;
import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.external.StatefulRestEasyClientsHolder;
import io.cloudslang.score.events.EventBus;
import io.cloudslang.score.events.EventBusImpl;
import org.junit.Assert;
Expand Down Expand Up @@ -254,9 +253,8 @@ public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataSer
}

@Bean(name = "pythonExecutorCommunicationService")
public PythonExecutorCommunicationServiceImpl pythonExecutorCommunicationService() {
return new PythonExecutorCommunicationServiceImpl(
mock(StatefulRestEasyClientsHolder.class), mock(PythonExecutorConfigurationDataService.class));
public PythonExecutorCommunicationService pythonExecutorCommunicationService() {
return mock(PythonExecutorCommunicationService.class);
}

@Bean(name = "pythonExecutorLifecycleManagerService")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@
import io.cloudslang.lang.entities.bindings.values.ValueFactory;
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.runtime.api.python.PythonEvaluationResult;
import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorCommunicationService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails;
import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionEngine;
import io.cloudslang.runtime.impl.python.PythonExecutor;
import io.cloudslang.runtime.impl.python.executor.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorCommunicationServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine;
import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.external.StatefulRestEasyClientsHolder;
import io.cloudslang.score.events.EventBus;
import io.cloudslang.score.events.EventBusImpl;
import org.junit.Assert;
Expand Down Expand Up @@ -220,9 +219,8 @@ public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataSer
}

@Bean(name = "pythonExecutorCommunicationService")
public PythonExecutorCommunicationServiceImpl pythonExecutorCommunicationService() {
return new PythonExecutorCommunicationServiceImpl(
mock(StatefulRestEasyClientsHolder.class), mock(PythonExecutorConfigurationDataService.class));
public PythonExecutorCommunicationService pythonExecutorCommunicationService() {
return mock(PythonExecutorCommunicationService.class);
}

@Bean(name = "pythonExecutorLifecycleManagerService")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@
import io.cloudslang.lang.entities.bindings.values.ValueFactory;
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.runtime.api.python.PythonExecutionResult;
import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorCommunicationService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails;
import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionEngine;
import io.cloudslang.runtime.impl.python.PythonExecutor;
import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.executor.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorCommunicationServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl;
import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine;
import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.external.StatefulRestEasyClientsHolder;
import io.cloudslang.score.events.EventBus;
import io.cloudslang.score.events.EventBusImpl;
import io.cloudslang.utils.PythonScriptGeneratorUtils;
Expand Down Expand Up @@ -210,9 +209,8 @@ public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataSer
}

@Bean(name = "pythonExecutorCommunicationService")
public PythonExecutorCommunicationServiceImpl pythonExecutorCommunicationService() {
return new PythonExecutorCommunicationServiceImpl(
mock(StatefulRestEasyClientsHolder.class), mock(PythonExecutorConfigurationDataService.class));
public PythonExecutorCommunicationService pythonExecutorCommunicationService() {
return mock(PythonExecutorCommunicationService.class);
}

@Bean(name = "pythonExecutorLifecycleManagerService")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,19 @@
import io.cloudslang.lang.runtime.services.ScriptsService;
import io.cloudslang.lang.runtime.steps.ContentTestActions.NonSerializableObject;
import io.cloudslang.runtime.api.java.JavaRuntimeService;
import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorCommunicationService;
import io.cloudslang.runtime.api.python.executor.services.PythonExecutorConfigurationDataService;
import io.cloudslang.runtime.api.python.PythonRuntimeService;
import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails;
import io.cloudslang.runtime.api.sequential.SequentialExecutionService;
import io.cloudslang.runtime.impl.java.JavaExecutionCachedEngine;
import io.cloudslang.runtime.impl.java.JavaRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine;
import io.cloudslang.runtime.impl.python.PythonExecutionEngine;
import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.executor.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.executor.PythonExecutorCommunicationServiceImpl;
import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl;
import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine;
import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl;
import io.cloudslang.runtime.impl.python.external.StatefulRestEasyClientsHolder;
import io.cloudslang.score.api.execution.ExecutionParametersConsts;
import io.cloudslang.score.events.EventBus;
import io.cloudslang.score.events.EventBusImpl;
Expand Down Expand Up @@ -1215,9 +1214,8 @@ public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataSer
}

@Bean(name = "pythonExecutorCommunicationService")
public PythonExecutorCommunicationServiceImpl pythonExecutorCommunicationService() {
return new PythonExecutorCommunicationServiceImpl(
mock(StatefulRestEasyClientsHolder.class), mock(PythonExecutorConfigurationDataService.class));
public PythonExecutorCommunicationService pythonExecutorCommunicationService() {
return mock(PythonExecutorCommunicationService.class);
}

@Bean(name = "externalPythonExecutorService")
Expand Down
Loading

0 comments on commit 860e1cd

Please sign in to comment.