* limitations under the License.
* ============LICENSE_END============================================
* ===================================================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
*/
package org.onap.clamp.clds.sdc.controller.installer;
public synchronized void save(IDistributionClientDownloadResult resultArtifact)
throws SdcArtifactInstallerException, SdcToscaParserException {
try {
- logger.info("Writing CSAR file : " + artifactElement.getArtifactURL() + " UUID "
- + artifactElement.getArtifactUUID() + ")");
+ logger.info("Writing CSAR file to: " + csarFilePath + " UUID " + artifactElement.getArtifactUUID() + ")");
Path path = Paths.get(csarFilePath);
Files.createDirectories(path.getParent());
// Create or replace the file
for (IResourceInstance resource : this.sdcNotification.getResources()) {
String filteredString = resource.getResourceInstanceName().replaceAll("-", "");
filteredString = filteredString.replaceAll(" ", "");
- if (filteredString.equals(blueprintResourceInstanceName)) {
+ if (filteredString.equalsIgnoreCase(blueprintResourceInstanceName)) {
return resource;
}
}
try (InputStream stream = zipFile.getInputStream(entry)) {
blueprintArtifact.setDcaeBlueprint(IOUtils.toString(stream));
}
- IResourceInstance resource = searchForResourceByInstanceName(entry.getName().substring(
+ blueprintArtifact.setResourceAttached(searchForResourceByInstanceName(entry.getName().substring(
entry.getName().indexOf(RESOURCE_INSTANCE_NAME_PREFIX)
+ RESOURCE_INSTANCE_NAME_PREFIX.length(),
- entry.getName().indexOf(RESOURCE_INSTANCE_NAME_SUFFIX)));
- blueprintArtifact.setBlueprintInvariantResourceUuid(resource.getResourceInvariantUUID());
- blueprintArtifact.setBlueprintResourceInstanceName(resource.getResourceInstanceName());
- this.mapOfBlueprints.put(blueprintArtifact.getBlueprintResourceInstanceName(), blueprintArtifact);
+ entry.getName().indexOf(RESOURCE_INSTANCE_NAME_SUFFIX))));
+ this.mapOfBlueprints.put(blueprintArtifact.getResourceAttached().getResourceInstanceName(),
+ blueprintArtifact);
+ logger.info("Found a blueprint entry in the CSAR " + blueprintArtifact.getBlueprintArtifactName()
+ + " for resource instance Name "
+ + blueprintArtifact.getResourceAttached().getResourceInstanceName());
}
}
+ logger.info(this.mapOfBlueprints.size() + " blueprint(s) will be converted to closed loop");
}
}