Skip to content

Commit

Permalink
Merge pull request #72 from OpenTOSCA/fix/DA_To_Container_Upload
Browse files Browse the repository at this point in the history
[Bug] Fix upload of DAs to a DockerContainer
  • Loading branch information
nyuuyn authored Aug 14, 2018
2 parents 500be9a + 4390609 commit 6be09f1
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Variable>(),
appendToPrePhase);
break;
case Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_SERVERIP:
// old nodetype properties
if (serverIp != null && runScriptInputParams.contains("hostname")) {
Expand Down Expand Up @@ -943,6 +953,16 @@ public boolean handleArtifactReferenceUpload(final AbstractArtifactReference ref
final List<String> 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<String, Variable>(), appendToPrePhase);
break;
case Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_SERVERIP:
if (serverIp != null && transferFileInputParams.contains("hostname")) {
transferFileRequestInputParams.put("hostname", serverIp);
Expand Down

0 comments on commit 6be09f1

Please sign in to comment.