summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-02-12 21:34:58 +0100
committersebdet <sebastien.determe@intl.att.com>2019-02-13 10:27:01 +0100
commit6914f938afd9cec84d6bb2b044cef74f4e997ab1 (patch)
tree6fb0bfd6e1beb0994dae4512d07133b944db672c /src
parent95511cbe373d5cf138689b091a1ef26c199868f8 (diff)
support multiple CL
Support multiple CL CSAR deployment per service/vnf Issue-ID: CLAMP-289 Change-Id: I6e52da07b393bffeff18e16a5afa78ef14162935 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java3
-rw-r--r--src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java32
-rw-r--r--src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java59
-rw-r--r--src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java29
-rw-r--r--src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml104
-rw-r--r--src/test/resources/example/sdc/service-Simsfoimap0112.csarbin49933 -> 52391 bytes
6 files changed, 173 insertions, 54 deletions
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java
index 1b7cb28c2..1a99919ee 100644
--- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java
+++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java
@@ -138,8 +138,7 @@ public class CsarHandler {
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))));
- this.mapOfBlueprints.put(blueprintArtifact.getResourceAttached().getResourceInstanceName(),
- blueprintArtifact);
+ this.mapOfBlueprints.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact);
logger.info("Found a blueprint entry in the CSAR " + blueprintArtifact.getBlueprintArtifactName()
+ " for resource instance Name "
+ blueprintArtifact.getResourceAttached().getResourceInstanceName());
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java
index 50090920e..bfda6924d 100644
--- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java
+++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java
@@ -25,8 +25,8 @@ package org.onap.clamp.clds.sdc.controller.installer;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
-
import com.google.gson.JsonObject;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -59,8 +59,9 @@ import org.springframework.transaction.annotation.Transactional;
import org.yaml.snakeyaml.Yaml;
/**
- * This class will be instantiated by spring config, and used by Sdc Controller. There is no state kept by the bean.
- * It's used to deploy the csar/notification received from SDC in DB.
+ * This class will be instantiated by spring config, and used by Sdc Controller.
+ * There is no state kept by the bean. It's used to deploy the csar/notification
+ * received from SDC in DB.
*/
public class CsarInstallerImpl implements CsarInstaller {
@@ -101,15 +102,14 @@ public class CsarInstallerImpl implements CsarInstaller {
boolean alreadyInstalled = true;
for (Entry<String, BlueprintArtifact> blueprint : csar.getMapOfBlueprints().entrySet()) {
alreadyInstalled = alreadyInstalled
- && (CldsModel.retrieve(cldsDao, buildModelName(csar, blueprint.getKey()), true).getId() != null) ? true
- : false;
+ && CldsModel.retrieve(cldsDao, buildModelName(csar, blueprint.getValue()), true).getId() != null;
}
return alreadyInstalled;
}
- public static String buildModelName(CsarHandler csar, String resourceInstanceName)
+ public static String buildModelName(CsarHandler csar, BlueprintArtifact artifact)
throws SdcArtifactInstallerException {
- String policyScopePrefix = searchForPolicyScopePrefix(csar.getMapOfBlueprints().get(resourceInstanceName));
+ String policyScopePrefix = searchForPolicyScopePrefix(artifact);
if (policyScopePrefix.contains("*")) {
// This is policy_filter type
policyScopePrefix = policyScopePrefix.replaceAll("\\*", "");
@@ -117,9 +117,10 @@ public class CsarInstallerImpl implements CsarInstaller {
// This is normally the get_input case
policyScopePrefix = MODEL_NAME_PREFIX;
}
- return policyScopePrefix + csar.getSdcCsarHelper().getServiceMetadata().getValue("name") + "_v"
- + csar.getSdcNotification().getServiceVersion().replace('.', '_') + "_"
- + resourceInstanceName.replaceAll(" ", "");
+ return (policyScopePrefix + "_" + csar.getSdcCsarHelper().getServiceMetadata().getValue("name") + "_v"
+ + csar.getSdcNotification().getServiceVersion() + "_"
+ + artifact.getResourceAttached().getResourceInstanceName().replaceAll(" ", "") + "_"
+ + artifact.getBlueprintArtifactName().replace(".yaml", "")).replace('.', '_');
}
@Override
@@ -214,8 +215,8 @@ public class CsarInstallerImpl implements CsarInstaller {
}
/**
- * This call must be done when deploying the SDC notification as this call get the latest version of the artifact
- * (version can be specified to DCAE call)
+ * This call must be done when deploying the SDC notification as this call get
+ * the latest version of the artifact (version can be specified to DCAE call)
*
* @return The DcaeInventoryResponse object containing the dcae values
*/
@@ -236,8 +237,7 @@ public class CsarInstallerImpl implements CsarInstaller {
"{\"global\":[{\"name\":\"service\",\"value\":[\"" + blueprintArtifact.getDcaeBlueprint() + "\"]}]}");
template
.setImageText(IOUtils.toString(appContext.getResource(configFiles.getSvgXmlFilePath()).getInputStream()));
- template.setName(TEMPLATE_NAME_PREFIX
- + buildModelName(csar, blueprintArtifact.getResourceAttached().getResourceInstanceName()));
+ template.setName(TEMPLATE_NAME_PREFIX + buildModelName(csar, blueprintArtifact));
template.save(cldsDao, null);
logger.info("Fake Clds Template created for blueprint " + blueprintArtifact.getBlueprintArtifactName()
+ " with name " + template.getName());
@@ -246,14 +246,14 @@ public class CsarInstallerImpl implements CsarInstaller {
private CldsModel createFakeCldsModel(CsarHandler csar, BlueprintArtifact blueprintArtifact,
CldsTemplate cldsTemplate, DcaeInventoryResponse dcaeInventoryResponse) throws SdcArtifactInstallerException {
-
+
if (dcaeInventoryResponse == null) {
throw new SdcArtifactInstallerException(
"DCAE inventory response is NULL, query to DCAE fail to be answered properly, this is required to deploy CSAR properly !!!");
}
try {
CldsModel cldsModel = new CldsModel();
- cldsModel.setName(buildModelName(csar, blueprintArtifact.getResourceAttached().getResourceInstanceName()));
+ cldsModel.setName(buildModelName(csar, blueprintArtifact));
cldsModel.setBlueprintText(blueprintArtifact.getDcaeBlueprint());
cldsModel.setTemplateName(cldsTemplate.getName());
cldsModel.setTemplateId(cldsTemplate.getId());
diff --git a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
index 276f50910..2c24dcb5c 100644
--- a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
@@ -69,8 +69,8 @@ public class CsarInstallerItCase {
private static final String INVARIANT_SERVICE_UUID = "4cc5b45a-1f63-4194-8100-cd8e14248c92";
private static final String INVARIANT_RESOURCE1_UUID = "07e266fc-49ab-4cd7-8378-ca4676f1b9ec";
private static final String INVARIANT_RESOURCE2_UUID = "023a3f0d-1161-45ff-b4cf-8918a8ccf3ad";
- private static final String INSTANCE_NAME_RESOURCE1 = "ResourceInstanceName1";
- private static final String INSTANCE_NAME_RESOURCE2 = "ResourceInstanceName2";
+ private static final String RESOURCE_INSTANCE_NAME_RESOURCE1 = "ResourceInstanceName1";
+ private static final String RESOURCE_INSTANCE_NAME_RESOURCE2 = "ResourceInstanceName2";
@Autowired
private CsarInstaller csarInstaller;
@Autowired
@@ -92,14 +92,14 @@ public class CsarInstallerItCase {
}
private BlueprintArtifact buildFakeBuildprintArtifact(String instanceName, String invariantResourceUuid,
- String blueprintFilePath, String csarArtifactName, String invariantServiceUuid) throws IOException {
+ String blueprintFilePath, String artifactName, String invariantServiceUuid) throws IOException {
IResourceInstance resource = Mockito.mock(IResourceInstance.class);
Mockito.when(resource.getResourceInstanceName()).thenReturn(instanceName);
Mockito.when(resource.getResourceInvariantUUID()).thenReturn(invariantResourceUuid);
BlueprintArtifact blueprintArtifact = Mockito.mock(BlueprintArtifact.class);
Mockito.when(blueprintArtifact.getDcaeBlueprint())
.thenReturn(ResourceFileUtil.getResourceAsString(blueprintFilePath));
- Mockito.when(blueprintArtifact.getBlueprintArtifactName()).thenReturn(csarArtifactName);
+ Mockito.when(blueprintArtifact.getBlueprintArtifactName()).thenReturn(artifactName);
Mockito.when(blueprintArtifact.getBlueprintInvariantServiceUuid()).thenReturn(invariantServiceUuid);
Mockito.when(blueprintArtifact.getResourceAttached()).thenReturn(resource);
return blueprintArtifact;
@@ -115,17 +115,23 @@ public class CsarInstallerItCase {
Mockito.when(notificationData.getResources()).thenReturn(listResources);
Map<String, BlueprintArtifact> blueprintMap = new HashMap<>();
Mockito.when(csarHandler.getMapOfBlueprints()).thenReturn(blueprintMap);
- // Create fake blueprint artifact 1
- BlueprintArtifact blueprintArtifact = buildFakeBuildprintArtifact(INSTANCE_NAME_RESOURCE1,
- INVARIANT_RESOURCE1_UUID, "example/sdc/blueprint-dcae/tca.yaml", CSAR_ARTIFACT_NAME,
- INVARIANT_SERVICE_UUID);
+ // Create fake blueprint artifact 1 on resource1
+ BlueprintArtifact blueprintArtifact = buildFakeBuildprintArtifact(RESOURCE_INSTANCE_NAME_RESOURCE1,
+ INVARIANT_RESOURCE1_UUID, "example/sdc/blueprint-dcae/tca.yaml", "tca.yaml", INVARIANT_SERVICE_UUID);
listResources.add(blueprintArtifact.getResourceAttached());
- blueprintMap.put(blueprintArtifact.getResourceAttached().getResourceInstanceName(), blueprintArtifact);
- // Create fake blueprint artifact 2
- blueprintArtifact = buildFakeBuildprintArtifact(INSTANCE_NAME_RESOURCE2, INVARIANT_RESOURCE2_UUID,
- "example/sdc/blueprint-dcae/tca_2.yaml", CSAR_ARTIFACT_NAME, INVARIANT_SERVICE_UUID);
+ blueprintMap.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact);
+ // Create fake blueprint artifact 2 on resource2
+ blueprintArtifact = buildFakeBuildprintArtifact(RESOURCE_INSTANCE_NAME_RESOURCE2, INVARIANT_RESOURCE2_UUID,
+ "example/sdc/blueprint-dcae/tca_2.yaml", "tca_2.yaml", INVARIANT_SERVICE_UUID);
listResources.add(blueprintArtifact.getResourceAttached());
- blueprintMap.put(blueprintArtifact.getResourceAttached().getResourceInstanceName(), blueprintArtifact);
+ blueprintMap.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact);
+
+ // Create fake blueprint artifact 3 on resource 1 so that it's possible to
+ // test multiple CL deployment per Service/vnf
+ blueprintArtifact = buildFakeBuildprintArtifact(RESOURCE_INSTANCE_NAME_RESOURCE1, INVARIANT_RESOURCE1_UUID,
+ "example/sdc/blueprint-dcae/tca_3.yaml", "tca_3.yaml", INVARIANT_SERVICE_UUID);
+ blueprintMap.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact);
+
// Build fake csarhandler
Mockito.when(csarHandler.getSdcNotification()).thenReturn(notificationData);
// Build fake csar Helper
@@ -153,40 +159,45 @@ public class CsarInstallerItCase {
String generatedName = RandomStringUtils.randomAlphanumeric(5);
CsarHandler csar = buildFakeCsarHandler(generatedName);
csarInstaller.installTheCsar(csar);
- CldsModel cldsModel1 = verifyClosedLoopModelLoadedInDb(csar, generatedName, INSTANCE_NAME_RESOURCE1);
+ CldsModel cldsModel1 = verifyClosedLoopModelLoadedInDb(csar, "tca.yaml");
JSONAssert.assertEquals(
IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca.json")),
cldsModel1.getPropText(), true);
- CldsModel cldsModel2 = verifyClosedLoopModelLoadedInDb(csar, generatedName, INSTANCE_NAME_RESOURCE2);
+ CldsModel cldsModel2 = verifyClosedLoopModelLoadedInDb(csar, "tca_2.yaml");
JSONAssert.assertEquals(
IOUtils
.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca-2.json")),
cldsModel2.getPropText(), true);
+ CldsModel cldsModel3 = verifyClosedLoopModelLoadedInDb(csar, "tca_3.yaml");
+ JSONAssert.assertEquals(
+ IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca.json")),
+ cldsModel3.getPropText(), true);
}
- private CldsModel verifyClosedLoopModelLoadedInDb(CsarHandler csar, String generatedName,
- String instanceNameResource) throws SdcArtifactInstallerException {
+ private CldsModel verifyClosedLoopModelLoadedInDb(CsarHandler csar, String artifactName)
+ throws SdcArtifactInstallerException {
+
// Get the template back from DB
- CldsTemplate templateFromDb = CldsTemplate.retrieve(cldsDao,
- CsarInstallerImpl.TEMPLATE_NAME_PREFIX + CsarInstallerImpl.buildModelName(csar, instanceNameResource),
- false);
+ CldsTemplate templateFromDb = CldsTemplate.retrieve(cldsDao, CsarInstallerImpl.TEMPLATE_NAME_PREFIX
+ + CsarInstallerImpl.buildModelName(csar, csar.getMapOfBlueprints().get(artifactName)), false);
assertNotNull(templateFromDb);
assertNotNull(templateFromDb.getBpmnText());
assertNotNull(templateFromDb.getImageText());
assertNotNull(templateFromDb.getPropText());
assertTrue(templateFromDb.getPropText().contains("global")
&& templateFromDb.getPropText().contains("node_templates:"));
- assertEquals(templateFromDb.getName(),
- CsarInstallerImpl.TEMPLATE_NAME_PREFIX + CsarInstallerImpl.buildModelName(csar, instanceNameResource));
+ assertEquals(templateFromDb.getName(), CsarInstallerImpl.TEMPLATE_NAME_PREFIX
+ + CsarInstallerImpl.buildModelName(csar, csar.getMapOfBlueprints().get(artifactName)));
// Get the Model back from DB
CldsModel modelFromDb = CldsModel.retrieve(cldsDao,
- CsarInstallerImpl.buildModelName(csar, instanceNameResource), true);
+ CsarInstallerImpl.buildModelName(csar, csar.getMapOfBlueprints().get(artifactName)), true);
assertNotNull(modelFromDb);
assertNotNull(modelFromDb.getBpmnText());
assertNotNull(modelFromDb.getImageText());
assertNotNull(modelFromDb.getPropText());
assertTrue(modelFromDb.getPropText().contains("policy_id"));
- assertEquals(CsarInstallerImpl.buildModelName(csar, instanceNameResource), modelFromDb.getName());
+ assertEquals(CsarInstallerImpl.buildModelName(csar, csar.getMapOfBlueprints().get(artifactName)),
+ modelFromDb.getName());
assertEquals(CsarInstallerImpl.CONTROL_NAME_PREFIX, modelFromDb.getControlNamePrefix());
return modelFromDb;
}
diff --git a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
index 725b1ff1c..bb4fd01f2 100644
--- a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
+++ b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
@@ -57,6 +57,7 @@ public class CsarHandlerTest {
private static final String RESOURCE1_INSTANCE_NAME = "sim-1802 0";
private static final String RESOURCE1_INSTANCE_NAME_IN_CSAR = "sim18020";
private static final String BLUEPRINT1_NAME = "FOI.Simfoimap223S0112.event_proc_bp.yaml";
+ private static final String BLUEPRINT2_NAME = "FOI.Simfoimap223S0112.event_proc_bp2.yaml";
@Test
public void testConstructor() throws CsarHandlerException {
@@ -124,20 +125,26 @@ public class CsarHandlerTest {
assertEquals(CSAR_ARTIFACT_NAME, csar.getArtifactElement().getArtifactName());
assertNotNull(csar.getSdcCsarHelper());
// Test dcaeBlueprint
- String blueprint = csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getDcaeBlueprint();
+ String blueprint = csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getDcaeBlueprint();
assertNotNull(blueprint);
assertTrue(!blueprint.isEmpty());
assertTrue(blueprint.contains("DCAE-VES-PM-EVENT-v1"));
// Test additional properties from Sdc notif
- assertEquals(BLUEPRINT1_NAME,
- csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getBlueprintArtifactName());
+ assertEquals(BLUEPRINT1_NAME, csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getBlueprintArtifactName());
assertEquals(RESOURCE1_UUID,
- csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getResourceAttached().getResourceInvariantUUID());
- assertEquals(SERVICE_UUID,
- csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getBlueprintInvariantServiceUuid());
+ csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getResourceAttached().getResourceInvariantUUID());
+ assertEquals(SERVICE_UUID, csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getBlueprintInvariantServiceUuid());
+
+ // Just check the second one is there as well
+ assertEquals(BLUEPRINT2_NAME, csar.getMapOfBlueprints().get(BLUEPRINT2_NAME).getBlueprintArtifactName());
+ blueprint = csar.getMapOfBlueprints().get(BLUEPRINT2_NAME).getDcaeBlueprint();
+ assertNotNull(blueprint);
+ assertTrue(!blueprint.isEmpty());
+ assertTrue(blueprint.contains("DCAE-VES-PM-EVENT-v1"));
// Do some cleanup
Path path = Paths.get(SDC_FOLDER + "/test-controller/" + CSAR_ARTIFACT_NAME);
Files.deleteIfExists(path);
+
}
@Test
@@ -150,17 +157,15 @@ public class CsarHandlerTest {
assertEquals(CSAR_ARTIFACT_NAME, csar.getArtifactElement().getArtifactName());
assertNotNull(csar.getSdcCsarHelper());
// Test dcaeBlueprint
- String blueprint = csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getDcaeBlueprint();
+ String blueprint = csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getDcaeBlueprint();
assertNotNull(blueprint);
assertTrue(!blueprint.isEmpty());
assertTrue(blueprint.contains("DCAE-VES-PM-EVENT-v1"));
// Test additional properties from Sdc notif
- assertEquals(BLUEPRINT1_NAME,
- csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getBlueprintArtifactName());
+ assertEquals(BLUEPRINT1_NAME, csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getBlueprintArtifactName());
assertEquals(RESOURCE1_UUID,
- csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getResourceAttached().getResourceInvariantUUID());
- assertEquals(SERVICE_UUID,
- csar.getMapOfBlueprints().get(RESOURCE1_INSTANCE_NAME).getBlueprintInvariantServiceUuid());
+ csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getResourceAttached().getResourceInvariantUUID());
+ assertEquals(SERVICE_UUID, csar.getMapOfBlueprints().get(BLUEPRINT1_NAME).getBlueprintInvariantServiceUuid());
Path path = Paths.get(SDC_FOLDER + "/test-controller/" + CSAR_ARTIFACT_NAME);
// A double save should simply overwrite the existing
csar.save(buildFakeSdcResut());
diff --git a/src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml b/src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml
new file mode 100644
index 000000000..0ab831712
--- /dev/null
+++ b/src/test/resources/example/sdc/blueprint-dcae/tca_3.yaml
@@ -0,0 +1,104 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/docker/2.2.0/node-type.yaml
+- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/relationship/1.0.0/node-type.yaml
+- http://onap.org:8081/repository/solutioning01-mte2-raw/type_files/dmaap/dmaap_mr.yaml
+inputs:
+ location_id:
+ type: string
+ service_id:
+ type: string
+ policy_id:
+ type: string
+node_templates:
+ policy_0:
+ type: dcae.nodes.policy
+ properties:
+ policy_id:
+ get_input: policy_id
+ cdap_host_host:
+ type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure
+ properties:
+ location_id:
+ get_input: location_id
+ scn_override: cdap_broker.solutioning-central.dcae.onap.org
+ interfaces:
+ cloudify.interfaces.lifecycle: {
+ }
+ tca_tca:
+ type: dcae.nodes.MicroService.cdap
+ properties:
+ app_config:
+ appDescription: DCAE Analytics Threshold Crossing Alert Application
+ appName: dcae-tca
+ tcaSubscriberOutputStreamName: TCASubscriberOutputStream
+ tcaVESAlertsTableName: TCAVESAlertsTable
+ tcaVESAlertsTableTTLSeconds: '1728000'
+ tcaVESMessageStatusTableName: TCAVESMessageStatusTable
+ tcaVESMessageStatusTableTTLSeconds: '86400'
+ thresholdCalculatorFlowletInstances: '2'
+ app_preferences:
+ publisherContentType: application/json
+ publisherHostName: mrlocal-mtnjftle01.onap.org
+ publisherHostPort: '3905'
+ publisherMaxBatchSize: '10'
+ publisherMaxRecoveryQueueSize: '100000'
+ publisherPollingInterval: '20000'
+ publisherProtocol: https
+ publisherTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub
+ publisherUserName: test@tca.af.dcae.onap.org
+ publisherUserPassword: password
+ subscriberConsumerGroup: OpenDCAE-c12
+ subscriberConsumerId: c12
+ subscriberContentType: application/json
+ subscriberHostName: mrlocal-mtnjftle01.onap.org
+ subscriberHostPort: '3905'
+ subscriberMessageLimit: '-1'
+ subscriberPollingInterval: '20000'
+ subscriberProtocol: https
+ subscriberTimeoutMS: '-1'
+ subscriberTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub
+ subscriberUserName: test@tca.af.dcae.onap.org
+ subscriberUserPassword: password
+ tca_policy: null
+ artifact_name: dcae-analytics-tca
+ artifact_version: 1.0.0
+ connections:
+ streams_publishes: [
+ ]
+ streams_subscribes: [
+ ]
+ jar_url: http://somejar
+ location_id:
+ get_input: location_id
+ namespace: cdap_tca_hi_lo
+ programs:
+ - program_id: TCAVESCollectorFlow
+ program_type: flows
+ - program_id: TCADMaaPMRSubscriberWorker
+ program_type: workers
+ - program_id: TCADMaaPMRPublisherWorker
+ program_type: workers
+ service_component_type: cdap_app_tca
+ service_id:
+ get_input: service_id
+ streamname: TCASubscriberOutputStream
+ relationships:
+ - target: topic0
+ type: dcae.relationships.subscribe_to_events
+ - target: topic1
+ type: dcae.relationships.publish_events
+ - target: cdap_host_host
+ type: dcae.relationships.component_contained_in
+ - target: policy_0
+ type: dcae.relationships.depends_on
+ topic0:
+ type: dcae.nodes.Topic
+ properties:
+ topic_name: ''
+ topic1:
+ type: dcae.nodes.Topic
+ properties:
+ topic_name: ''
+
diff --git a/src/test/resources/example/sdc/service-Simsfoimap0112.csar b/src/test/resources/example/sdc/service-Simsfoimap0112.csar
index fac487cec..ea0e44a22 100644
--- a/src/test/resources/example/sdc/service-Simsfoimap0112.csar
+++ b/src/test/resources/example/sdc/service-Simsfoimap0112.csar
Binary files differ