-
- Status status = validate(container, (NodeFlow) entry);
- if (!status.isSuccess()) {
- logger.warn("Invalid Configuration for flow {}. The failure is {}", entry, status.getDescription());
- String error = "Invalid Configuration (" + status.getDescription() + ")";
- logger.error(error);
- return;
- }
- // Presence check
- if (flowEntryExists((NodeFlow) entry)) {
- String error = "Entry with this name on specified table already exists";
- logger.warn("Entry with this name on specified table already exists: {}", entry);
- logger.error(error);
- return;
- }
- if (originalSwView.containsKey(entry)) {
- logger.warn("Operation Rejected: A flow with same match and priority exists on the target node");
- logger.trace("Aborting to install {}", entry);
- continue;
- }
- if (!FRMUtil.validateMatch((NodeFlow) entry)) {
- logger.error("Not a valid Match");
- return;
- }
- if (!FRMUtil.validateInstructions((NodeFlow) entry)) {
- logger.error("Not a valid Instruction");
- return;
- }
- if (entry.getValue() instanceof Flow) {
- Flow flow = (Flow) entry.getValue();
- preparePutEntry(entry.getKey(), flow);
+ DataObject value = entry.getValue();
+ if(value instanceof Flow ) {
+ Flow flow = (Flow)value;
+ boolean status = validate(flow);
+ if (!status) {
+ return;
+ }
+ // Presence check
+ /*
+ * This is breaking due to some improper use of caches...
+ *
+ if (flowEntryExists(flow)) {
+ String error = "Entry with this name on specified table already exists";
+ logger.warn("Entry with this name on specified table already exists: {}", entry);
+ logger.error(error);
+ return;
+ }
+ if (originalSwView.containsKey(entry)) {
+ logger.warn("Operation Rejected: A flow with same match and priority exists on the target node");
+ logger.trace("Aborting to install {}", entry);
+ continue;
+ }
+ */
+ if (!FRMUtil.validateMatch(flow)) {
+ logger.error("Not a valid Match");
+ return;
+ }
+ if (!FRMUtil.validateInstructions(flow)) {
+ logger.error("Not a valid Instruction");
+ return;
+ }
+ /*
+ * Commented out due to Clustering Services issues
+ * preparePutEntry(entry.getKey(), flow);
+ */