Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Policy TestSuite Enabled
[policy/engine.git]
/
ECOMP-PAP-REST
/
src
/
main
/
java
/
org
/
openecomp
/
policy
/
pap
/
xacml
/
rest
/
components
/
FirewallConfigPolicy.java
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
509da0b
..
9e59073
100644
(file)
--- 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) {
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();
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);
String content = CONFIG_URL + "/Config/" + policyName + ".json";
AttributeValue.getContent().add(content);
@@
-1588,10
+1591,10
@@
public class FirewallConfigPolicy extends Policy {
JsonNode updatedJason = null;
try {
JsonNode updatedJason = null;
try {
- oldJason = JsonLoader.fromString(oldJson);
- updatedJason = JsonLoader.fromString(json);
+
oldJason = JsonLoader.fromString(oldJson);
+
updatedJason = JsonLoader.fromString(json);
} catch (IOException e) {
} catch (IOException e) {
-
e.printStackTrace(
);
+
LOGGER.error("Exception Occured"+e
);
}
JsonPatch jsonPatch = JsonDiff.asJsonPatch(oldJason, updatedJason);
}
JsonPatch jsonPatch = JsonDiff.asJsonPatch(oldJason, updatedJason);