From 439060993640dd18a8ca50df68b0ec5e30a562de Mon Sep 17 00:00:00 2001 From: zimmerml Date: Tue, 14 Aug 2018 11:14:22 +0200 Subject: [PATCH] Fix upload of DAs to a DockerContainer --- .../handlers/BPELInvokerPluginHandler.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/org.opentosca.planbuilder.provphase.plugin.invoker/src/org/opentosca/planbuilder/provphase/plugin/invoker/bpel/handlers/BPELInvokerPluginHandler.java b/org.opentosca.planbuilder.provphase.plugin.invoker/src/org/opentosca/planbuilder/provphase/plugin/invoker/bpel/handlers/BPELInvokerPluginHandler.java index 7622a8384..8e28e8207 100644 --- a/org.opentosca.planbuilder.provphase.plugin.invoker/src/org/opentosca/planbuilder/provphase/plugin/invoker/bpel/handlers/BPELInvokerPluginHandler.java +++ b/org.opentosca.planbuilder.provphase.plugin.invoker/src/org/opentosca/planbuilder/provphase/plugin/invoker/bpel/handlers/BPELInvokerPluginHandler.java @@ -893,6 +893,16 @@ public boolean handleArtifactReferenceUpload(final AbstractArtifactReference ref switch (cleanName) { + case Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_CONTAINERIP: + // old nodetype properties + if (serverIp != null && runScriptInputParams.contains("ContainerIP")) { + runScriptRequestInputParams.put("ContainerIP", serverIp); + } + runScriptRequestInputParams.put("Script", mkdirScriptVar); + this.handle(templateContext, infraTemplate.getId(), true, "runScript", "ContainerManagementInterface", + "planCallbackAddress_invoker", runScriptRequestInputParams, new HashMap(), + appendToPrePhase); + break; case Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_SERVERIP: // old nodetype properties if (serverIp != null && runScriptInputParams.contains("hostname")) { @@ -943,6 +953,16 @@ public boolean handleArtifactReferenceUpload(final AbstractArtifactReference ref final List transferFileInputParams = getTransferFileParams(infraTemplate); switch (cleanName2) { + case Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_CONTAINERIP: + if (serverIp != null && transferFileInputParams.contains("ContainerIP")) { + transferFileRequestInputParams.put("ContainerIP", serverIp); + } + transferFileRequestInputParams.put("TargetAbsolutePath", ubuntuFilePathVar); + transferFileRequestInputParams.put("SourceURLorLocalPath", containerAPIAbsoluteURIVar); + this.handle(templateContext, infraTemplate.getId(), true, "transferFile", + "ContainerManagementInterface", "planCallbackAddress_invoker", + transferFileRequestInputParams, new HashMap(), appendToPrePhase); + break; case Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_SERVERIP: if (serverIp != null && transferFileInputParams.contains("hostname")) { transferFileRequestInputParams.put("hostname", serverIp);