Remove the clds-reference.properties 77/34077/1
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Mon, 5 Mar 2018 15:03:25 +0000 (16:03 +0100)
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Mon, 5 Mar 2018 15:03:25 +0000 (16:03 +0100)
Remove clds-reference.properties and merge it into
application.properties

Issue-ID: CLAMP-136
Change-Id: I8dc6deffdca47dc50d1473ccbe9a94dc91d7d5d9
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
26 files changed:
extra/docker/clamp/clamp.env
src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java
src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
src/main/java/org/onap/clamp/clds/client/SdcSendReqDelegate.java
src/main/java/org/onap/clamp/clds/client/TcaPolicyDelegate.java
src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java
src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java
src/main/java/org/onap/clamp/clds/client/req/sdc/SdcRequests.java
src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
src/main/java/org/onap/clamp/clds/config/ClampProperties.java [moved from src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java with 85% similarity]
src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java
src/main/java/org/onap/clamp/clds/service/CldsService.java
src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java
src/main/resources/application.properties
src/main/resources/clds/clds-reference.properties [deleted file]
src/test/java/org/onap/clamp/clds/it/OperationPolicyReqItCase.java
src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java
src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
src/test/java/org/onap/clamp/clds/it/TcaRequestFormatterItCase.java
src/test/java/org/onap/clamp/clds/it/config/CldsReferencePropertiesItCase.java
src/test/resources/application.properties [new file with mode: 0644]
src/test/resources/clds/clds-reference.properties [deleted file]
src/test/resources/https/https-test.properties

index 7beb4fe..8c4375b 100644 (file)
@@ -1,2 +1,2 @@
 ### Be careful, this must be in one line only ###
-SPRING_APPLICATION_JSON={"spring.datasource.cldsdb.url":"jdbc:mariadb:sequential://db:3306/cldsdb4?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3","org.onap.clamp.config.files.cldsPolicyConfig":"classpath:/clds/clds-policy-config.properties","org.onap.clamp.config.files.cldsReference":"classpath:/clds/clds-reference.properties","org.onap.clamp.config.files.sdcController":"classpath:/clds/sdc-controllers-config.json"}
\ No newline at end of file
+SPRING_APPLICATION_JSON={"spring.datasource.cldsdb.url":"jdbc:mariadb:sequential://db:3306/cldsdb4?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3","org.onap.clamp.config.files.cldsPolicyConfig":"classpath:/clds/clds-policy-config.properties","org.onap.clamp.config.files.sdcController":"classpath:/clds/sdc-controllers-config.json"}
\ No newline at end of file
index f924058..9226604 100644 (file)
@@ -31,7 +31,7 @@ import java.util.Date;
 \r
 import org.json.simple.JSONObject;\r
 import org.json.simple.parser.JSONParser;\r
-import org.onap.clamp.clds.config.CldsReferenceProperties;\r
+import org.onap.clamp.clds.config.ClampProperties;\r
 import org.onap.clamp.clds.exception.dcae.DcaeDeploymentException;\r
 import org.onap.clamp.clds.util.LoggingUtils;\r
 import org.springframework.beans.factory.annotation.Autowired;\r
