#
#
#
-brms.dependency.version=1.2.2
+brms.dependency.version=1.2.3
ENVIRONMENT = DEVL
"default": [{
"groupId": "org.onap.policy.drools-applications.controlloop.templates",
"artifactId": "template.demo",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "events",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "rest",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "appc",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "aai",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "so",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "trafficgenerator",
- "version": "1.2.2"
+ "version": "1.2.3"
}],
"amsterdam": [{
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "events",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "appc",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "appclcm",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "vfc",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "so",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "aai",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "sdc",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl",
"artifactId": "trafficgenerator",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common",
"artifactId": "eventmanager",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common",
"artifactId": "guard",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.actors",
"artifactId": "actorServiceProvider",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.actors",
"artifactId": "actor.appc",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.actors",
"artifactId": "actor.appclcm",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.actors",
"artifactId": "actor.so",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common.actors",
"artifactId": "actor.vfc",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "org.onap.policy.drools-applications.controlloop.common",
"artifactId": "policy-yaml",
- "version": "1.2.2"
+ "version": "1.2.3"
}, {
"groupId": "com.att.research.xacml",
"artifactId": "xacml-pdp",
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>BRMSGateway</artifactId>
<description>This application will take in BRMS rules and acts as interface between PR and PDP XACML</description>
private static final Logger LOGGER = FlexLogger.getLogger(BrmsPush.class.getName());
private static final String PROJECTSLOCATION = "RuleProjects";
private static final String[] GOALS = {"clean", "deploy"};
- private static final String DEFAULT_VERSION = "1.2.2";
+ private static final String DEFAULT_VERSION = "1.2.3";
private static final String DEPENDENCY_FILE = "dependency.json";
private static final String BRMSPERSISTENCE = "brmsEclipselink.persistencexml";
#
#
#
-brms.dependency.version=1.2.2
+brms.dependency.version=1.2.3
ENVIRONMENT = DEVL
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>LogParser</artifactId>
<dependencies>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<build>
<plugins>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>ONAP-PDP-REST</artifactId>
<description>ONAP PDP REST</description>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>ONAP-REST</artifactId>
<description>ONAP REST</description>
} catch (IOException e) {
logger.error(e);
+ }catch(ParserException e){
+ logger.error(e);
+ return e.getMessage();
}
return null;
}
@SuppressWarnings("unchecked")
- public LinkedHashMap<String, String> load(String fileName) throws IOException {
+ public LinkedHashMap<String, String> load(String fileName) throws IOException,ParserException {
File newConfiguration = new File(fileName);
StringBuilder orderInfo = new StringBuilder("[");
Yaml yaml = new Yaml();
yamlMap = (LinkedHashMap<Object, Object>) yaml.load(is);
} catch (FileNotFoundException e) {
logger.error(e);
+ }catch(Exception e){
+ throw new ParserException("Invalid TOSCA Model format. Please make sure it is a valid YAML file");
}
StringBuilder sb = new StringBuilder();
stringListItems.append(uniqueDataKeySplit[1].toUpperCase()+":required-"+requiredValue +":MANY-true");
}
dataMapForJson.put(uniqueDataKey, stringListItems.toString());
- dataListBuffer.append(uniqueDataKeySplit[1].toUpperCase()+"=[");
+ boolean isConstraintsFound = false;
for(int i=0;i<10;i++){
String findConstraints= DATATYPE+uniqueDataKeySplit[0]+PROPERTIES+uniqueDataKeySplit[1]+".entry_schema.constraints.0.valid_values."+i;
logger.info("findConstraints => " + findConstraints);
String constraintsValue=map.get(findConstraints);
logger.info("constraintsValue => " + constraintsValue);
- if(constraintsValue==null){
+ if((constraintsValue==null || constraintsValue.isEmpty()) && i==0){ //if no constraints at all ( index i as 0 can tell this )
+ isConstraintsFound = false;
+ //if type is list but no constraints
+ String newValue = dataMapForJson.get(uniqueDataKey).replace("MANY-false", "MANY-true");
+ newValue = newValue.replace(uniqueDataKeySplit[1].toUpperCase()+":", "");
+ dataMapForJson.put(uniqueDataKey, newValue);
break;
- }
- else{
- logger.info("constraintsValue => " + constraintsValue);
+ } else{
+ isConstraintsFound = true;
+ if(i == 0){ // only need to add one time for the same attribute
+ dataListBuffer.append(uniqueDataKeySplit[1].toUpperCase()+"=[");
+ }
+
if(constraintsValue.contains("=")){
constraintsValue = constraintsValue.replace("=", "equal-sign");
}
dataListBuffer.append(constraintsValue+",");
}
}
- dataListBuffer.append("]#");
- logger.info(dataListBuffer);
+ if(isConstraintsFound){
+ dataListBuffer.append("]#");
+ }
}
+ }else{
+ logger.info("entry_schema.type is not defined correctly");
}
}
else{
}
- LinkedHashMap<String, LinkedHashMap<String, String>> parsePolicyNodes(Map<String,String> map){
+ LinkedHashMap<String, LinkedHashMap<String, String>> parsePolicyNodes(Map<String,String> map) throws ParserException{
LinkedHashMap<String,LinkedHashMap<String,String>> mapKey= new LinkedHashMap <>();
for(String uniqueKey: uniqueKeys){
LinkedHashMap<String,String> hm;
hm = mapKey.get(uniqueKey);
String keyStr= key.substring(key.lastIndexOf('.')+1);
String valueStr= map.get(key);
- if(("type").equals(keyStr)){
+ if("type".equalsIgnoreCase(keyStr) && ((key.contains("entry_schema.0.type") || key.contains("entry_schema.type") && valueStr.contains("policy.data.")))){
+ throw new ParserException("For using user defined object type, Please make sure no space between 'type:' and object " + valueStr );
+
+ }
+ if("type".equals(keyStr)){
if(!key.contains("entry_schema"))
{
hm.put(keyStr,valueStr);
hm = new LinkedHashMap <>();
String keyStr= key.substring(key.lastIndexOf('.')+1);
String valueStr= map.get(key);
+ if(key.contains(".objective.")){
+ throw new ParserException("Attribute objective is a key word. Please use a different name");
+ }
if(("type").equals(keyStr)){
if(!key.contains("entry_schema"))
{
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP-REST
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.policy.rest.util;
+
+public class ParserException extends Exception{
+ String message;
+ ParserException(String message) {
+ this.message = message;
+ }
+ public String getMessage(){
+ return message ;
+ }
+}
\ No newline at end of file
} catch (IOException e) {
logger.error("testLoad", e);
result = null;
+ }catch(ParserException e){
+ logger.error("testLoad", e);
}
assertTrue(result != null && !result.isEmpty());
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>ONAP-SDK-APP</artifactId>
<packaging>war</packaging>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>ONAP-XACML</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>POLICY-SDK-APP</artifactId>
<packaging>war</packaging>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>PolicyEngineAPI</artifactId>
<dependencies>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>PolicyEngineClient</artifactId>
<dependencies>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>PolicyEngineUtils</artifactId>
<dependencies>
.. * This note must be removed after content has been added.
-Version: 1.2.2
+Version: 1.2.3
--------------
-:Release Date: 2018-05-24 (Beijing Release)
+:Release Date: 2018-06-07 (Beijing Release)
**New Features**
**Bug Fixes**
- * `[POLICY-454] <https://jira.onap.org/browse/POLICY-454>`_ - brmsgw 1.1.2 policy rules generation in a 1.1.1 docker image
* `[POLICY-484] <https://jira.onap.org/browse/POLICY-484>`_ - Extend election handler run window and clean up error messages
* `[POLICY-494] <https://jira.onap.org/browse/POLICY-494>`_ - POLICY EELF Audit.log not in ECOMP Standards Compliance
* `[POLICY-501] <https://jira.onap.org/browse/POLICY-501>`_ - Fix issues blocking election handler and add directed interface for opstate
* `[POLICY-743] <https://jira.onap.org/browse/POLICY-743>`_ - Fixed data name since its name was changed on server side
* `[POLICY-753] <https://jira.onap.org/browse/POLICY-753>`_ - Policy Health Check failed with multi-node cluster
* `[POLICY-765] <https://jira.onap.org/browse/POLICY-765>`_ - junit test for guard fails intermittently
- * `[POLICY-796] <https://jira.onap.org/browse/POLICY-796>`_ - VirtualControlLoopEvent facts are piling up
**Security Issues**
- * Please see the `Policy R2 Beijing Security/Vulnerability Threat <https://wiki.onap.org/pages/viewpage.action?pageId=25437092>`_ page for security related issues.
+ * Refer to the `Policy R2 Beijing Security/Vulnerability Threat <https://wiki.onap.org/pages/viewpage.action?pageId=25437092>`_ page for security related issues.
**Known Issues**
* `[POLICY-764] <https://jira.onap.org/browse/POLICY-764>`_ - Policy Engine PIP Configuration JUnit Test fails intermittently
* `[POLICY-776] <https://jira.onap.org/browse/POLICY-776>`_ - OOF Policy TOSCA models are not correctly rendered
* `[POLICY-799] <https://jira.onap.org/browse/POLICY-799>`_ - Policy API Validation Does Not Validate Required Parent Attributes in the Model
+ * `[POLICY-801] <https://jira.onap.org/browse/POLICY-801>`_ - fields mismatch for OOF flavorFeatures between implementation and wiki
.. For initial document: list epic and user stories for each, list user stories with no epics.
.. For Bugs section, list bugs that are not tied to an epic. Remove all items with "Won't Do" resolution.
.. 01/15/2018 - Added change for version 1.1.3 to the Amsterdam branch. Also corrected prior version (1.2.0) to (1.1.1)
-.. 11/16/2017 - Initial document for Amsterdam release.
+.. Also, Set up initial information for Beijing.
+.. 05/21/2018 - Information for Beijing release.
+.. Excluded POLICY-454 from bug list since it doesn't apply to Beijing per Jorge.
End of Release Notes
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>packages</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>base</artifactId>
ping_interval=30000
-brms.dependency.version=1.2.2
+brms.dependency.version=1.2.3
CLIENT_FILE=client.properties
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>packages</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>docker</artifactId>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>packages</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>install</artifactId>
<parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<artifactId>packages</artifactId>
<packaging>pom</packaging>
</parent>
<groupId>org.onap.policy.engine</groupId>
<artifactId>PolicyEngineSuite</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
<packaging>pom</packaging>
<name>policy-engine</name>
<description>The ONAP Policy Engine main pom</description>
major=1
minor=2
-patch=2
+patch=3
base_version=${major}.${minor}.${patch}