diff options
author | Dan Timoney <dtimoney@att.com> | 2017-11-06 17:19:46 -0500 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2017-11-06 17:19:46 -0500 |
commit | da99eed5436f92eb2b4794cc0399bdb0eb400afc (patch) | |
tree | b0aa0db5d31b3c7c0658a93da0caaa6947f0f6ea | |
parent | f9137ed6fb50680ab30b66a97d9d68f6dcc0a47c (diff) |
Ignore TOSCA YML
TOSCA is passed in 2 formats : YML and CSAR. The SDC TOSCA parser only
handles CSAR, so YML artifact cannot be passed to it. Since CSAR
artifact all data needed (that is, there is nothing in YML that SDNC
needs that is not in the CSAR), it can be safely ignored.
Change-Id: I54aa2ae49e3ba0aa23b280fa106ada3d588897a0
Issue-ID: SDNC-169
Signed-off-by: Dan Timoney <dtimoney@att.com>
-rw-r--r-- | ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java index 67e042b5d..d01b02589 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -440,15 +440,15 @@ public class SdncUebCallback implements INotificationCallback { // If an override file exists, read that instead of the file we just downloaded ArtifactTypeEnum artifactEnum = ArtifactTypeEnum.YANG_XML; - boolean toscaYamlType = false; + boolean toscaCsarType = false; if (artifact != null) { String artifactTypeString = artifact.getArtifactType(); - if (artifactTypeString.contains("TOSCA_TEMPLATE")) { - toscaYamlType = true; + if (artifactTypeString.contains("TOSCA_CSAR")) { + toscaCsarType = true; } } else { - if (spoolFile.toString().contains(".yml") || spoolFile.toString().contains(".csar")) { - toscaYamlType = true; + if (spoolFile.toString().contains(".csar")) { + toscaCsarType = true; } } String overrideFileName = config.getOverrideFile(); @@ -462,8 +462,8 @@ public class SdncUebCallback implements INotificationCallback { } - if (toscaYamlType) { - processToscaYaml (data, svcName, resourceName, artifact, spoolFile, archiveDir); + if (toscaCsarType) { + processToscaCsar (data, svcName, resourceName, artifact, spoolFile, archiveDir); try { Path source = spoolFile.toPath(); @@ -529,7 +529,7 @@ public class SdncUebCallback implements INotificationCallback { } - private void processToscaYaml(INotificationData data, String svcName, String resourceName, + private void processToscaCsar(INotificationData data, String svcName, String resourceName, IArtifactInfo artifact, File spoolFile, File archiveDir) { // Use ASDC Dist Client 1.1.5 with TOSCA parsing APIs to extract relevant TOSCA model data @@ -537,7 +537,7 @@ public class SdncUebCallback implements INotificationCallback { // TOSCA data extraction flow 1707: // Use ASDC dist-client to get yaml string - not yet available String model_yaml = null; - LOG.info("Process TOSCA YAML file: "+spoolFile.toString()); + LOG.info("Process TOSCA CSAR file: "+spoolFile.toString()); SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); ISdcCsarHelper sdcCsarHelper = null; |