@Test public void testCreatePortChain() { portChainMgr.storageService = storageService; injectEventDispatcher(portChainMgr, new TestEventDispatcher()); portChainMgr.activate(); PortPairGroupId portPairGroupId = PortPairGroupId.of("73333333-fc23-aeb6-f44b-56dc5e2fb3ae"); portPairGroupList.add(portPairGroupId); portPairGroupId = PortPairGroupId.of("73333333-fc23-aeb6-f44b-56dc5e2fb3af"); portPairGroupList.add(portPairGroupId); FlowClassifierId flowClassifierId = FlowClassifierId.of("74444444-fc23-aeb6-f44b-56dc5e2fb3ae"); flowClassifierList.add(flowClassifierId); flowClassifierId = FlowClassifierId.of("74444444-fc23-aeb6-f44b-56dc5e2fb3af"); flowClassifierList.add(flowClassifierId); portChain = portChainBuilder.setId(portChainId).setTenantId(tenantId).setName(name).setDescription(description) .setPortPairGroups(portPairGroupList).setFlowClassifiers(flowClassifierList).build(); assertThat(portChainMgr.createPortChain(portChain), is(true)); }
@Override public boolean createPortChain(PortChain portChain) { checkNotNull(portChain, PORT_CHAIN_NULL); portChainStore.put(portChain.portChainId(), portChain); if (!portChainStore.containsKey(portChain.portChainId())) { log.error("The portChain created is failed which identifier was {}", portChain.portChainId() .toString()); return false; } return true; }
PortChainManager extends AbstractListenerManager<PortChainEvent, PortChainListener> implements
        PortChainService { @Override public boolean createPortChain(PortChain portChain) { checkNotNull(portChain, PORT_CHAIN_NULL); portChainStore.put(portChain.portChainId(), portChain); if (!portChainStore.containsKey(portChain.portChainId())) { log.error("The portChain created is failed which identifier was {}", portChain.portChainId() .toString()); return false; } return true; } }
PortChainManager extends AbstractListenerManager<PortChainEvent, PortChainListener> implements
        PortChainService { @Override public boolean createPortChain(PortChain portChain) { checkNotNull(portChain, PORT_CHAIN_NULL); portChainStore.put(portChain.portChainId(), portChain); if (!portChainStore.containsKey(portChain.portChainId())) { log.error("The portChain created is failed which identifier was {}", portChain.portChainId() .toString()); return false; } return true; }  }
PortChainManager extends AbstractListenerManager<PortChainEvent, PortChainListener> implements
        PortChainService { @Override public boolean createPortChain(PortChain portChain) { checkNotNull(portChain, PORT_CHAIN_NULL); portChainStore.put(portChain.portChainId(), portChain); if (!portChainStore.containsKey(portChain.portChainId())) { log.error("The portChain created is failed which identifier was {}", portChain.portChainId() .toString()); return false; } return true; }  @Activate void activate(); @Deactivate void deactivate(); @Override boolean exists(PortChainId portChainId); @Override int getPortChainCount(); @Override Iterable<PortChain> getPortChains(); @Override PortChain getPortChain(PortChainId portChainId); @Override boolean createPortChain(PortChain portChain); @Override boolean updatePortChain(PortChain portChain); @Override boolean removePortChain(PortChainId portChainId); }
PortChainManager extends AbstractListenerManager<PortChainEvent, PortChainListener> implements
        PortChainService { @Override public boolean createPortChain(PortChain portChain) { checkNotNull(portChain, PORT_CHAIN_NULL); portChainStore.put(portChain.portChainId(), portChain); if (!portChainStore.containsKey(portChain.portChainId())) { log.error("The portChain created is failed which identifier was {}", portChain.portChainId() .toString()); return false; } return true; }  @Activate void activate(); @Deactivate void deactivate(); @Override boolean exists(PortChainId portChainId); @Override int getPortChainCount(); @Override Iterable<PortChain> getPortChains(); @Override PortChain getPortChain(PortChainId portChainId); @Override boolean createPortChain(PortChain portChain); @Override boolean updatePortChain(PortChain portChain); @Override boolean removePortChain(PortChainId portChainId);  }