diff options
author | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-15 12:53:18 -0400 |
---|---|---|
committer | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-15 13:55:23 -0400 |
commit | 7e547eaa55920dfbc9691eab33bb728395b50cf2 (patch) | |
tree | 5d0d64928b4754f65b427cb79b43718f16019582 /ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java | |
parent | dda032f8bb161d54eb1f59de2b4a3efb774fc4d1 (diff) |
Policy TestSuite Enabled
Change-Id: I9f98c7dcdcf98713d73544956d873a84fc82adf7
Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java')
-rw-r--r-- | ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java index 509da0b61..9e590732c 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java @@ -114,7 +114,7 @@ public class FirewallConfigPolicy extends Policy { LOGGER.debug("Configuration is succesfully saved"); } } catch (IOException e) { - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -372,7 +372,10 @@ public class FirewallConfigPolicy extends Policy { assignment2.setCategory(CATEGORY_RESOURCE); assignment2.setIssuer(""); AttributeValueType AttributeValue = new AttributeValueType(); - AttributeValue.setDataType(URI_DATATYPE); + AttributeValue.setDataType(URI_DATATYPE); + if (policyName.endsWith(".xml")) { + policyName = policyName.substring(0, policyName.lastIndexOf(".xml")); + } String content = CONFIG_URL + "/Config/" + policyName + ".json"; AttributeValue.getContent().add(content); @@ -1588,10 +1591,10 @@ public class FirewallConfigPolicy extends Policy { JsonNode updatedJason = null; try { - oldJason = JsonLoader.fromString(oldJson); - updatedJason = JsonLoader.fromString(json); + oldJason = JsonLoader.fromString(oldJson); + updatedJason = JsonLoader.fromString(json); } catch (IOException e) { - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } JsonPatch jsonPatch = JsonDiff.asJsonPatch(oldJason, updatedJason); |