NETCONF,REST southbound connectivity through minion

I am running my opennms instance in cloud. I have a minion installed on my private network. I am able to do scan and provisioning for devices in my network. I am trying to add an EMS module in OpenNMS. Through which I am trying to push configurations to my device using NETCONF.
I have integrated a Java NETCONF library(https://github.com/Juniper/netconf-java) with OpenNMS. Since my OpenNMS is in cloud I want the NETCONF RPCs to go via minion so that I can make connections using private ip of device.

Device device = Device.builder()
.hostName(hostName)
.userName(userName)
.password(password)
.hostKeysFileName(hostKeysFileName)
.build();

This is how I connect to device throgh netconf-library
How can I make it work ?

Any help on this question?

In order to add new types of RPCs you will need to implement the org.opennms.core.rpc.api.RpcModule interface and expose it on both OpenNMS & Minion.

This is not trivial, but there are a number of existing RpcModules you can look at including the PingSweepRpcModule, SnmpProxyRpcModule, CollectorClientRpcModule, etc…

Thanks. I couldn’t find how to make changes on minion

I added a module netconf, similar to snmp in core. Implemented the rpc-module also . Now I have a rest call which takes node id as input, I want to call a method inside my netconf module and the request need to go thorugh minion. How do I call it ?