- Status status;
- if (target.installInHw()) {
- status = this.removeEntry(target.getFlowEntry(), false);
- } else {
- status = this.addEntry(target.getFlowEntry(), false);
+ Status status = (target.installInHw()) ? this.uninstallFlowEntry(target.getFlowEntry()) : this
+ .installFlowEntry(target.getFlowEntry());
+ if (status.isSuccess()) {
+ // Update Configuration database
+ target.setStatus(SUCCESS);
+ target.toggleInstallation();
+ staticFlows.put(key, target);