diff options
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); |