- String microServiceName = ((MicroServicePolicy) loop.getMicroServicePolicies().toArray()[0]).getName();
- // Add index to the microservice name from the 2nd blueprint artifact for now.
- // Update the microservice names, when able to link the microserivce <->
- // blueprint in the future
- int index = 0;
- for (BlueprintArtifact blueprintArtifact : blueprintArtifactList) {
- if (index > 0) {
- deploymentParamMap.put(microServiceName + index,
- generateDcaeDeployParameter(blueprintArtifact, microServiceName));
- } else {
- deploymentParamMap.put(microServiceName,
- generateDcaeDeployParameter(blueprintArtifact, microServiceName));
- }
- index++;
+ Set<MicroServicePolicy> microServiceList = loop.getMicroServicePolicies();
+
+ for (MicroServicePolicy microService : microServiceList) {
+ deploymentParamMap.put(microService.getName(),
+ generateDcaeDeployParameter(microService));