summaryrefslogtreecommitdiffstats
path: root/ECOMP-PDP-REST
diff options
context:
space:
mode:
authorITSERVICES\rb7147 <rb7147@att.com>2017-05-08 22:20:44 -0400
committerITSERVICES\rb7147 <rb7147@att.com>2017-05-09 13:58:03 -0400
commitdda032f8bb161d54eb1f59de2b4a3efb774fc4d1 (patch)
tree9a11825d59434d97bb0c7dcbf00a0b84e7e5f526 /ECOMP-PDP-REST
parenta330af579866dacbe595e2e4ad1dd29cd3c96945 (diff)
Policy 1707 Second commit
Change-Id: I18f5b142238733d17280cf17c3d1dd28204d34e9 Signed-off-by: ITSERVICES\rb7147 <rb7147@att.com>
Diffstat (limited to 'ECOMP-PDP-REST')
-rw-r--r--ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java18
-rw-r--r--ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java4
-rw-r--r--ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java13
-rw-r--r--ECOMP-PDP-REST/xacml.pdp.properties2
4 files changed, 18 insertions, 19 deletions
diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java
index b00346de6..5aa3360ca 100644
--- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java
+++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/PAPServices.java
@@ -611,19 +611,21 @@ public class PAPServices {
response = "Transaction ID: " + requestID + " --Policy with the name "+ connection.getHeaderField("policyName")
+ " was successfully updated. ";
if (connection.getHeaderField("safetyChecker")!=null) {
- response = response + "\nPolicy Safety Checker Warning: This closedLoopControlName ("
- + connection.getHeaderField("newCLName") + ") " + "is potentially in conflict with " + connection.getHeaderField("conflictCLName")
- + "that already exists." + "See detailed information on ClosedLoop Pairs below: "
- +"\n"+connection.getHeaderField("safetyChecker");
+ response = response
+ + "\n\nPolicy Safety Checker Warning: This closedLoopControlName "
+ + "is potentially in conflict with " + connection.getHeaderField("conflictCLName")
+ + " that already exists." + " See detailed information on ClosedLoop Pairs below: "
+ +"\n\n"+connection.getHeaderField("safetyChecker");
}
} else if ("create".equals(operation)) {
response = "Transaction ID: " + requestID + " --Policy with the name "+ connection.getHeaderField("policyName")
+ " was successfully created.";
if (connection.getHeaderField("safetyChecker")!=null) {
- response = response + "\nPolicy Safety Checker Warning: This closedLoopControlName ("
- + connection.getHeaderField("newCLName") + ") " + "is potentially in conflict with " + connection.getHeaderField("conflictCLName")
- + "that already exists." + "See detailed information on ClosedLoop Pairs below: "
- +"\n"+connection.getHeaderField("safetyChecker");
+ response = response
+ + "\n\nPolicy Safety Checker Warning: This closedLoopControlName "
+ + "is potentially in conflict with " + connection.getHeaderField("conflictCLName")
+ + " that already exists. " + "See detailed information on ClosedLoop Pairs below: "
+ +"\n\n"+connection.getHeaderField("safetyChecker");
}
} else if ("delete".equals(operation)) {
response = "Transaction ID: " + requestID + " --The policy was successfully deleted.";
diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java
index 5f62be3ac..1acc18eb0 100644
--- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java
+++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/ManualNotificationUpdateThread.java
@@ -41,6 +41,7 @@ import com.att.nsa.cambria.client.CambriaConsumer;
import com.att.nsa.cambria.client.CambriaPublisher;
import com.att.research.xacml.util.XACMLProperties;
+@SuppressWarnings("deprecation")
public class ManualNotificationUpdateThread implements Runnable {
private static final Logger LOGGER = FlexLogger.getLogger(ManualNotificationUpdateThread.class);
@@ -139,8 +140,7 @@ public class ManualNotificationUpdateThread implements Runnable {
try {
throw new Exception(XACMLErrorConstants.ERROR_DATA_ISSUE + "DMaaP properties are missing from the property file ");
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e);
}
}
diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java
index fe295ebb8..cb1cf9f03 100644
--- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java
+++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/notifications/NotificationServer.java
@@ -158,15 +158,12 @@ public class NotificationServer {
// to succeed before giving up. If any messages are unsent after that time,
// they're returned to your app. You could, for example, persist to disk
// and try again later.
- final List stuck = pub.close ( 20, TimeUnit.SECONDS );
+ final List<?> stuck = pub.close ( 20, TimeUnit.SECONDS );
- if ( stuck.size () > 0 )
- {
- System.err.println ( stuck.size() + " messages unsent" );
- }
- else
- {
- System.out.println ( "Clean exit; all messages sent: " + notification );
+ if ( stuck.size () > 0 ){
+ LOGGER.error( stuck.size() + " messages unsent" );
+ }else{
+ LOGGER.info( "Clean exit; all messages sent: " + notification );
}
} else if (propNotificationType.equals("dmaap")) {
diff --git a/ECOMP-PDP-REST/xacml.pdp.properties b/ECOMP-PDP-REST/xacml.pdp.properties
index f9b564136..f87d5404e 100644
--- a/ECOMP-PDP-REST/xacml.pdp.properties
+++ b/ECOMP-PDP-REST/xacml.pdp.properties
@@ -47,7 +47,7 @@ xacml.att.policyFinderFactory=org.openecomp.policy.pdp.rest.XACMLPdpPolicyFinder
# When set to true, this flag tells the StdPolicyFinderFactory to combined all the root policy files into
# into one PolicySet and use the given Policy Algorithm.
#
-xacml.att.policyFinderFactory.combineRootPolicies=urn:com:att:xacml:3.0:policy-combining-algorithm:combined-deny-overrides
+xacml.att.policyFinderFactory.combineRootPolicies=urn:com:att:xacml:3.0:policy-combining-algorithm:combined-permit-overrides
#
# PDP RESTful API properties
#