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>
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-";
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";
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.
*/
/**
* The file name that will be loaded by Spring.
*/
}
public static String buildModelName(CsarHandler csar) {
}
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('.', '_');
}
+ csar.getSdcNotification().getServiceVersion().replace('.', '_');
}
// It's a filter must add a specific prefix
cldsModel.setControlNamePrefix(policyName);
} else {
// 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());
}
cldsModel.setName(buildModelName(csar));
cldsModel.setBlueprintText(blueprintArtifact.getDcaeBlueprint());