NbiNetconfServerMessageListener implements NetconfServerMessageListener { @Override public void onCopyConfig(NetconfClientInfo info, CopyConfigRequest req, NetConfResponse resp) { logRpc(info, req); executeRequest(info, req, resp); logRpcResp(info, resp); } NbiNetconfServerMessageListener(NetconfServer coreNetconfServer, Aggregator aggregator); String executeNC(NetconfClientInfo clientInfo, String netconfRequest); void executeRequest(NetconfClientInfo clientInfo, AbstractNetconfRequest request, NetConfResponse response); @Override void onHello(NetconfClientInfo info, Set<String> clientCaps); @Override void onGet(NetconfClientInfo info, GetRequest req, NetConfResponse resp); @Override void onGetConfig(NetconfClientInfo info, GetConfigRequest req, NetConfResponse resp); @Override List<Notification> onEditConfig(NetconfClientInfo info, EditConfigRequest req, NetConfResponse resp); @Override void onCopyConfig(NetconfClientInfo info, CopyConfigRequest req, NetConfResponse resp); @Override void onDeleteConfig(NetconfClientInfo info, DeleteConfigRequest req, NetConfResponse resp); @Override void onLock(NetconfClientInfo info, LockRequest req, NetConfResponse resp); @Override void onUnlock(NetconfClientInfo info, UnLockRequest req, NetConfResponse resp); @Override void onCloseSession(NetconfClientInfo info, CloseSessionRequest req, NetConfResponse resp); @Override void onKillSession(NetconfClientInfo info, KillSessionRequest req, NetConfResponse resp); @Override void onInvalidRequest(NetconfClientInfo info, Document req, NetConfResponse resp); @Override void sessionClosed(String arg0, int sessionId); @Override List<Notification> onRpc(NetconfClientInfo info, NetconfRpcRequest rpcRequest, NetconfRpcResponse response); @Override void onCreateSubscription(NetconfClientInfo info, NetconfRpcRequest req, ResponseChannel responseChannel); @Override void onAction(NetconfClientInfo info, ActionRequest req, ActionResponse resp);  }
@Test public void onCopyConfig() { CopyConfigRequest req = new CopyConfigRequest(); req.setSource("running", false); req.setTarget("running", false); listener.onCopyConfig(client, req, resp); assertTrue(resp.isOk()); }