diff options
author | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-04-18 17:53:21 +0200 |
---|---|---|
committer | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-04-18 17:53:21 +0200 |
commit | f79bc3eee77fedfa4f42b49f722418f50ade88b5 (patch) | |
tree | f434d772fee487059f23a3466aae044f0239e38c /src | |
parent | d39df764cb90d28ddfd6787c953062e19fc6ec3a (diff) |
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) <sd378r@intl.att.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java | 8 |
1 files 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 2d94bc36..10a7cd55 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<String, BlueprintParserFilesConfiguration> 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()); |