From: Pamela Dragosh Date: Thu, 8 Nov 2018 15:30:19 +0000 (+0000) Subject: Merge "Fix R3 model for OOF Policy Optimization" X-Git-Tag: 1.4.0~80 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=commitdiff_plain;h=b812d8673c0fc3c524165de933bcaf621f84a7c5;hp=a41ddbe556055ee8d450c86f90d1353636c3139c Merge "Fix R3 model for OOF Policy Optimization" --- diff --git a/BRMSGateway/config.properties b/BRMSGateway/config.properties index c795aa4a3..d99e0e658 100644 --- a/BRMSGateway/config.properties +++ b/BRMSGateway/config.properties @@ -77,6 +77,6 @@ ping_interval=30000 # # # -brms.dependency.version=1.3.1-SNAPSHOT +brms.dependency.version=1.4.0-SNAPSHOT ENVIRONMENT = DEVL diff --git a/BRMSGateway/dependency.json b/BRMSGateway/dependency.json index 32f6bc927..aa7ac81f2 100644 --- a/BRMSGateway/dependency.json +++ b/BRMSGateway/dependency.json @@ -3,124 +3,124 @@ "default": [{ "groupId": "org.onap.policy.drools-applications.controlloop.templates", "artifactId": "template.demo", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "events", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "rest", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "appc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "aai", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "so", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "sdnc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "sdnr", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "trafficgenerator", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }], "amsterdam": [{ "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "events", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "appc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "appclcm", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "vfc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "so", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "sdnr", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "sdnc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "aai", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "sdc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.model-impl", "artifactId": "trafficgenerator", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common", "artifactId": "eventmanager", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common", "artifactId": "guard", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.actors", "artifactId": "actorServiceProvider", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.actors", "artifactId": "actor.appc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.actors", "artifactId": "actor.appclcm", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.actors", "artifactId": "actor.so", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.actors", "artifactId": "actor.sdnc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.actors", "artifactId": "actor.sdnr", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common.actors", "artifactId": "actor.vfc", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "org.onap.policy.drools-applications.controlloop.common", "artifactId": "policy-yaml", - "version": "1.3.1-SNAPSHOT" + "version": "1.4.0-SNAPSHOT" }, { "groupId": "com.att.research.xacml", "artifactId": "xacml-pdp", - "version": "1.0.1" + "version": "1.0.2" }] } } diff --git a/BRMSGateway/pom.xml b/BRMSGateway/pom.xml index 62c6e55e4..1922e90b3 100644 --- a/BRMSGateway/pom.xml +++ b/BRMSGateway/pom.xml @@ -18,13 +18,12 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT BRMSGateway This application will take in BRMS rules and acts as interface between PR and PDP XACML diff --git a/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java b/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java index a7c21a890..033c78df7 100644 --- a/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java +++ b/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java @@ -118,7 +118,7 @@ public class BrmsPush { 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.3.1-SNAPSHOT"; + private static final String DEFAULT_VERSION = "1.4.0-SNAPSHOT"; private static final String DEPENDENCY_FILE = "dependency.json"; private static final String BRMSPERSISTENCE = "brmsEclipselink.persistencexml"; diff --git a/BRMSGateway/src/test/resources/config.properties b/BRMSGateway/src/test/resources/config.properties index a90d4513c..a46357276 100644 --- a/BRMSGateway/src/test/resources/config.properties +++ b/BRMSGateway/src/test/resources/config.properties @@ -81,6 +81,6 @@ ping_interval=30000 # # # -brms.dependency.version=1.3.1-SNAPSHOT +brms.dependency.version=1.4.0-SNAPSHOT ENVIRONMENT = DEVL diff --git a/LogParser/pom.xml b/LogParser/pom.xml index a7c3d7c4a..f088f217b 100644 --- a/LogParser/pom.xml +++ b/LogParser/pom.xml @@ -19,14 +19,12 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT LogParser diff --git a/ONAP-PAP-REST/pom.xml b/ONAP-PAP-REST/pom.xml index 7cf30b979..21e7db989 100644 --- a/ONAP-PAP-REST/pom.xml +++ b/ONAP-PAP-REST/pom.xml @@ -19,9 +19,7 @@ ============LICENSE_END========================================================= --> - + 4.0.0 ONAP-PAP-REST ONAP-PAP-REST @@ -29,7 +27,7 @@ org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT diff --git a/ONAP-PDP-REST/pom.xml b/ONAP-PDP-REST/pom.xml index 2b69249fa..bffc06b38 100644 --- a/ONAP-PDP-REST/pom.xml +++ b/ONAP-PDP-REST/pom.xml @@ -18,14 +18,12 @@ limitations under the License. ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT ONAP-PDP-REST ONAP PDP REST diff --git a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/config/PDPApiAuth.java b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/config/PDPApiAuth.java index d06321d64..246f5a26d 100644 --- a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/config/PDPApiAuth.java +++ b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/config/PDPApiAuth.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PDP-REST * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -90,7 +90,7 @@ public class PDPApiAuth { */ public static boolean checkPermissions(String clientEncoding, String requestID, String resource) { - try{ + try{ String[] userNamePass = PolicyUtils.decodeBasicEncoding(clientEncoding); if(userNamePass==null || userNamePass.length==0){ String usernameAndPassword = null; @@ -105,7 +105,14 @@ public class PDPApiAuth { Boolean result = false; // Check Backward Compatibility. try{ - result = clientAuth(userNamePass); + /* + * If AAF is NOT enabled in the properties we will allow the user to + * continue to use the client.properties file to authenticate. + * Note: Disabling AAF is for testing purposes and not intended for production. + */ + if ("false".equals(XACMLProperties.getProperty("enable_aaf"))) { + result = clientAuth(userNamePass); + } }catch(Exception e){ LOGGER.error(MessageCodes.ERROR_PERMISSIONS, e); } diff --git a/ONAP-PDP-REST/src/test/resources/notification.xacml.pdp.properties b/ONAP-PDP-REST/src/test/resources/notification.xacml.pdp.properties index 2a3600559..345de16b0 100644 --- a/ONAP-PDP-REST/src/test/resources/notification.xacml.pdp.properties +++ b/ONAP-PDP-REST/src/test/resources/notification.xacml.pdp.properties @@ -167,5 +167,7 @@ xacml.rest.pep.idfile = src/test/resources/client.properties #Not Mandatory for Open Onap policy.aaf.namespace = policy.aaf.resource = +enable_aaf=false + # DMAAP_AAF_LOGIN = diff --git a/ONAP-PDP-REST/src/test/resources/pass.xacml.pdp.properties b/ONAP-PDP-REST/src/test/resources/pass.xacml.pdp.properties index c3eda591f..cf6d92753 100644 --- a/ONAP-PDP-REST/src/test/resources/pass.xacml.pdp.properties +++ b/ONAP-PDP-REST/src/test/resources/pass.xacml.pdp.properties @@ -167,5 +167,7 @@ xacml.rest.pep.idfile = src/test/resources/client.properties #Not Mandatory for Open Onap policy.aaf.namespace = policy.aaf.resource = +enable_aaf=false + # DMAAP_AAF_LOGIN = diff --git a/ONAP-PDP-REST/xacml.pdp.properties b/ONAP-PDP-REST/xacml.pdp.properties index 57e1d708b..a707678c3 100644 --- a/ONAP-PDP-REST/xacml.pdp.properties +++ b/ONAP-PDP-REST/xacml.pdp.properties @@ -19,7 +19,7 @@ ### # Default XACML Properties File for PDP RESTful servlet -# +# NOTE: All properties in this file are for local development environments only. # Standard API Factories # xacml.dataTypeFactory=com.att.research.xacml.std.StdDataTypeFactory @@ -165,12 +165,34 @@ dependency_groups=site_1.pdplp_1;site_1.astragw_1;site_1.brmsgw_1 # this can be DEVL, TEST, PROD ENVIRONMENT=DEVL -xacml.rest.pep.idfile = client.properties +xacml.rest.pep.idfile=client.properties + + +#AAF cadi properties +enable_aaf=false +policy.aaf.namespace=org.onap.policy +policy.aaf.root.permission=org.onap.policy.pdpx +cm_url=https://aaf-onap-test.osaaf.org:8095/AAF_NS.cm:2.1 +cadi_latitude=38.000 +cadi.longitude=72.000 +cadi_alias=policy@policy.onap.org +cadi_loglevel=DEBUG +cadi_keyfile=/media/sf_SourceTree/gerrit-pe/engine/packages/base/src/files/etc/ssl/aaf-cadi.keyfile +cadi_protocols=TLSv1.1,TLSv1.2 +cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US +cadi_keystore=/media/sf_SourceTree/gerrit-pe/engine/packages/base/src/files/etc/ssl/policy-keystore +cadi_keystore_password=Pol1cy_0nap +cadi_truststore=/media/sf_SourceTree/gerrit-pe/engine/packages/base/src/files/etc/ssl/policy-truststore +cadi_truststore_password=Pol1cy_0nap +aaf_env=DEV +aaf_url=https://aaf-onap-test.osaaf.org:8095/AAF_NS.service:2.1 +aaf_fqdn=aaf-onap-test.osaaf.org +aaf_oauth2_introspect_url=https://aaf-onap-test.osaaf.org:8095/AAF_NS.introspect:2.1/introspect +aaf_oauth2_token_url=https://aaf-onap-test.osaaf.org:8095/AAF_NS.token:2.1/token +fs_url=https://aaf-onap-test.osaaf.org:8095/AAF_NS.fs.2.1 +gui_url=https://aaf-onap-test.osaaf.org:8095/AAF_NS.gui.2.1 + -#AAF Policy Name space -#Not Mandatory for Open Onap -policy.aaf.namespace = -policy.aaf.resource = # Decision Response settings. # can be either PERMIT or DENY. decision.indeterminate.response=PERMIT \ No newline at end of file diff --git a/ONAP-PDP/pom.xml b/ONAP-PDP/pom.xml index 046132289..2bd454861 100644 --- a/ONAP-PDP/pom.xml +++ b/ONAP-PDP/pom.xml @@ -19,9 +19,7 @@ ============LICENSE_END========================================================= --> - + 4.0.0 ONAP-PDP ONAP-PDP @@ -29,7 +27,7 @@ org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT @@ -67,7 +65,7 @@ com.att.research.xacml xacml-pdp - 1.0.1 + 1.0.2 diff --git a/ONAP-REST/pom.xml b/ONAP-REST/pom.xml index 271c75311..5d899fcbe 100644 --- a/ONAP-REST/pom.xml +++ b/ONAP-REST/pom.xml @@ -20,14 +20,12 @@ --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT ONAP-REST ONAP REST diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java index 54713ceef..f145f4db1 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java @@ -1214,9 +1214,7 @@ public class MSModelUtils { 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")) { hm.put(keyStr, valueStr); diff --git a/ONAP-SDK-APP/pom.xml b/ONAP-SDK-APP/pom.xml index 6d782a308..65da53b77 100644 --- a/ONAP-SDK-APP/pom.xml +++ b/ONAP-SDK-APP/pom.xml @@ -17,14 +17,12 @@ limitations under the License. ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT ONAP-SDK-APP war diff --git a/ONAP-XACML/pom.xml b/ONAP-XACML/pom.xml index 03bc9992f..05770808f 100644 --- a/ONAP-XACML/pom.xml +++ b/ONAP-XACML/pom.xml @@ -19,14 +19,12 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT ONAP-XACML jar @@ -52,7 +50,7 @@ com.att.research.xacml xacml - 1.0.1 + 1.0.2 - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT POLICY-SDK-APP war diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java index c4c822005..e7ed57add 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java @@ -582,7 +582,11 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { //Get element order info String dataOrderInfo = returnModel.getDataOrderInfo(); - + if(dataOrderInfo != null && !dataOrderInfo.startsWith("\"")){ + dataOrderInfo = "\"" + dataOrderInfo + "\""; + } + LOGGER.info("dataOrderInfo : " + dataOrderInfo); + String allManyTrueKeys = ""; if(allkeys != null){ allManyTrueKeys = allkeys.toString(); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java index a45bfed57..e3ce8780b 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java @@ -234,6 +234,10 @@ public class CreateOptimizationController extends RestrictedBaseController { //Get element order info String dataOrderInfo = returnModel.getDataOrderInfo(); + if(dataOrderInfo != null && !dataOrderInfo.startsWith("\"")){ + dataOrderInfo = "\"" + dataOrderInfo + "\""; + } + String nameOfTrueKeys = ""; if(allkeys != null){ nameOfTrueKeys = allkeys.toString(); diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js index d53a9198e..5a3c62e3c 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js @@ -1381,9 +1381,10 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind } for (i=0; i < listemunerateValues.length; i += 1) { - if(listemunerateValues[i].includes("equal-sign")){ + if(typeof listemunerateValues[i] == "string" && listemunerateValues[i].includes("equal-sign")){ listemunerateValues[i] = listemunerateValues[i].replace('equal-sign','='); } + option = document.createElement('option'); option.setAttribute('value', listemunerateValues[i]); option.appendChild(document.createTextNode(listemunerateValues[i])); diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js index cbd011f2e..cdeaefdea 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js @@ -1159,11 +1159,11 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window', listField.appendChild(optionFirst); } - for (i=0; i < listemunerateValues.length; i += 1) { - if(listemunerateValues[i].includes("equal-sign")){ + for (var i=0; i < listemunerateValues.length; i += 1) { + if(typeof listemunerateValues[i] == "string" && listemunerateValues[i].includes("equal-sign")){ listemunerateValues[i] = listemunerateValues[i].replace('equal-sign','='); } - option = document.createElement('option'); + var option = document.createElement('option'); option.setAttribute('value', listemunerateValues[i]); option.appendChild(document.createTextNode(listemunerateValues[i])); option.setAttribute('value', listemunerateValues[i]); diff --git a/PolicyEngineAPI/pom.xml b/PolicyEngineAPI/pom.xml index 48468cb95..da13a9a91 100644 --- a/PolicyEngineAPI/pom.xml +++ b/PolicyEngineAPI/pom.xml @@ -19,14 +19,12 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT PolicyEngineAPI diff --git a/PolicyEngineClient/pom.xml b/PolicyEngineClient/pom.xml index 4c3e32e15..feb9e51ea 100644 --- a/PolicyEngineClient/pom.xml +++ b/PolicyEngineClient/pom.xml @@ -19,14 +19,12 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT PolicyEngineClient diff --git a/PolicyEngineUtils/pom.xml b/PolicyEngineUtils/pom.xml index 66158153d..4d552b85f 100644 --- a/PolicyEngineUtils/pom.xml +++ b/PolicyEngineUtils/pom.xml @@ -17,14 +17,12 @@ limitations under the License. ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT PolicyEngineUtils @@ -103,11 +101,6 @@ com.google.code.gson gson - - com.att.aft - dme2 - 3.1.200 - org.onap.dmaap.messagerouter.dmaapclient dmaapClient @@ -116,10 +109,6 @@ org.slf4j slf4j-log4j12 - - com.att.aft - dme2 - diff --git a/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusConsumer.java b/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusConsumer.java index 6d80a6a78..0d4c86b3d 100644 --- a/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusConsumer.java +++ b/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusConsumer.java @@ -23,10 +23,9 @@ package org.onap.policy.utils; import java.net.MalformedURLException; import java.util.List; import java.util.Properties; - -import com.att.nsa.mr.client.MRClient.MRApiException; -import com.att.nsa.mr.client.impl.MRConsumerImpl; -import com.att.nsa.mr.test.clients.ProtocolTypeConstants; +import org.onap.dmaap.mr.client.MRClient.MRApiException; +import org.onap.dmaap.mr.client.impl.MRConsumerImpl; +import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants; public interface BusConsumer { diff --git a/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusPublisher.java b/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusPublisher.java index 3a12122bf..745213529 100644 --- a/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusPublisher.java +++ b/PolicyEngineUtils/src/main/java/org/onap/policy/utils/BusPublisher.java @@ -24,14 +24,12 @@ import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.concurrent.TimeUnit; - +import org.onap.dmaap.mr.client.impl.MRSimplerBatchPublisher; +import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants; import org.onap.policy.common.logging.eelf.PolicyLogger; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; -import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher; -import com.att.nsa.mr.test.clients.ProtocolTypeConstants; - public interface BusPublisher { /** diff --git a/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/BusTest.java b/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/BusTest.java index 37170f077..37f0bb016 100644 --- a/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/BusTest.java +++ b/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/BusTest.java @@ -27,11 +27,10 @@ import java.net.MalformedURLException; import java.util.Arrays; import org.junit.Test; +import org.onap.dmaap.mr.client.MRClient.MRApiException; import org.onap.policy.utils.BusConsumer; import org.onap.policy.utils.BusPublisher; -import com.att.nsa.mr.client.MRClient.MRApiException; - public class BusTest { @Test diff --git a/TestSuite/Performance/pom.xml b/TestSuite/Performance/pom.xml index cbcca5284..7a5b6a16e 100644 --- a/TestSuite/Performance/pom.xml +++ b/TestSuite/Performance/pom.xml @@ -18,14 +18,12 @@ limitations under the License. ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine TestSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT Performance diff --git a/TestSuite/Stability/pom.xml b/TestSuite/Stability/pom.xml index 000a12b9c..d52038491 100644 --- a/TestSuite/Stability/pom.xml +++ b/TestSuite/Stability/pom.xml @@ -18,14 +18,12 @@ limitations under the License. ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine TestSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT Stability diff --git a/TestSuite/pom.xml b/TestSuite/pom.xml index 85ff36710..8c96319d3 100644 --- a/TestSuite/pom.xml +++ b/TestSuite/pom.xml @@ -18,14 +18,12 @@ limitations under the License. ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT TestSuite pom diff --git a/docs/platform/clc.rst b/docs/platform/clc.rst new file mode 100644 index 000000000..2b7ff7630 --- /dev/null +++ b/docs/platform/clc.rst @@ -0,0 +1,8 @@ + +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +************************************** +Policy Control Loop Coordination - POC +************************************** + diff --git a/docs/platform/cookbook.rst b/docs/platform/cookbook.rst index fee191358..c4a2c7cf3 100644 --- a/docs/platform/cookbook.rst +++ b/docs/platform/cookbook.rst @@ -6,11 +6,11 @@ Policy Cookbook *************** -Policy VM/Docker Recipes -^^^^^^^^^^^^^^^^^^^^^^^^ +Openstack Heat Installation - Policy VM/Docker Recipes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash - :caption: Get latest images in an already setup policy VM + :caption: Get the latest images in an already setup policy VM :linenos: /opt/policy_vm_init.sh @@ -31,60 +31,106 @@ Policy VM/Docker Recipes # This is the current default mode of instantiation. # These operations are unnecessary unless PRELOAD_POLICIES # was previously set to true - + echo "PRELOAD_POLICIES=true" > /opt/policy/.env /opt/policy_vm_init.sh .. code-block:: bash - :caption: Access the PDP-D container as a policy user + :caption: Access the PDP-D container as the policy user :linenos: docker exec -it drools bash .. code-block:: bash - :caption: Access the PDP-X container as a policy user + :caption: Access the PDP-X container as the policy user :linenos: docker exec -it -u 0 pdp su - policy .. code-block:: bash - :caption: Access the BRMSGW container as a policy user + :caption: Access the BRMSGW container as the policy user :linenos: docker exec -it -u 0 brmsgw su - policy .. code-block:: bash - :caption: Access PAP container as a policy user + :caption: Access PAP container as the policy user :linenos: docker exec -it -u 0 pap su - policy .. code-block:: bash - :caption: Access the CONSOLE container as a policy user + :caption: Access the CONSOLE container the a policy user :linenos: docker exec -it -u 0 console su - policy .. code-block:: bash - :caption: Manual Healthcheck invokation + :caption: Command line Healthcheck invokation :linenos: - # Assuming the healthcheck service credentials have not been changed - # post-installation within the drools container - source /opt/app/policy/config/feature-healthcheck.conf.environment - curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" - -X GET http://localhost:6969/healthcheck | python -m json.tool + curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" + -X GET https://localhost:6969/healthcheck | python -m json.tool + + +OOM Installation - Policy Kubernetes Recipes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + .. code-block:: bash + :caption: List the policy pods + :linenos: + + kubectl get pods -n onap -o wide | grep policy + + + .. code-block:: bash + :caption: Access the PAP container + :linenos: + + kubectl exec -it -c pap -n onap bash + + + .. code-block:: bash + :caption: Access a PDPD-D container + :linenos: + + # depends on the deployment configuration + + kubectl exec -it -drools-0 -c drools -n onap bash + + + .. code-block:: bash + :caption: Access the PDP container + :linenos: + + # depends on the deployment configuration + + kubectl exec -it -pdp-0 -c drools -n onap bash + + + .. code-block:: bash + :caption: Push Default Policies + :linenos: + + kubectl exec -it -c pap -n onap -- bash -c "export PRELOAD_POLICIES=true; /tmp/policy-install/config/push-policies.sh" + + + .. code-block:: bash + :caption: Standalone Policy Web UI URL access + :linenos: + http://:30219/onap/login.htm -PDP-D Recipes ("drools" container) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +PDP-D Recipes (inside the "drools" container) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash :caption: Stop the PDP-D @@ -104,12 +150,61 @@ PDP-D Recipes ("drools" container) :caption: Manual Healthcheck Invokation :linenos: - # Assuming the healthcheck service credentials have not been changed - # post-installation within the drools container - source ${POLICY_HOME}/config/feature-healthcheck.conf - curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" - -X GET http://localhost:6969/healthcheck | python -m json.tool + curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" + -X GET https://localhost:6969/healthcheck | python -m json.tool + + + .. code-block:: bash + :caption: Start a telemetry shell + :linenos: + + telemetry + + + .. code-block:: bash + :caption: See all the configured loggers + :linenos: + + curl -k --silent --user "${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" + https://localhost:9696/policy/pdp/engine/tools/loggers + + + .. code-block:: bash + :caption: See the logging level for a given logger (for example the network logger): + :linenos: + + curl -k --silent --user"${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" + https://localhost:9696/policy/pdp/engine/tools/loggers/network + + + .. code-block:: bash + :caption: Modify the logging level for a given logger (for example the network logger): + :linenos: + + curl -k --silent --user"${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" + -X PUT https://localhost:9696/policy/pdp/engine/tools/loggers/network/WARN + + +PAP Recipes (inside the "pap" container) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + .. code-block:: bash + :caption: Bypass Portal Authentication with the Policy Web UI + :linenos: + + edit: /opt/app/policy/servers/console/webapps/onap/WEB-INF/classes/portal.properties + comment out: #role_access_centralized = remote + restart pap: policy.sh stop; policy.sh start; + + + .. code-block:: bash + :caption: Access the Policy Web UI without going through the Portal UI + :linenos: + + https://:8443/onap/login.htm (Heat) + https://:30219/onap/login.htm (Kubernetes) + End of Document diff --git a/docs/platform/index.rst b/docs/platform/index.rst index 91336e4fe..0bac8a09d 100644 --- a/docs/platform/index.rst +++ b/docs/platform/index.rst @@ -29,6 +29,16 @@ Policy Software Architecture :maxdepth: 1 swarch_pdp.rst + swarch_pdpx.rst + swarch_pap.rst + swarch_brmsgw.rst + +PDP-D Features +---------------------------- + +.. toctree:: + :maxdepth: 1 + feature_eelf.rst feature_testtransaction.rst feature_healthcheck.rst @@ -37,9 +47,7 @@ Policy Software Architecture feature_activestdbymgmt.rst feature_locking.rst feature_pooling.rst - swarch_pdpx.rst - swarch_pap.rst - swarch_brmsgw.rst + Policy Platform Tutorials ------------------------- @@ -62,6 +70,4 @@ Policy Platform Tutorials modAAIdata.rst oofhpa.rst oofSpec.rst - - - + clc.rst diff --git a/docs/platform/installation.rst b/docs/platform/installation.rst index 0f068ea8f..987c69511 100644 --- a/docs/platform/installation.rst +++ b/docs/platform/installation.rst @@ -42,15 +42,14 @@ ONAP Policy requires all the *policy* modules from the ONAP repository. It also ## the ONAP repos to clone onap_repos="\ - policy/api \ + policy/parent \ policy/common \ policy/docker \ policy/drools-applications \ policy/drools-pdp \ policy/engine \ - policy/gui \ - policy/pap \ - policy/pdp" + policy/apex-pdp \ + policy/distribution" ## ## Help screen and exit condition (i.e. too few arguments) @@ -135,15 +134,14 @@ Execution of the script above results in the following directory hierarchy in yo * ~/git/onap * ~/git/onap/policy - * ~/git/onap/policy/api + * ~/git/onap/policy/parent * ~/git/onap/policy/common * ~/git/onap/policy/docker * ~/git/onap/policy/drools-applications * ~/git/onap/policy/drools-pdp * ~/git/onap/policy/engine - * ~/git/onap/policy/gui - * ~/git/onap/policy/pap - * ~/git/onap/policy/pdp + * ~/git/onap/policy/apex-pdp + * ~/git/onap/policy/distribution Building ONAP @@ -177,15 +175,13 @@ Building ONAP + parent common - engine - pdp - pap drools-pdp drools-applications - api - gui - docker + engine + apex-pdp + distribution @@ -219,10 +215,25 @@ The instructions here are based on the instructions in the file *~/git/onap/poli docker build -t onap/policy-drools policy-drools +**Step 3:** Build the Policy SDC Distribution docker image: + + .. code-block:: bash + + cd ~/git/onap/policy/distribution/packages + mvn clean install -Pdocker + +**Step 4:** Build the Apex PDP docker image: + + .. code-block:: bash + + cd ~/git/onap/policy/apex-pdp/packages/apex-pdp-docker/target + docker build -t onap/policy-apex-pdp policy-apex-pdp + + Starting the ONAP Policy Framework Docker Images ------------------------------------------------ -In order to run the containers, you can use *docker-compose*. This uses the *docker-compose.yml* yaml file to bring up the ONAP Policy Framework. +In order to run the containers, you can use *docker-compose*. This uses the *docker-compose.yml* yaml file to bring up the ONAP Policy Framework. This file is located in the policy/docker repository. **Step 1:** Make the file config/drools/drools-tweaks.sh executable. @@ -258,13 +269,12 @@ In order to run the containers, you can use *docker-compose*. This uses the *doc **You now have a full standalone ONAP Policy framework up and running!** -Installation of Controllers and Policies ----------------------------------------- +Installation of Drools Controllers and Policies +----------------------------------------------- -You may now install a controller and policies on the ONAP Policy Framework. Follow either of the HowTos below to install either the Amsterdam or Beijing controller and policies. +You may now install a controller and policies on the ONAP Policy Framework. Follow the HowTos below to install the Amsterdam controller and policies. * `Installation of Amsterdam Controller and vCPE Policy `_ - * `Installation of Beijing Controller and Policies `_ diff --git a/docs/platform/swarch_srm.rst b/docs/platform/swarch_srm.rst index 1483eb24e..af9eca33b 100644 --- a/docs/platform/swarch_srm.rst +++ b/docs/platform/swarch_srm.rst @@ -79,7 +79,7 @@ A policy healthcheck (with more detailed output) can be done directly by invokin # please modify configuration pre-installation at: # oom/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/keys/feature-healthcheck.conf - curl --silent --user 'healthcheck:zb!XztG34' -X GET http://localhost:30217/healthcheck | python -m json.tool + curl --silent --user 'demo@people.osaaf.org:demo123456!' -X GET http://localhost:30217/healthcheck | python -m json.tool { "details": [ { @@ -135,7 +135,7 @@ The following command can be issued on each of the PDP-D replicas IPs: # oom/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf - curl --silent --user '@1b3rt:31nst31n' -X GET http://:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool + curl --silent --user 'demo@people.osaaf.org:demo123456!' -X GET http://:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool { "alive": false, "artifactId": "NO-ARTIFACT-ID", @@ -260,7 +260,7 @@ The following command can be used for verifying each replica: # please modify configuration pre-installation at: # oom/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/base.conf - curl --silent --user '@1b3rt:31nst31n' -X GET http://:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool + curl --silent --user 'demo@people.osaaf.org:demo123456!' -X GET http://:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool { "alive": true, @@ -521,7 +521,7 @@ Verification that the restarted PDP-D 0 comes up with the appropriate policy loa .. code-block:: bash :caption: Verifying restarted PDP-D points to policies pre-failure. - ubuntu@k8sx:~$ curl --silent --user '@1b3rt:31nst31n' -X GET http://10.42.10.21:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool + ubuntu@k8sx:~$ curl --silent --user 'demo@people.osaaf.org:demo123456!' -X GET http://10.42.10.21:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool { "alive": true, "artifactId": "policy-amsterdam-rules", @@ -911,7 +911,7 @@ Verify that the new PDP-D comes up with the latest policy coordinates: .. code-block:: bash :caption: Verify new PDP-D 2 comes up with policies loaded - ubuntu@k8sx:~$ curl --silent --user '@1b3rt:31nst31n' -X GET http://10.42.172.88:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool + ubuntu@k8sx:~$ curl --silent --user 'demo@people.osaaf.org:demo123456!' -X GET http://10.42.172.88:9696/policy/pdp/engine/controllers/amsterdam/drools | python -m json.tool { "alive": true, "artifactId": "policy-amsterdam-rules", diff --git a/packages/base/pom.xml b/packages/base/pom.xml index fb95511d1..f5b936b44 100755 --- a/packages/base/pom.xml +++ b/packages/base/pom.xml @@ -18,15 +18,14 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine packages - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT base @@ -221,7 +220,7 @@ /bin/bash -c - mkdir -p target ; echo -e 'version="${project.version}"\ndescription="Open ONAP Policy Engine"\nbuildTag="'"${BUILD_TAG}"'"\ncommit="'"${GIT_COMMIT}"'"\ntimestamp="${maven.build.timestamp}"' >target/build.info + mkdir -p target ; echo -e 'version="${project.version}"\ndescription="Open ONAP Policy Engine"\nbuildTag="'"${BUILD_TAG}"'"\ncommit="'"${GIT_COMMIT}"'"\ntimestamp="${maven.build.timestamp}"' >target/build.info diff --git a/packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties b/packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties index ad27cd09e..315fb4d67 100644 --- a/packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties +++ b/packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties @@ -137,6 +137,7 @@ ENVIRONMENT=${{ENVIRONMENT}} xacml.rest.pep.idfile = client.properties #AAF cadi properties +enable_aaf=false policy.aaf.namespace = ${{AAF_NAMESPACE}} policy.aaf.root.permission=${{AAF_NAMESPACE}}.pdpx cm_url=https://${{AAF_HOST}}:8095/AAF_NS.cm:2.1 @@ -150,6 +151,8 @@ cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_ cadi_keystore=${{POLICY_HOME}}/etc/ssl/policy-keystore cadi_keystore_password=${{KEYSTORE_PASSWD}} cadi_key_password=${{KEYSTORE_PASSWD}} +cadi_truststore=${{POLICY_HOME}}/etc/ssl/policy-truststore +cadi_truststore_password=${{TRUSTSTORE_PASSWD}} aaf_env=DEV aaf_url=https://${{AAF_HOST}}:8095/AAF_NS.service:2.1 aaf_fqdn=${{AAF_HOST}} diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml index 6d88647ef..04a65adcb 100644 --- a/packages/docker/pom.xml +++ b/packages/docker/pom.xml @@ -18,15 +18,14 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine packages - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT docker diff --git a/packages/install/pom.xml b/packages/install/pom.xml index 4c66e808e..72a978de9 100644 --- a/packages/install/pom.xml +++ b/packages/install/pom.xml @@ -18,15 +18,14 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine packages - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT install diff --git a/packages/pom.xml b/packages/pom.xml index faca69272..a1dc9854f 100644 --- a/packages/pom.xml +++ b/packages/pom.xml @@ -18,13 +18,12 @@ ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT packages pom diff --git a/pom.xml b/pom.xml index dec4433d3..162ea8870 100644 --- a/pom.xml +++ b/pom.xml @@ -17,19 +17,17 @@ limitations under the License. ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.parent integration - 2.0.0 + 2.1.0-SNAPSHOT org.onap.policy.engine PolicyEngineSuite - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT pom policy-engine The ONAP Policy Engine main pom @@ -66,8 +64,8 @@ 1.3.3 1.18 6.3.0 - 1.3.1 - 1.3.1 + 1.4.0-SNAPSHOT + 1.4.0-SNAPSHOT PolicyEngineUtils diff --git a/version.properties b/version.properties index 19266e34c..c0fb9b16f 100644 --- a/version.properties +++ b/version.properties @@ -23,8 +23,8 @@ # because they are used in Jenkins, whose plug-in doesn't support major=1 -minor=3 -patch=1 +minor=4 +patch=0 base_version=${major}.${minor}.${patch}