[ONOS-4837] NETCONF function for FUJITSU OLT #4 and #5
- Add the following commands for FJ OLT
volt-onus <netconf:target> <ONU ID>
volt-setonu <netconf:target> <ONU-ID:parameter type:parameter value>
volt-onustats <netconf:target> {ONU-ID}
volt-rebootonu <netconf:target> <ONU-ID>
volt-ethloopback <netconf:target> <ONU-ETH-ID[:loopback mode]>
- Add the method of doUserRpc() in Netconfsession/NetconfSessionImpl
*If you dont allow to implement the method, i can move it to our XmlUtility method.
- Add new behaviours in /core/.../net/behaviour, and @Beta in the interface.
- Move those behaviour interface to fujitsu driver directory.
* VoltPonLinkConfig.java as well.
- Update fujitsu-drivers.xml
- Change the method name from doUserRpc to doWrappedRpc
Change-Id: Ic39d3a11ba35d2377e552af097eda65c5554c63f
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionImpl.java
index 8c0f6b7..e359641 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionImpl.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionImpl.java
@@ -289,6 +289,24 @@
}
@Override
+ public String doWrappedRpc(String request) throws NetconfException {
+ StringBuilder rpc = new StringBuilder(XML_HEADER);
+ rpc.append(RPC_OPEN);
+ rpc.append(MESSAGE_ID_STRING);
+ rpc.append(EQUAL);
+ rpc.append("\"");
+ rpc.append(messageIdInteger.get());
+ rpc.append("\" ");
+ rpc.append(NETCONF_BASE_NAMESPACE).append(">\n");
+ rpc.append(request);
+ rpc.append(RPC_CLOSE).append(NEW_LINE);
+ rpc.append(ENDPATTERN);
+ String reply = sendRequest(rpc.toString());
+ checkReply(reply);
+ return reply;
+ }
+
+ @Override
public String get(String request) throws NetconfException {
return requestSync(request);
}