Merge "SchemaSourceCache init using YangModuleInfo"
[netconf.git] / netconf / tools / netconf-testtool / README.adoc
index cfdefdff9c6b2a3674a60a2ac8a83af09ebda606..8072acb2091f5deb060928cabded482718a91753 100644 (file)
@@ -52,6 +52,19 @@ public class RpcHandlerImpl implements RpcHandler {
     }
 }
 
+----
+* Override operations creator org.opendaylight.netconf.test.tool.operations.OperationsCreator
+  in order to inject custom simulated behavior.
+----
+public class OperationsCreatorImpl implements OperationsCreator {
+    @Override
+    public NetconfOperationService getNetconfOperationService(Set<Capability> capabilities,
+            SessionIdProvider idProvider,
+            String netconfSessionIdForReporting) {
+            ...
+            return netconfOperationService;
+    }
+}
 ----
 * Start NetConf device simulator in your code
 ----
@@ -62,6 +75,7 @@ public class Main {
                 .setModels(models)
                 .setCapabilities(capabilities)
                 .setRpcHandler(new RpcHandlerImpl())
+                .setOperationsCreator(new OperationsCreatorImpl());
                 .build();
         NetConfDeviceSimulator netConfDeviceSimulator =
                 new NetConfDeviceSimulator(configuration);