+ listMemberPropDefMapPath);
// now turn paths into augeas nodes
List<AugeasNode> existingListMemberNodes = new ArrayList<AugeasNode>();
for (String existingListMemberPath : existingListMemberPaths) {
existingListMemberNodes.add(new AugeasNode(existingListMemberPath));
}
Set<AugeasNode> updatedListMemberNodes = new HashSet<AugeasNode>();
for (Property listMemberProp : propList.getList()) {
PropertyMap listMemberPropMap = (PropertyMap) listMemberProp;
AugeasNode memberNodeToUpdate = getExistingChildNodeForListMemberPropertyMap(listNode, propDefList,
listMemberPropMap);
if (memberNodeToUpdate != null) {
// Keep track of the existing nodes that we'll be updating, so that we can remove all other existing
// nodes.
updatedListMemberNodes.add(memberNodeToUpdate);
} else {
// The maps in the list are non-keyed, or there is no map in the list with the same key as the map
// being added, so create a new node for the map to add to the list.
AugeasNode basePathNode = getNewListMemberNode(listNode, listMemberPropDefMap, listIndex);
String var = "prop" + listIndex;
String bpath = basePathNode.getPath();
augeas.defineNode(var, bpath, null);
memberNodeToUpdate = new AugeasNode("$" + var);
listIndex++;
}
// Update the node's children.
setNodeFromPropertyMap(listMemberPropDefMap, listMemberPropMap, augeas, memberNodeToUpdate);