@Test public void testUpdateFlowClassifier() { testCreateFlowClassifier(); final String name2 = "FlowClassifier2"; final String description2 = "FlowClassifier2"; final String ethType2 = "IPv6"; final String protocol2 = "tcp"; final TenantId tenantId2 = TenantId.tenantId("10"); final VirtualPortId virtualSrcPort2 = VirtualPortId.portId("300"); final VirtualPortId virtualDstPort2 = VirtualPortId.portId("400"); flowClassifier = flowClassifierBuilder.setFlowClassifierId(flowClassifierId) .setTenantId(tenantId2).setName(name2).setDescription(description2).setEtherType(ethType2) .setProtocol(protocol2).setMinSrcPortRange(minSrcPortRange).setMaxSrcPortRange(maxSrcPortRange) .setMinDstPortRange(minDstPortRange).setMaxDstPortRange(maxDstPortRange).setSrcIpPrefix(srcIpPrefix) .setDstIpPrefix(dstIpPrefix).setSrcPort(virtualSrcPort2).setDstPort(virtualDstPort2).build(); assertThat(flowClassifierMgr.updateFlowClassifier(flowClassifier), is(true)); }
@Override public boolean updateFlowClassifier(FlowClassifier flowClassifier) { checkNotNull(flowClassifier, FLOW_CLASSIFIER_NOT_NULL); if (!flowClassifierStore.containsKey(flowClassifier.flowClassifierId())) { log.debug("The flowClassifier is not exist whose identifier was {} ", flowClassifier.flowClassifierId() .toString()); return false; } flowClassifierStore.put(flowClassifier.flowClassifierId(), flowClassifier); if (!flowClassifier.equals(flowClassifierStore.get(flowClassifier.flowClassifierId()))) { log.debug("Updation of flowClassifier is failed whose identifier was {} ", flowClassifier .flowClassifierId().toString()); return false; } return true; }
FlowClassifierManager extends AbstractListenerManager<FlowClassifierEvent, FlowClassifierListener> implements FlowClassifierService { @Override public boolean updateFlowClassifier(FlowClassifier flowClassifier) { checkNotNull(flowClassifier, FLOW_CLASSIFIER_NOT_NULL); if (!flowClassifierStore.containsKey(flowClassifier.flowClassifierId())) { log.debug("The flowClassifier is not exist whose identifier was {} ", flowClassifier.flowClassifierId() .toString()); return false; } flowClassifierStore.put(flowClassifier.flowClassifierId(), flowClassifier); if (!flowClassifier.equals(flowClassifierStore.get(flowClassifier.flowClassifierId()))) { log.debug("Updation of flowClassifier is failed whose identifier was {} ", flowClassifier .flowClassifierId().toString()); return false; } return true; } }
FlowClassifierManager extends AbstractListenerManager<FlowClassifierEvent, FlowClassifierListener> implements FlowClassifierService { @Override public boolean updateFlowClassifier(FlowClassifier flowClassifier) { checkNotNull(flowClassifier, FLOW_CLASSIFIER_NOT_NULL); if (!flowClassifierStore.containsKey(flowClassifier.flowClassifierId())) { log.debug("The flowClassifier is not exist whose identifier was {} ", flowClassifier.flowClassifierId() .toString()); return false; } flowClassifierStore.put(flowClassifier.flowClassifierId(), flowClassifier); if (!flowClassifier.equals(flowClassifierStore.get(flowClassifier.flowClassifierId()))) { log.debug("Updation of flowClassifier is failed whose identifier was {} ", flowClassifier .flowClassifierId().toString()); return false; } return true; }  }
FlowClassifierManager extends AbstractListenerManager<FlowClassifierEvent, FlowClassifierListener> implements FlowClassifierService { @Override public boolean updateFlowClassifier(FlowClassifier flowClassifier) { checkNotNull(flowClassifier, FLOW_CLASSIFIER_NOT_NULL); if (!flowClassifierStore.containsKey(flowClassifier.flowClassifierId())) { log.debug("The flowClassifier is not exist whose identifier was {} ", flowClassifier.flowClassifierId() .toString()); return false; } flowClassifierStore.put(flowClassifier.flowClassifierId(), flowClassifier); if (!flowClassifier.equals(flowClassifierStore.get(flowClassifier.flowClassifierId()))) { log.debug("Updation of flowClassifier is failed whose identifier was {} ", flowClassifier .flowClassifierId().toString()); return false; } return true; }  @Override boolean exists(FlowClassifierId id); @Override int getFlowClassifierCount(); @Override Iterable<FlowClassifier> getFlowClassifiers(); @Override FlowClassifier getFlowClassifier(FlowClassifierId id); @Override boolean createFlowClassifier(FlowClassifier flowClassifier); @Override boolean updateFlowClassifier(FlowClassifier flowClassifier); @Override boolean removeFlowClassifier(FlowClassifierId id); }
FlowClassifierManager extends AbstractListenerManager<FlowClassifierEvent, FlowClassifierListener> implements FlowClassifierService { @Override public boolean updateFlowClassifier(FlowClassifier flowClassifier) { checkNotNull(flowClassifier, FLOW_CLASSIFIER_NOT_NULL); if (!flowClassifierStore.containsKey(flowClassifier.flowClassifierId())) { log.debug("The flowClassifier is not exist whose identifier was {} ", flowClassifier.flowClassifierId() .toString()); return false; } flowClassifierStore.put(flowClassifier.flowClassifierId(), flowClassifier); if (!flowClassifier.equals(flowClassifierStore.get(flowClassifier.flowClassifierId()))) { log.debug("Updation of flowClassifier is failed whose identifier was {} ", flowClassifier .flowClassifierId().toString()); return false; } return true; }  @Override boolean exists(FlowClassifierId id); @Override int getFlowClassifierCount(); @Override Iterable<FlowClassifier> getFlowClassifiers(); @Override FlowClassifier getFlowClassifier(FlowClassifierId id); @Override boolean createFlowClassifier(FlowClassifier flowClassifier); @Override boolean updateFlowClassifier(FlowClassifier flowClassifier); @Override boolean removeFlowClassifier(FlowClassifierId id);  }