@Test public void dispatchRequestDeviceAddTest() throws Exception { String response = m_aggregator.dispatchRequest(m_clientInfo, REQUEST_DEVICE_ADD); verify(m_deviceManagementProcessor).processRequest(eq(m_clientInfo), anyString()); assertFalse(response.isEmpty()); }
@Override public String dispatchRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { LOGGER.info("Aggregator dispatch request:\n {}", netconfRequest); AggregatorRpcMessage aggregatorRpcMessage = buildAggregatorRpcMessage(netconfRequest); String response; if (aggregatorRpcMessage.isNetworkManagerMessage()) { response = dispatchNetworkManageRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Network manager request response:\n {}", response); } else { response = dispatchGlobalRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Global request response:\n {}", response); } return response; }
AggregatorImpl implements Aggregator { @Override public String dispatchRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { LOGGER.info("Aggregator dispatch request:\n {}", netconfRequest); AggregatorRpcMessage aggregatorRpcMessage = buildAggregatorRpcMessage(netconfRequest); String response; if (aggregatorRpcMessage.isNetworkManagerMessage()) { response = dispatchNetworkManageRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Network manager request response:\n {}", response); } else { response = dispatchGlobalRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Global request response:\n {}", response); } return response; } }
AggregatorImpl implements Aggregator { @Override public String dispatchRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { LOGGER.info("Aggregator dispatch request:\n {}", netconfRequest); AggregatorRpcMessage aggregatorRpcMessage = buildAggregatorRpcMessage(netconfRequest); String response; if (aggregatorRpcMessage.isNetworkManagerMessage()) { response = dispatchNetworkManageRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Network manager request response:\n {}", response); } else { response = dispatchGlobalRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Global request response:\n {}", response); } return response; } AggregatorImpl(); }
AggregatorImpl implements Aggregator { @Override public String dispatchRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { LOGGER.info("Aggregator dispatch request:\n {}", netconfRequest); AggregatorRpcMessage aggregatorRpcMessage = buildAggregatorRpcMessage(netconfRequest); String response; if (aggregatorRpcMessage.isNetworkManagerMessage()) { response = dispatchNetworkManageRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Network manager request response:\n {}", response); } else { response = dispatchGlobalRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Global request response:\n {}", response); } return response; } AggregatorImpl(); @Override String dispatchRequest(NetconfClientInfo clientInfo, String netconfRequest); @Override void publishNotification(Notification notification); @Override void publishNotification(String deviceName, Notification notification); @Override void addProcessor(Set<ModuleIdentifier> moduleIdentifiers, GlobalRequestProcessor globalRequestProcessor); @Override void addProcessor(String deviceType, Set<ModuleIdentifier> moduleIdentifiers,
                             DeviceConfigProcessor deviceConfigProcessor); @Override void addProcessor(NotificationProcessor notificationProcessor); @Override void removeProcessor(GlobalRequestProcessor globalRequestProcessor); @Override void removeProcessor(DeviceConfigProcessor deviceConfigProcessor); @Override void removeProcessor(NotificationProcessor notificationProcessor); @Override void removeProcessor(String deviceType, Set<ModuleIdentifier> moduleIdentifiers,
                                DeviceConfigProcessor deviceConfigProcessor); @Override Set<String> getSystemCapabilities(); @Override void registerDeviceManager(DeviceManagementProcessor deviceManagementProcessor); @Override void unregisterDeviceManager(); @Override Set<ProcessorCapability> getProcessorCapabilities(); @Override Set<ModuleIdentifier> getModuleIdentifiers(); }
AggregatorImpl implements Aggregator { @Override public String dispatchRequest(NetconfClientInfo clientInfo, String netconfRequest) throws DispatchException { LOGGER.info("Aggregator dispatch request:\n {}", netconfRequest); AggregatorRpcMessage aggregatorRpcMessage = buildAggregatorRpcMessage(netconfRequest); String response; if (aggregatorRpcMessage.isNetworkManagerMessage()) { response = dispatchNetworkManageRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Network manager request response:\n {}", response); } else { response = dispatchGlobalRequest(clientInfo, aggregatorRpcMessage); LOGGER.info("Global request response:\n {}", response); } return response; } AggregatorImpl(); @Override String dispatchRequest(NetconfClientInfo clientInfo, String netconfRequest); @Override void publishNotification(Notification notification); @Override void publishNotification(String deviceName, Notification notification); @Override void addProcessor(Set<ModuleIdentifier> moduleIdentifiers, GlobalRequestProcessor globalRequestProcessor); @Override void addProcessor(String deviceType, Set<ModuleIdentifier> moduleIdentifiers,
                             DeviceConfigProcessor deviceConfigProcessor); @Override void addProcessor(NotificationProcessor notificationProcessor); @Override void removeProcessor(GlobalRequestProcessor globalRequestProcessor); @Override void removeProcessor(DeviceConfigProcessor deviceConfigProcessor); @Override void removeProcessor(NotificationProcessor notificationProcessor); @Override void removeProcessor(String deviceType, Set<ModuleIdentifier> moduleIdentifiers,
                                DeviceConfigProcessor deviceConfigProcessor); @Override Set<String> getSystemCapabilities(); @Override void registerDeviceManager(DeviceManagementProcessor deviceManagementProcessor); @Override void unregisterDeviceManager(); @Override Set<ProcessorCapability> getProcessorCapabilities(); @Override Set<ModuleIdentifier> getModuleIdentifiers();  }