From f79bc3eee77fedfa4f42b49f722418f50ade88b5 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Wed, 18 Apr 2018 17:53:21 +0200 Subject: Add Prefix to ModelName Add a "CLAMP" prefix to model name as this is used by clamp to generate the policy Scope. This prefix will be used by DCAE to filter clamp policies Issue-ID: CLAMP-153 Change-Id: I0c2e7e064df1be0de3c7e12d6e853956a70bbe64 Signed-off-by: Determe, Sebastien (sd378r) --- .../clamp/clds/sdc/controller/installer/CsarInstallerImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 2d94bc369..10a7cd556 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 @@ -62,8 +62,10 @@ public class CsarInstallerImpl implements CsarInstaller { private static final EELFLogger logger = EELFManager.getInstance().getLogger(CsarInstallerImpl.class); private Map bpmnMapping = new HashMap<>(); public static final String TEMPLATE_NAME_PREFIX = "DCAE-Designer-ClosedLoopTemplate-"; - public static final String MODEL_NAME_PREFIX = "ClosedLoop-"; + public static final String CONTROL_NAME_PREFIX = "ClosedLoop-"; public static final String GET_INPUT_BLUEPRINT_PARAM = "get_input"; + // This will be used later as the policy scope + public static final String MODEL_NAME_PREFIX = "CLAMP"; /** * The file name that will be loaded by Spring. */ @@ -93,7 +95,7 @@ public class CsarInstallerImpl implements CsarInstaller { } public static String buildModelName(CsarHandler csar) { - return csar.getSdcCsarHelper().getServiceMetadata().getValue("name") + "_v" + return MODEL_NAME_PREFIX + csar.getSdcCsarHelper().getServiceMetadata().getValue("name") + "_v" + csar.getSdcNotification().getServiceVersion().replace('.', '_'); } @@ -201,7 +203,7 @@ public class CsarInstallerImpl implements CsarInstaller { // It's a filter must add a specific prefix cldsModel.setControlNamePrefix(policyName); } else { - cldsModel.setControlNamePrefix(MODEL_NAME_PREFIX); + cldsModel.setControlNamePrefix(CONTROL_NAME_PREFIX); } cldsModel.setName(buildModelName(csar)); cldsModel.setBlueprintText(blueprintArtifact.getDcaeBlueprint()); -- cgit 1.2.3-korg