@@ -47,7 +47,7 @@ public class DcaeDispatcherServices {
     protected static final EELFLogger logger = EELFManager.getInstance().getLogger(DcaeDispatcherServices.class);\r
     protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();\r
     @Autowired\r
-    private CldsReferenceProperties refProp;\r
+    private ClampProperties refProp;\r
     private static final String STATUS_URL_LOG = "Status URL extracted: ";\r
     private static final String DCAE_URL_PREFIX = "/dcae-deployments/";\r
     private static final String DCAE_URL_PROPERTY_NAME = "dcae.dispatcher.url";\r
index 4a2f32e..c4abebd 100644 (file)
@@ -41,7 +41,7 @@ import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;\r
 import org.json.simple.parser.JSONParser;\r
 import org.json.simple.parser.ParseException;\r
-import org.onap.clamp.clds.config.CldsReferenceProperties;\r
+import org.onap.clamp.clds.config.ClampProperties;\r
 import org.onap.clamp.clds.dao.CldsDao;\r
 import org.onap.clamp.clds.model.CldsEvent;\r
 import org.onap.clamp.clds.model.CldsModel;\r
@@ -63,7 +63,7 @@ public class DcaeInventoryServices {
     protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();\r
     private static final String DCAE_INVENTORY_URL = "dcae.inventory.url";\r
     @Autowired\r
-    private CldsReferenceProperties refProp;\r
+    private ClampProperties refProp;\r
     @Autowired\r
     private CldsDao cldsDao;\r
 \r
index 4e165e1..37259cd 100644 (file)
@@ -31,7 +31,7 @@ import java.util.UUID;
 import org.apache.camel.Exchange;
 import org.apache.camel.Handler;
 import org.onap.clamp.clds.client.req.policy.PolicyClient;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.properties.Holmes;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -48,7 +48,7 @@ public class HolmesPolicyDelegate {
     @Autowired
     private PolicyClient policyClient;
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
 
     /**
      * Perform activity. Send Holmes info to policy api.
index ec83db9..ae28805 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Handler;
 import org.onap.clamp.clds.client.req.policy.OperationalPolicyReq;
 import org.onap.clamp.clds.client.req.policy.PolicyClient;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.Policy;
 import org.onap.clamp.clds.model.properties.PolicyChain;
@@ -61,7 +61,7 @@ public class OperationalPolicyDelegate {
      * Automatically injected by Spring, define in CldsConfiguration as a bean.
      */
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
 
     /**
      * Perform activity. Send Operational Policy info to policy api.
index 438ea47..64e19f9 100644 (file)
@@ -35,7 +35,7 @@ import org.apache.camel.Handler;
 import org.apache.commons.codec.DecoderException;
 import org.onap.clamp.clds.client.req.sdc.SdcCatalogServices;
 import org.onap.clamp.clds.client.req.sdc.SdcRequests;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.DcaeEvent;
 import org.onap.clamp.clds.model.properties.Global;
 import org.onap.clamp.clds.model.properties.ModelProperties;
@@ -55,7 +55,7 @@ public class SdcSendReqDelegate {
     @Autowired
     private SdcRequests sdcReq;
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
 
     /**
      * Perform activity. Send to sdc proxy.
index 55fe2c5..e16e8c3 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Handler;
 import org.onap.clamp.clds.client.req.policy.PolicyClient;
 import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.Tca;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -47,7 +47,7 @@ public class TcaPolicyDelegate {
     protected static final EELFLogger logger = EELFManager.getInstance().getLogger(TcaPolicyDelegate.class);
     protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
     @Autowired
     private PolicyClient policyClient;
 
index 434da4b..d3e8a54 100644 (file)
@@ -39,7 +39,7 @@ import java.util.Map;
 
 import javax.ws.rs.BadRequestException;
 
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.properties.Global;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.PolicyChain;
@@ -80,7 +80,7 @@ public class OperationalPolicyReq {
      * @throws BuilderException
      * @throws UnsupportedEncodingException
      */
-    public static Map<AttributeType, Map<String, String>> formatAttributes(CldsReferenceProperties refProp, ModelProperties prop,
+    public static Map<AttributeType, Map<String, String>> formatAttributes(ClampProperties refProp, ModelProperties prop,
             String modelElementId, PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
         Global global = prop.getGlobal();
         prop.setCurrentModelElementId(modelElementId);
@@ -163,7 +163,7 @@ public class OperationalPolicyReq {
      * @throws BuilderException
      * @throws UnsupportedEncodingException
      */
-    protected static String formatOpenLoopYaml(CldsReferenceProperties refProp, ModelProperties prop, String modelElementId,
+    protected static String formatOpenLoopYaml(ClampProperties refProp, ModelProperties prop, String modelElementId,
             PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
         // get property objects
         Global global = prop.getGlobal();
@@ -193,7 +193,7 @@ public class OperationalPolicyReq {
      * @throws BuilderException
      * @throws UnsupportedEncodingException
      */
-    protected static String formatYaml(CldsReferenceProperties refProp, ModelProperties prop, String modelElementId,
+    protected static String formatYaml(ClampProperties refProp, ModelProperties prop, String modelElementId,
             PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
         // get property objects
         Global global = prop.getGlobal();
@@ -251,7 +251,7 @@ public class OperationalPolicyReq {
      * @throws BuilderException
      * @throws UnsupportedEncodingException
      */
-    protected static String formateNodeBYaml(CldsReferenceProperties refProp, ModelProperties prop, String modelElementId,
+    protected static String formateNodeBYaml(ClampProperties refProp, ModelProperties prop, String modelElementId,
             PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
         // get property objects
         Global global = prop.getGlobal();
@@ -329,7 +329,7 @@ public class OperationalPolicyReq {
      * @param inOrigList
      * @return
      */
-    private static List<PolicyItem> addAOTSActorRecipe(CldsReferenceProperties refProp, String service, List<PolicyItem> inOrigList) {
+    private static List<PolicyItem> addAOTSActorRecipe(ClampProperties refProp, String service, List<PolicyItem> inOrigList) {
         List<PolicyItem> outList = new ArrayList<>();
         try {
             PolicyItem policyItem = inOrigList.get(0);
index 06eff4e..5160d04 100644 (file)
@@ -37,7 +37,7 @@ import java.util.UUID;
 
 import javax.ws.rs.BadRequestException;
 
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.exception.policy.PolicyClientException;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.util.LoggingUtils;
@@ -76,7 +76,7 @@ public class PolicyClient {
     @Autowired
     protected ApplicationContext appContext;
     @Autowired
-    protected CldsReferenceProperties refProp;
+    protected ClampProperties refProp;
 
     /**
      * Perform BRMS policy type.
index c01fe6a..5664653 100644 (file)
@@ -58,7 +58,7 @@ import org.apache.commons.csv.CSVRecord;
 import org.apache.commons.io.IOUtils;\r
 import org.apache.commons.lang3.StringUtils;\r
 import org.apache.http.HttpHeaders;\r
-import org.onap.clamp.clds.config.CldsReferenceProperties;\r
+import org.onap.clamp.clds.config.ClampProperties;\r
 import org.onap.clamp.clds.exception.sdc.SdcCommunicationException;\r
 import org.onap.clamp.clds.model.CldsAlarmCondition;\r
 import org.onap.clamp.clds.model.CldsServiceData;\r
@@ -93,7 +93,7 @@ public class SdcCatalogServices {
     private static final String SDC_INSTANCE_ID_CLAMP = "CLAMP-Tool";\r
     private static final String RESOURCE_URL_PREFIX = "resources";\r
     @Autowired\r
-    private CldsReferenceProperties refProp;\r
+    private ClampProperties refProp;\r
 \r
     /**\r
      * Return SDC id and pw as a HTTP Basic Auth string (for example: Basic\r
index 214933d..e34b7e9 100644 (file)
@@ -41,7 +41,7 @@ import java.util.Map.Entry;
 
 import org.apache.commons.codec.DecoderException;
 import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.properties.Global;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.Tca;
@@ -61,7 +61,7 @@ public class SdcRequests {
     @Autowired
     private SdcCatalogServices sdcCatalogServices;
     @Autowired
-    protected CldsReferenceProperties refProp;
+    protected ClampProperties refProp;
 
     /**
      * Format the Blueprint from a Yaml
index 73355a7..f514691 100644 (file)
@@ -32,7 +32,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import java.io.IOException;
 import java.util.Map;
 
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.exception.TcaRequestFormatterException;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.Tca;
@@ -64,7 +64,7 @@ public class TcaRequestFormatter {
      *            The Model Prop created from BPMN JSON and BPMN properties JSON
      * @return The Json string containing that should be sent to policy
      */
-    public static String createPolicyJson(CldsReferenceProperties refProp, ModelProperties modelProperties) {
+    public static String createPolicyJson(ClampProperties refProp, ModelProperties modelProperties) {
         try {
             String service = modelProperties.getGlobal().getService();
             Tca tca = modelProperties.getType(Tca.class);
@@ -103,7 +103,7 @@ public class TcaRequestFormatter {
      *            modelProperties.setCurrentModelElementId will be used
      * @return The Json node containing what should be sent to policy
      */
-    public static JsonNode createPolicyContent(CldsReferenceProperties refProp, ModelProperties modelProperties, String service,
+    public static JsonNode createPolicyContent(ClampProperties refProp, ModelProperties modelProperties, String service,
             String policyName, Tca tca) {
         try {
             String serviceToUse = service;
@@ -153,7 +153,7 @@ public class TcaRequestFormatter {
      *            The Model Properties created from BPMN JSON and BPMN
      *            properties JSON
      */
-    private static void addThresholds(CldsReferenceProperties refProp, String service, ObjectNode appendToNode, TcaItem tcaItem,
+    private static void addThresholds(ClampProperties refProp, String service, ObjectNode appendToNode, TcaItem tcaItem,
             ModelProperties modelProperties) {
         ArrayNode tcaNodes = appendToNode.withArray("thresholds");
         ObjectNode tcaNode;
@@ -185,7 +185,7 @@ public class TcaRequestFormatter {
      *            The yaml string received from the UI
      * @return The updated YAML as a string
      */
-    public static String updatedBlueprintWithConfiguration(CldsReferenceProperties refProp, ModelProperties modelProperties,
+    public static String updatedBlueprintWithConfiguration(ClampProperties refProp, ModelProperties modelProperties,
             String yamlValue) {
         String jsonPolicy = ((ObjectNode) createPolicyContent(refProp, modelProperties, null, null, null)).toString();
         logger.info("Yaml that will be updated:" + yamlValue);
@@ -29,43 +29,24 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import java.io.IOException;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
-import java.util.Properties;
-
-import javax.annotation.PostConstruct;
 
 import org.apache.commons.io.IOUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationContext;
-import org.springframework.core.io.Resource;
+import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
 
 /**
- * Holds reference properties.
+ * Holds Clamp properties and add some functionalities.
  */
 @Component
-public class CldsReferenceProperties {
+public class ClampProperties {
 
     @Autowired
     private ApplicationContext appContext;
-    private Properties prop;
-    @Value("${org.onap.clamp.config.files.cldsReference:'classpath:/clds/clds-reference.properties'}")
-    private String cldsReferenceValuesFile;
-
-    @PostConstruct
-    public void loadConfiguration() throws IOException {
-        prop = new Properties();
-        Resource resource = appContext.getResource(cldsReferenceValuesFile);
-        prop.load(resource.getInputStream());
-    }
-
-    public CldsReferenceProperties(String referenceValuesFile) throws IOException {
-        cldsReferenceValuesFile = referenceValuesFile;
-        loadConfiguration();
-    }
-
-    public CldsReferenceProperties() {
-    }
+    @Autowired
+    private Environment env;
+    public static final String CONFIG_PREFIX = "clamp.config.";
 
     /**
      * get property value.
@@ -75,7 +56,7 @@ public class CldsReferenceProperties {
      * @return The string with the value
      */
     public String getStringValue(String key) {
-        return prop.getProperty(key);
+        return env.getProperty(CONFIG_PREFIX + key);
     }
 
     /**
index 12dc364..51bd695 100644 (file)
@@ -45,28 +45,22 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
  * This class is used to enable the HTTP authentication to login. It requires a
  * specific JSON file containing the user definition
  * (classpath:etc/config/clds/clds-users.json).
- *
  */
 @Configuration
 @EnableWebSecurity
 @Profile("clamp-spring-authentication")
 public class CldsSecurityConfigUsers extends WebSecurityConfigurerAdapter {
 
-    protected static final EELFLogger logger        = EELFManager.getInstance()
-            .getLogger(CldsSecurityConfigUsers.class);
+    protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsSecurityConfigUsers.class);
     protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
-
     @Autowired
-    private ApplicationContext        appContext;
-
+    private ApplicationContext appContext;
     @Value("${org.onap.clamp.config.files.cldsUsers:'classpath:etc/config/clds/clds-users.json'}")
-    private String                    cldsUsersFile;
-
-    @Value("${CLDS_PERMISSION_TYPE_CL:permission-type-cl}")
-    private String                    cldsPersmissionTypeCl;
-
+    private String cldsUsersFile;
+    @Value("${clamp.config.security.permission.type.cl:permission-type-cl}")
+    private String cldsPersmissionTypeCl;
     @Value("${CLDS_PERMISSION_INSTANCE:dev}")
-    private String                    cldsPermissionInstance;
+    private String cldsPermissionInstance;
 
     /**
      * This method configures on which URL the authorization will be enabled.
@@ -93,13 +87,11 @@ public class CldsSecurityConfigUsers extends WebSecurityConfigurerAdapter {
     public void configureGlobal(AuthenticationManagerBuilder auth) {
         try {
             CldsUser[] usersList = loadUsers();
-
             // no users defined
             if (null == usersList) {
                 logger.warn("No users defined. Users should be defined under " + cldsUsersFile);
                 return;
             }
-
             for (CldsUser user : usersList) {
                 auth.inMemoryAuthentication().withUser(user.getUser()).password(user.getPassword())
                         .roles(user.getPermissionsString());
index a9b1b77..3b6bc37 100644 (file)
@@ -62,7 +62,7 @@ import org.onap.clamp.clds.camel.CamelProxy;
 import org.onap.clamp.clds.client.DcaeDispatcherServices;
 import org.onap.clamp.clds.client.DcaeInventoryServices;
 import org.onap.clamp.clds.client.req.sdc.SdcCatalogServices;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.dao.CldsDao;
 import org.onap.clamp.clds.exception.CldsConfigException;
 import org.onap.clamp.clds.exception.policy.PolicyClientException;
@@ -105,17 +105,17 @@ public class CldsService extends SecureServiceBase {
     @Autowired
     private ApplicationContext appContext;
     private static final String RESOURCE_NAME = "clds-version.properties";
-    @Value("${CLDS_PERMISSION_TYPE_CL:permission-type-cl}")
+    @Value("${clamp.config.security.permission.type.cl:permission-type-cl}")
     private String cldsPersmissionTypeCl;
-    @Value("${CLDS_PERMISSION_TYPE_CL_MANAGE:permission-type-cl-manage}")
+    @Value("${clamp.config.security.permission.type.cl.manage:permission-type-cl-manage}")
     private String cldsPermissionTypeClManage;
-    @Value("${CLDS_PERMISSION_TYPE_CL_EVENT:permission-type-cl-event}")
+    @Value("${clamp.config.security.permission.type.cl.event:permission-type-cl-event}")
     private String cldsPermissionTypeClEvent;
-    @Value("${CLDS_PERMISSION_TYPE_FILTER_VF:permission-type-filter-vf}")
+    @Value("${clamp.config.security.permission.type.filter.vf:permission-type-filter-vf}")
     private String cldsPermissionTypeFilterVf;
-    @Value("${CLDS_PERMISSION_TYPE_TEMPLATE:permission-type-template}")
+    @Value("${clamp.config.security.permission.type.template:permission-type-template}")
     private String cldsPermissionTypeTemplate;
-    @Value("${CLDS_PERMISSION_INSTANCE:dev}")
+    @Value("${clamp.config.security.permission.instance:dev}")
     private String cldsPermissionInstance;
     private SecureServicePermission permissionReadCl;
     private SecureServicePermission permissionUpdateCl;
@@ -140,7 +140,7 @@ public class CldsService extends SecureServiceBase {
     @Autowired
     private XslTransformer cldsBpmnTransformer;
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
     @Autowired
     private SdcCatalogServices sdcCatalogServices;
     @Autowired
index e64f74b..1b03922 100644 (file)
@@ -55,9 +55,9 @@ import org.springframework.stereotype.Component;
 @Path("/cldsTempate")
 public class CldsTemplateService extends SecureServiceBase {
 
-    @Value("${CLDS_PERMISSION_TYPE_TEMPLATE:permission-type-template}")
+    @Value("${clamp.config.security.permission.type.template:permission-type-template}")
     private String cldsPermissionTypeTemplate;
-    @Value("${CLDS_PERMISSION_INSTANCE:dev}")
+    @Value("${clamp.config.security.permission.instance:dev}")
     private String cldsPermissionInstance;
     private SecureServicePermission permissionReadTemplate;
     private SecureServicePermission permissionUpdateTemplate;
index 2ac53e0..8c8b196 100644 (file)
@@ -106,17 +106,99 @@ async.core.pool.size=10
 async.max.pool.size=20\r
 async.queue.capacity=500\r
 \r
-org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.properties\r
 org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties\r
 org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json\r
 org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties\r
 org.onap.clamp.config.files.sdcController=classpath:/clds/sdc-controllers-config.json\r
 \r
+# Properties for Clamp\r
+# DCAE request build properties\r
+#\r
+clamp.config.dcae.template=classpath:/clds/templates/dcae-template.json\r
+clamp.config.dcae.decode.service_ids=classpath:/clds/templates/dcae-decode-service_ids.json\r
+clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-template.json\r
+#\r
+# SDC request blueprint properties\r
+#\r
+clamp.config.sdc.template=classpath:/clds/templates/sdc-template.json\r
+clamp.config.sdc.decode.service_ids=classpath:/clds/templates/sdc-decode-service_ids.json\r
+#\r
+#\r
+# General Policy request properties\r
+#\r
+clamp.config.policy.onap.name=DCAE\r
+clamp.config.policy.pdp.group=default\r
+clamp.config.policy.ms.type=MicroService\r
+clamp.config.policy.ms.policyNamePrefix=Config_MS_\r
+clamp.config.policy.op.type=BRMS_Param\r
+clamp.config.policy.op.policyNamePrefix=Config_BRMS_Param_\r
+\r
+# TCA MicroService Policy request build properties\r
+#\r
+clamp.config.tca.policyid.prefix=DCAE.Config_\r
+clamp.config.tca.policy.template=classpath:/clds/templates/tca-policy-template.json\r
+clamp.config.tca.template=classpath:/clds/templates/tca-template.json\r
+clamp.config.tca.thresholds.template=classpath:/clds/templates/tca-thresholds-template.json\r
+\r
+#\r
+#\r
+# Operational Policy request build properties\r
+#\r
+clamp.config.op.policyDescription=from clds\r
+# default\r
+clamp.config.op.templateName=ClosedLoopvUSP\r
+clamp.config.op.operationTopic=APPC-CL\r
+clamp.config.op.notificationTopic=POLICY-CL-MGT\r
+clamp.config.op.controller=amsterdam\r
+clamp.config.op.policy.appc=APPC\r
+# by service: vSCP\r
+clamp.config.op.templateName.vSCP=ClosedLoopTemplate\r
+clamp.config.op.controller.vSCP=1607-f5fw\r
+clamp.config.op.eNodeB.templateName=ClosedLoopControlName\r
+clamp.config.op.eNodeB.operationTopic=com.onap.sdnr.RanCLRequest-v00\r
+clamp.config.op.eNodeB.notificationTopic=com.onap-policy.IST-ENODEB-CL\r
+clamp.config.op.eNodeB.controller=amsterdam\r
+clamp.config.op.eNodeB.recipe=classpath:/clds/templates/op-eNodeB-recipe.json\r
+clamp.config.op.eNodeB.timeWindow=35\r
+clamp.config.op.eNodeB.limit=2\r
+clamp.config.op.eNodeB.period=10s\r
+#\r
+# Sdc service properties\r
+clamp.config.sdc.catalog.url=http://sdc.api.simpledemo.onap.org:8080/sdc/v1/catalog/\r
+clamp.config.sdc.hostUrl=http://sdc.api.simpledemo.onap.org:8080\r
+clamp.config.sdc.serviceUrl=http://sdc.api.simpledemo.onap.org:8080/sdc/v1/catalog/services\r
+clamp.config.sdc.serviceUsername=clamp\r
+clamp.config.sdc.servicePassword=b7acccda32b98c5bb7acccda32b98c5b05D511BD6D93626E90D18E9D24D9B78CD34C7EE8012F0A189A28763E82271E50A5D4EC10C7D93E06E0A2D27CAE66B981\r
+clamp.config.sdc.artifactLabel=blueprintclampcockpit\r
+clamp.config.sdc.sdcX-InstanceID=CLAMP\r
+clamp.config.sdc.artifactType=DCAE_INVENTORY_BLUEPRINT\r
+clamp.config.sdc.locationArtifactLabel=locationclampcockpit\r
+clamp.config.sdc.locationArtifactType=DCAE_INVENTORY_JSON\r
+clamp.config.sdc.InstanceID=X-ECOMP-InstanceID\r
+clamp.config.sdc.header.requestId = X-ECOMP-RequestID\r
+#\r
+#\r
+clamp.config.ui.location.default=classpath:/clds/templates/ui-location-default.json\r
+clamp.config.ui.alarm.default=classpath:/clds/templates/ui-alarm-default.json\r
+#\r
+# if action.test.override is true, then any action will be marked as test=true (even if incoming action request had test=false); otherwise, test flag will be unchanged on the action request\r
+clamp.config.action.test.override=false\r
+# if action.insert.test.event is true, then insert event even if the action is set to test\r
+clamp.config.action.insert.test.event=false\r
+clamp.config.clds.service.cache.invalidate.after.seconds=120\r
+\r
+#DCAE Inventory Url Properties\r
+clamp.config.dcae.inventory.url=http://dcae.api.simpledemo.onap.org:8080\r
+\r
+#DCAE Dispatcher Url Properties\r
+clamp.config.dcae.dispatcher.url=http://dcae.api.simpledemo.onap.org:8080\r
+clamp.config.dcae.header.requestId = X-ECOMP-RequestID\r
+\r
 #Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !\r
-CLDS_PERMISSION_TYPE_CL=permission-type-cl\r
-CLDS_PERMISSION_TYPE_CL_MANAGE=permission-type-cl-manage\r
-CLDS_PERMISSION_TYPE_CL_EVENT=permission-type-cl-event\r
-CLDS_PERMISSION_TYPE_FILTER_VF=permission-type-filter-vf\r
-CLDS_PERMISSION_TYPE_TEMPLATE=permission-type-template\r
+clamp.config.security.permission.type.cl=permission-type-cl\r
+clamp.config.security.permission.type.cl.manage=permission-type-cl-manage\r
+clamp.config.security.permission.type.cl.event=permission-type-cl-event\r
+clamp.config.security.permission.type.filter.vf=permission-type-filter-vf\r
+clamp.config.security.permission.type.template=permission-type-template\r
 #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties\r
-CLDS_PERMISSION_INSTANCE=dev
\ No newline at end of file
+clamp.config.security.permission.instance=dev
\ No newline at end of file
diff --git a/src/main/resources/clds/clds-reference.properties b/src/main/resources/clds/clds-reference.properties
deleted file mode 100644 (file)
index 3716a29..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-###\r
-# ============LICENSE_START=======================================================\r
-# ONAP CLAMP\r
-# ================================================================================\r
-# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights\r
-#                             reserved.\r
-# ================================================================================\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-# ============LICENSE_END============================================\r
-# ===================================================================\r
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
-###\r
-\r
-#\r
-# Poperties for CLDS\r
-#\r
-#\r
-# DCAE request build properties\r
-#\r
-dcae.template=classpath:/clds/templates/dcae-template.json\r
-dcae.decode.service_ids=classpath:/clds/templates/dcae-decode-service_ids.json\r
-dcae.deployment.template=classpath:/clds/templates/dcae-deployment-template.json\r
-#\r
-# SDC request blueprint properties\r
-#\r
-sdc.template=classpath:/clds/templates/sdc-template.json\r
-sdc.decode.service_ids=classpath:/clds/templates/sdc-decode-service_ids.json\r
-#\r
-#\r
-# General Policy request properties\r
-#\r
-policy.onap.name=DCAE\r
-policy.pdp.group=default\r
-policy.ms.type=MicroService\r
-policy.ms.policyNamePrefix=Config_MS_\r
-policy.op.type=BRMS_Param\r
-policy.op.policyNamePrefix=Config_BRMS_Param_\r
-\r
-# TCA MicroService Policy request build properties\r
-#\r
-tca.policyid.prefix=DCAE.Config_\r
-tca.policy.template=classpath:/clds/templates/tca-policy-template.json\r
-tca.template=classpath:/clds/templates/tca-template.json\r
-tca.thresholds.template=classpath:/clds/templates/tca-thresholds-template.json\r
-\r
-#\r
-#\r
-# Operational Policy request build properties\r
-#\r
-op.policyDescription=from clds\r
-# default\r
-op.templateName=ClosedLoopvUSP\r
-op.operationTopic=APPC-CL\r
-op.notificationTopic=POLICY-CL-MGT\r
-op.controller=amsterdam\r
-op.policy.appc=APPC\r
-# by service: vSCP\r
-op.templateName.vSCP=ClosedLoopTemplate\r
-op.controller.vSCP=1607-f5fw\r
-op.eNodeB.templateName=ClosedLoopControlName\r
-op.eNodeB.operationTopic=com.onap.sdnr.RanCLRequest-v00\r
-op.eNodeB.notificationTopic=com.onap-policy.IST-ENODEB-CL\r
-op.eNodeB.controller=amsterdam\r
-op.eNodeB.recipe=classpath:/clds/templates/op-eNodeB-recipe.json\r
-op.eNodeB.timeWindow=35\r
-op.eNodeB.limit=2\r
-op.eNodeB.period=10s\r
-#\r
-# Sdc service properties\r
-sdc.catalog.url=http://sdc.api.simpledemo.onap.org:8080/sdc/v1/catalog/
-sdc.hostUrl=http://sdc.api.simpledemo.onap.org:8080
-sdc.serviceUrl=http://sdc.api.simpledemo.onap.org:8080/sdc/v1/catalog/services
-sdc.serviceUsername=clamp\r
-sdc.servicePassword=b7acccda32b98c5bb7acccda32b98c5b05D511BD6D93626E90D18E9D24D9B78CD34C7EE8012F0A189A28763E82271E50A5D4EC10C7D93E06E0A2D27CAE66B981\r
-sdc.artifactLabel=blueprintclampcockpit\r
-sdc.sdcX-InstanceID=CLAMP\r
-sdc.artifactType=DCAE_INVENTORY_BLUEPRINT\r
-sdc.locationArtifactLabel=locationclampcockpit\r
-sdc.locationArtifactType=DCAE_INVENTORY_JSON\r
-sdc.InstanceID=X-ECOMP-InstanceID\r
-sdc.header.requestId = X-ECOMP-RequestID\r
-#\r
-#\r
-ui.location.default=classpath:/clds/templates/ui-location-default.json\r
-ui.alarm.default=classpath:/clds/templates/ui-alarm-default.json\r
-#\r
-# if action.test.override is true, then any action will be marked as test=true (even if incoming action request had test=false); otherwise, test flag will be unchanged on the action request\r
-action.test.override=false\r
-# if action.insert.test.event is true, then insert event even if the action is set to test\r
-action.insert.test.event=false\r
-clds.service.cache.invalidate.after.seconds=120\r
-\r
-#DCAE Inventory Url Properties\r
-dcae.inventory.url=http://dcae.api.simpledemo.onap.org:8080
-\r
-#DCAE Dispatcher Url Properties\r
-dcae.dispatcher.url=http://dcae.api.simpledemo.onap.org:8080\r
-dcae.header.requestId = X-ECOMP-RequestID
index 04bc959..43f212c 100644 (file)
@@ -36,7 +36,7 @@ import java.util.Map;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.onap.clamp.clds.client.req.policy.OperationalPolicyReq;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.CldsEvent;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.Policy;
@@ -53,7 +53,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 public class OperationPolicyReqItCase {
 
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
 
     @Test
     public void formatAttributesTest() throws IOException, BuilderException {
index eb17c22..71cd9f6 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.runner.RunWith;
 import org.onap.clamp.clds.client.req.policy.OperationalPolicyReq;
 import org.onap.clamp.clds.client.req.policy.PolicyClient;
 import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.CldsEvent;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.Policy;
@@ -57,7 +57,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 public class PolicyClientItCase {
 
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
     @Autowired
     protected PolicyClient policyClient;
     String modelProp;
index d873aa4..7655c58 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mockito;
 import org.onap.clamp.clds.client.req.sdc.SdcCatalogServices;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.CldsAlarmCondition;
 import org.onap.clamp.clds.model.CldsServiceData;
 import org.onap.clamp.clds.model.sdc.SdcResource;
@@ -51,7 +51,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 public class SdcCatalogServicesItCase {
 
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
     @Autowired
     private SdcCatalogServices sdcCatalogWired = new SdcCatalogServices();
 
index 24f127c..a46ecee 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.model.CldsEvent;
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.util.ResourceFileUtil;
@@ -50,7 +50,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 public class TcaRequestFormatterItCase {
 
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
     private String modelProp;
     private String modelBpmn;
     private String modelName;
index 484a13e..43fc959 100644 (file)
@@ -33,7 +33,7 @@ import java.io.IOException;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
@@ -46,7 +46,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 public class CldsReferencePropertiesItCase {
 
     @Autowired
-    private CldsReferenceProperties refProp;
+    private ClampProperties refProp;
 
     /**
      * Test getting a value the properties in string.
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
new file mode 100644 (file)
index 0000000..a676e10
--- /dev/null
@@ -0,0 +1,204 @@
+###\r
+# ============LICENSE_START=======================================================\r
+# ONAP CLAMP\r
+# ================================================================================\r
+# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights\r
+#                             reserved.\r
+# ================================================================================\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+# ============LICENSE_END============================================\r
+# ===================================================================\r
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
+###\r
+\r
+info.build.artifact=@project.artifactId@\r
+info.build.name=@project.name@\r
+info.build.description=@project.description@\r
+info.build.version=@project.version@\r
+\r
+### Set the port for HTTP or HTTPS protocol (Controlled by Spring framework, only one at a time).\r
+### (See below for the parameter 'server.http.port' if you want to have both enabled)\r
+### To have only HTTP, keep the lines server.ssl.* commented\r
+### To have only HTTPS enabled, uncomment the server.ssl.* lines and specify a right keystore location\r
+server.port=8080\r
+### Settings for HTTPS (this automatically enables the HTTPS on the port 'server.port')\r
+#server.ssl.key-store=file:/tmp/mykey.jks\r
+#server.ssl.key-store-password=pass\r
+#server.ssl.key-password=pass\r
+\r
+### In order to be user friendly when HTTPS is enabled,\r
+### you can add another HTTP port that will be automatically redirected to HTTPS\r
+### by enabling this parameter (server.http.port) and set it to another port (80 or 8080, 8090, etc ...)\r
+#server.http-to-https-redirection.port=8090\r
+\r
+### HTTP Example:\r
+###--------------\r
+### server.port=8080\r
+\r
+### HTTPS Example:\r
+### --------------\r
+### server.port=8443\r
+### server.ssl.key-store=file:/tmp/mykey.jks\r
+### server.ssl.key-store-password=mypass\r
+### server.ssl.key-password=mypass\r
+\r
+### HTTP (Redirected to HTTPS) and HTTPS Example:\r
+### --------------------------------------------\r
+### server.port=8443           <-- The HTTPS port\r
+### server.ssl.key-store=file:/tmp/mykey.jks\r
+### server.ssl.key-store-password=mypass\r
+### server.ssl.key-password=mypass\r
+### server.http-to-https-redirection.port=8090  <-- The HTTP port\r
+\r
+server.contextPath=/\r
+#Modified engine-rest applicationpath\r
+spring.profiles.active=clamp-default,clamp-spring-authentication\r
+\r
+#The max number of active threads in this pool\r
+server.tomcat.max-threads=200\r
+#The minimum number of threads always kept alive\r
+server.tomcat.min-Spare-Threads=25\r
+#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads\r
+server.tomcat.max-idle-time=60000\r
+\r
+#Servlet context parameters\r
+server.context_parameters.p-name=value #context parameter with p-name as key and value as value.\r
+\r
+camel.springboot.consumer-template-cache-size=1000\r
+camel.springboot.producer-template-cache-size=1000\r
+camel.springboot.jmx-enabled=false\r
+camel.defaultthreadpool.poolsize=10\r
+camel.defaultthreadpool.maxpoolsize=20\r
+camel.defaultthreadpool.maxqueuesize=1000\r
+camel.defaultthreadpool.keepaliveTime=60\r
+camel.defaultthreadpool.rejectpolicy=CallerRuns\r
+#camel.springboot.xmlRoutes = false\r
+camel.springboot.xmlRoutes=classpath:/clds/camel/*.xml\r
+#camel.springboot.typeConversion = false\r
+\r
+#clds datasource connection details\r
+spring.datasource.cldsdb.driverClassName=org.mariadb.jdbc.Driver\r
+spring.datasource.cldsdb.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3\r
+spring.datasource.cldsdb.username=clds\r
+spring.datasource.cldsdb.password=4c90a0b48204383f4283448d23e0b885a47237b2a23588e7c4651604f51c1067\r
+spring.datasource.cldsdb.validationQuery=SELECT 1\r
+spring.datasource.cldsdb.validationQueryTimeout=20000\r
+spring.datasource.cldsdb.validationInterval=30000\r
+spring.datasource.cldsdb.testWhileIdle = true\r
+spring.datasource.cldsdb.minIdle = 0\r
+spring.datasource.cldsdb.initialSize=0\r
+# Automatically test whether a connection provided is good or not\r
+spring.datasource.cldsdb.testOnBorrow=true\r
+spring.datasource.cldsdb.ignoreExceptionOnPreLoad=true\r
+\r
+#Async Executor default Parameters\r
+async.core.pool.size=10\r
+async.max.pool.size=20\r
+async.queue.capacity=500\r
+\r
+org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties\r
+org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json\r
+org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties\r
+org.onap.clamp.config.files.sdcController=classpath:/clds/sdc-controllers-config.json\r
+\r
+# Properties for Clamp\r
+# DCAE request build properties\r
+#\r
+clamp.config.dcae.template=classpath:/clds/templates/dcae-template.json\r
+clamp.config.dcae.decode.service_ids=classpath:/clds/templates/dcae-decode-service_ids.json\r
+clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-template.json\r
+#\r
+# SDC request blueprint properties\r
+#\r
+clamp.config.sdc.template=classpath:/clds/templates/sdc-template.json\r
+clamp.config.sdc.decode.service_ids=classpath:/clds/templates/sdc-decode-service_ids.json\r
+#\r
+#\r
+# General Policy request properties\r
+#\r
+clamp.config.policy.onap.name=DCAE\r
+clamp.config.policy.pdp.group=default\r
+clamp.config.policy.ms.type=MicroService\r
+clamp.config.policy.ms.policyNamePrefix=Config_MS_\r
+clamp.config.policy.op.type=BRMS_Param\r
+clamp.config.policy.op.policyNamePrefix=Config_BRMS_Param_\r
+\r
+# TCA MicroService Policy request build properties\r
+#\r
+clamp.config.tca.policyid.prefix=DCAE.Config_\r
+clamp.config.tca.policy.template=classpath:/clds/templates/tca-policy-template.json\r
+clamp.config.tca.template=classpath:/clds/templates/tca-template.json\r
+clamp.config.tca.thresholds.template=classpath:/clds/templates/tca-thresholds-template.json\r
+\r
+#\r
+#\r
+# Operational Policy request build properties\r
+#\r
+clamp.config.op.policyDescription=from clds\r
+# default\r
+clamp.config.op.templateName=ClosedLoopvUSP\r
+clamp.config.op.operationTopic=APPC-CL\r
+clamp.config.op.notificationTopic=POLICY-CL-MGT\r
+clamp.config.op.controller=amsterdam\r
+clamp.config.op.policy.appc=APPC\r
+# by service: vSCP\r
+clamp.config.op.templateName.vSCP=ClosedLoopTemplate\r
+clamp.config.op.controller.vSCP=1607-f5fw\r
+clamp.config.op.eNodeB.templateName=ClosedLoopControlName\r
+clamp.config.op.eNodeB.operationTopic=com.onap.sdnr.RanCLRequest-v00\r
+clamp.config.op.eNodeB.notificationTopic=com.onap-policy.IST-ENODEB-CL\r
+clamp.config.op.eNodeB.controller=amsterdam\r
+clamp.config.op.eNodeB.recipe=classpath:/clds/templates/op-eNodeB-recipe.json\r
+clamp.config.op.eNodeB.timeWindow=35\r
+clamp.config.op.eNodeB.limit=2\r
+clamp.config.op.eNodeB.period=10s\r
+#\r
+# Sdc service properties\r
+clamp.config.sdc.catalog.url=http://localhost:${docker.http-cache.port.host}/sdc/v1/catalog/\r
+clamp.config.sdc.hostUrl=http://localhost:${docker.http-cache.port.host}\r
+clamp.config.sdc.serviceUrl=http://localhost:${docker.http-cache.port.host}/sdc/v1/catalog/services\r
+clamp.config.sdc.serviceUsername=clamp\r
+clamp.config.sdc.servicePassword=b7acccda32b98c5bb7acccda32b98c5b05D511BD6D93626E90D18E9D24D9B78CD34C7EE8012F0A189A28763E82271E50A5D4EC10C7D93E06E0A2D27CAE66B981\r
+clamp.config.sdc.artifactLabel=blueprintclampcockpit\r
+clamp.config.sdc.sdcX-InstanceID=CLAMP\r
+clamp.config.sdc.artifactType=DCAE_INVENTORY_BLUEPRINT\r
+clamp.config.sdc.locationArtifactLabel=locationclampcockpit\r
+clamp.config.sdc.locationArtifactType=DCAE_INVENTORY_JSON\r
+clamp.config.sdc.InstanceID=X-ECOMP-InstanceID\r
+clamp.config.sdc.header.requestId = X-ECOMP-RequestID\r
+#\r
+#\r
+clamp.config.ui.location.default=classpath:/clds/templates/ui-location-default.json\r
+clamp.config.ui.alarm.default=classpath:/clds/templates/ui-alarm-default.json\r
+#\r
+# if action.test.override is true, then any action will be marked as test=true (even if incoming action request had test=false); otherwise, test flag will be unchanged on the action request\r
+clamp.config.action.test.override=false\r
+# if action.insert.test.event is true, then insert event even if the action is set to test\r
+clamp.config.action.insert.test.event=false\r
+clamp.config.clds.service.cache.invalidate.after.seconds=120\r
+\r
+#DCAE Inventory Url Properties\r
+clamp.config.dcae.inventory.url=http://dcae.api.simpledemo.onap.org:8080\r
+\r
+#DCAE Dispatcher Url Properties\r
+clamp.config.dcae.dispatcher.url=http://dcae.api.simpledemo.onap.org:8080\r
+clamp.config.dcae.header.requestId = X-ECOMP-RequestID\r
+\r
+#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !\r
+clamp.config.security.permission.type.cl=permission-type-cl\r
+clamp.config.security.permission.type.cl.manage=permission-type-cl-manage\r
+clamp.config.security.permission.type.cl.event=permission-type-cl-event\r
+clamp.config.security.permission.type.filter.vf=permission-type-filter-vf\r
+clamp.config.security.permission.type.template=permission-type-template\r
+#This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties\r
+clamp.config.security.permission.instance=dev
\ No newline at end of file
diff --git a/src/test/resources/clds/clds-reference.properties b/src/test/resources/clds/clds-reference.properties
deleted file mode 100644 (file)
index 5655278..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-###\r
-# ============LICENSE_START=======================================================\r
-# ONAP CLAMP\r
-# ================================================================================\r
-# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights\r
-#                             reserved.\r
-# ================================================================================\r
-# Licensed under the Apache License, Version 2.0 (the "License"); \r
-# you may not use this file except in compliance with the License. \r
-# You may obtain a copy of the License at\r
-# \r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-# \r
-# Unless required by applicable law or agreed to in writing, software \r
-# distributed under the License is distributed on an "AS IS" BASIS, \r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \r
-# See the License for the specific language governing permissions and \r
-# limitations under the License.\r
-# ============LICENSE_END============================================\r
-# ===================================================================\r
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
-###\r
-\r
-#\r
-# Poperties for CLDS\r
-#\r
-#\r
-# DCAE request build properties\r
-#\r
-dcae.template=classpath:/clds/templates/dcae-template.json\r
-dcae.decode.service_ids=classpath:/clds/templates/dcae-decode-service_ids.json\r
-dcae.deployment.template=classpath:/clds/templates/dcae-deployment-template.json\r
-#\r
-# SDC request blueprint properties\r
-#\r
-sdc.template=classpath:/clds/templates/sdc-template.json\r
-sdc.decode.service_ids=classpath:/clds/templates/sdc-decode-service_ids.json\r
-#\r
-#\r
-# General Policy request properties\r
-#\r
-policy.onap.name=DCAE\r
-policy.pdp.group=default\r
-policy.ms.type=MicroService\r
-policy.ms.policyNamePrefix=Config_MS_\r
-policy.op.type=BRMS_Param\r
-policy.op.policyNamePrefix=Config_BRMS_Param_\r
-\r
-# TCA MicroService Policy request build properties\r
-#\r
-tca.policyid.prefix=DCAE.Config_\r
-tca.policy.template=classpath:/clds/templates/tca-policy-template.json\r
-tca.template=classpath:/clds/templates/tca-template.json\r
-tca.thresholds.template=classpath:/clds/templates/tca-thresholds-template.json\r
-\r
-#\r
-#\r
-# Operational Policy request build properties\r
-#\r
-op.policyDescription=from clds\r
-# default\r
-op.templateName=ClosedLoopvUSP\r
-op.operationTopic=APPC-CL\r
-op.notificationTopic=POLICY-CL-MGT\r
-op.controller=amsterdam\r
-op.policy.appc=APPC\r
-# by service: vSCP\r
-op.templateName.vSCP=ClosedLoopTemplate\r
-op.controller.vSCP=1607-f5fw\r
-op.eNodeB.templateName=ClosedLoopControlName\r
-op.eNodeB.operationTopic=com.onap.sdnr.RanCLRequest-v00\r
-op.eNodeB.notificationTopic=com.onap-policy.IST-ENODEB-CL\r
-op.eNodeB.controller=amsterdam\r
-op.eNodeB.recipe=classpath:/clds/templates/op-eNodeB-recipe.json\r
-op.eNodeB.timeWindow=35\r
-op.eNodeB.limit=2\r
-op.eNodeB.period=10s\r
-#\r
-# Sdc service properties\r
-sdc.catalog.url=http://localhost:${docker.http-cache.port.host}/sdc/v1/catalog/\r
-sdc.hostUrl=http://localhost:${docker.http-cache.port.host}\r
-sdc.serviceUrl=http://localhost:${docker.http-cache.port.host}/sdc/v1/catalog/services\r
-sdc.serviceUsername=clamp\r
-sdc.servicePassword=b7acccda32b98c5bb7acccda32b98c5b05D511BD6D93626E90D18E9D24D9B78CD34C7EE8012F0A189A28763E82271E50A5D4EC10C7D93E06E0A2D27CAE66B981\r
-sdc.artifactLabel=blueprintclampcockpit\r
-sdc.sdcX-InstanceID=CLAMP\r
-sdc.artifactType=DCAE_INVENTORY_BLUEPRINT\r
-sdc.locationArtifactLabel=locationclampcockpit\r
-sdc.locationArtifactType=DCAE_INVENTORY_JSON\r
-sdc.InstanceID=X-ECOMP-InstanceID\r
-sdc.header.requestId=X-ECOMP-RequestID\r
-#\r
-#\r
-ui.location.default=classpath:/clds/templates/ui-location-default.json\r
-ui.alarm.default=classpath:/clds/templates/ui-alarm-default.json\r
-#\r
-# if action.test.override is true, then any action will be marked as test=true (even if incoming action request had test=false); otherwise, test flag will be unchanged on the action request\r
-action.test.override=false\r
-# if action.insert.test.event is true, then insert event even if the action is set to test\r
-action.insert.test.event=false\r
-clds.service.cache.invalidate.after.seconds=120\r
-\r
-#DCAE Inventory Url Properties\r
-dcae.inventory.url=http://dcae.api.simpledemo.onap.org:8080\r
-\r
-#DCAE Dispatcher Url Properties\r
-dcae.dispatcher.url=http://dcae.api.simpledemo.onap.org:8080\r
-dcae.header.requestId = X-ECOMP-RequestID\r
-\r
index 01b6ff1..4db8add 100644 (file)
 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
 ###
 
-info.build.artifact=@project.artifactId@
-info.build.name=@project.name@
-info.build.description=@project.description@
-info.build.version=@project.version@
-
 ### Set the port for HTTP or HTTPS protocol (Controlled by Spring framework, only one at a time).
 ### (See below for the parameter 'server.http.port' if you want to have both enabled) 
 ### To have only HTTP, keep the lines server.ssl.* commented
@@ -64,28 +59,6 @@ server.contextPath=/
 #Modified engine-rest applicationpath
 spring.profiles.active=clamp-default,clamp-spring-authentication
 
-#The max number of active threads in this pool
-server.tomcat.max-threads=200
-#The minimum number of threads always kept alive
-server.tomcat.min-Spare-Threads=25
-#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads
-server.tomcat.max-idle-time=60000
-
-#Servlet context parameters
-server.context_parameters.p-name=value #context parameter with p-name as key and value as value.
-
-camel.springboot.consumer-template-cache-size=1000
-camel.springboot.producer-template-cache-size=1000
-camel.springboot.jmx-enabled=false
-camel.defaultthreadpool.poolsize=10
-camel.defaultthreadpool.maxpoolsize=20
-camel.defaultthreadpool.maxqueuesize=1000
-camel.defaultthreadpool.keepaliveTime=60
-camel.defaultthreadpool.rejectpolicy=CallerRuns
-#camel.springboot.xmlRoutes = false
-camel.springboot.xmlRoutes=classpath:/clds/camel/*.xml
-#camel.springboot.typeConversion = false
-
 #clds datasource connection details
 spring.datasource.cldsdb.driverClassName=org.mariadb.jdbc.Driver
 spring.datasource.cldsdb.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647\r
@@ -100,22 +73,3 @@ spring.datasource.cldsdb.initialSize=0
 # Automatically test whether a connection provided is good or not
 spring.datasource.cldsdb.testOnBorrow=true
 spring.datasource.cldsdb.ignoreExceptionOnPreLoad=true
-
-#Async Executor default Parameters
-async.core.pool.size=10
-async.max.pool.size=20
-async.queue.capacity=500
-
-org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.properties
-org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
-org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
-org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
-
-#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !
-CLDS_PERMISSION_TYPE_CL=permission-type-cl
-CLDS_PERMISSION_TYPE_CL_MANAGE=permission-type-cl-manage
-CLDS_PERMISSION_TYPE_CL_EVENT=permission-type-cl-event
-CLDS_PERMISSION_TYPE_FILTER_VF=permission-type-filter-vf
-CLDS_PERMISSION_TYPE_TEMPLATE=permission-type-template
-#This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties
-CLDS_PERMISSION_INSTANCE=dev
\ No newline at end of file