Skip to content
Snippets Groups Projects
Commit ed53744f authored by Johannes Mey's avatar Johannes Mey
Browse files

send whole config and not just changed parts per living partition or nothing if lp has not changed

parent 48d8672e
Branches
No related tags found
No related merge requests found
......@@ -305,10 +305,12 @@ public class ERISConnector {
JSONObject result = new JSONObject();
for (String path : partitionStorageConfigAttributes.keySet()) {
JSONArray storageConfigurationGroups = new JSONArray();
// for each living partition
for (List<String> accessPathList : partitionStorageConfigAttributes.get(path).keySet()) {
boolean configChanged = false;
for (String attributeId : partitionStorageConfigAttributes.get(path).get(accessPathList)) {
if (attributeId.equals(""))
continue;
......@@ -322,12 +324,12 @@ public class ERISConnector {
String key = path + "/" + attributeId;
String value = accessPathList.get(0) + "_" + accessPathList.get(1) + "_" + accessPathList.get(2);
if (this.currentAccessPaths.containsKey(key) && this.currentAccessPaths.get(key).contains(value)) {
logger.debug("known config found, not sending a request again");
} else {
jsonArrayAttributes.put(attribute);
configChanged = true;
}
jsonArrayAttributes.put(attribute);
jsonGroup.put("attributes", jsonArrayAttributes);
if (!jsonArrayAttributes.isEmpty()) {
if (!jsonArrayAttributes.isEmpty() && configChanged) {
storageConfigurationGroups.put(jsonGroup);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment