Delete netconf Change-Id: I69f0c921df155606d296f448b11297c7382795c8 Signed-off-by: Tomas Cere <tcere@cisco.com>
Decouple config and netconf subsystems. Extract a common mapping for config pusher and config subsystem netconf Add a ConfigPersisterFacade for XML that allows reads/writes from/to config subsystem using XML format Push notifications from YangStoreService to NetconfNotificationManager instead of using custom listeners Migrate netconf features from controller features, untangle features Change-Id: I71e4ca6e0258e0b1f0d6c19119f93eb9d68b7bca Signed-off-by: Tomas Cere <tcere@cisco.com> Signed-off-by: Maros Marsalek <mmarsale@cisco.com> Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Revert "BUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier" This reverts commit 8bedb6be52f21b52d6df08d1501cf46f8ddbdbdc. Change-Id: I52d02ae6a980bae6798385636f9d779e3c80b72d Signed-off-by: Maros Marsalek <mmarsale@cisco.com> Signed-off-by: Tomas Cere <tcere@cisco.com> Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Fix various netconf warnings Overridden version, potentially static methods. Change-Id: I54af7e8b48335b4b81594d4deeb0f75e21dbc932 Signed-off-by: Robert Varga <rovarga@cisco.com> (cherry picked from commit 2660b697228bb3e708a556b53e06a89d5ea00440)
Fix deadlock in AsyncSshHandlerWriter Ssh window resize would call write twice, while a write pending was in progress causing a deadlock because the underlying channelSession was already locked. Change-Id: I3a1498084327f12b2010744e570644259532b975 Signed-off-by: Tomas Cere <tcere@cisco.com>
BUG-2838: Trim leading whitespaces from incoming NETCONF messages. Some network devices (such as Cisco routers) send RPC replies with a leading newline before the XML declaration. The OpenDaylight controller does not accept those replies: the XML parsing fails. This patch fixes the NETCONF messages before they are sent to the XML parser: it removes all the spurious characters at the beginning of the messages. Change-Id: Ibc6eb6dc5bad6252a3c9bed73d3db83814aff501 Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@b-com.com> Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
BUG-3301 Extract additional header properly on each OS On Windows, the additional header in hello netconf message was no fully extracted and it left \n byte in front on netconf xml hello message. This is not allowed as long as the <?xml ... > declaration is present. Change-Id: I611a5c689e86fb45065e6a9cd3b14cd5718af54f Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
BUG-2961 Disable auth and idle timeout for netconf connector The timeouts appeared in the mina SSHD lib in version 14 and are not suitable for netconf connector. Change-Id: I05f0feb58ef30d12a29eefa53ec5ccf300cb3123 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Fix racecondition in AsyncSshHandlerWriter Fixed racecondition between releasing of netty ByteBuff and removing the msg from pendingWrites. Change-Id: I40eff55d9c7858534d105a242d3ec6feb9d950d0 Signed-off-by: Tomas Cere <tcere@cisco.com>
Custom BufferedWriter implementation without newLine() This BufferedWriter does not provide newLine() method and does not read the line.separator property via AccessController when its initialized. Whithout this expensive call, its allocation is much faster. Used in netconf message encoder to make the netconf serialization faster. Change-Id: I88a65c7a82ff7c44b9ad3a3adfe7d7482a5fdc70 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Increase default negotiation timeout for netconf server to 30s 5s is a bit too short. especially when testing. Change-Id: I47a1ccedab596c78e9d1ba314679d0b542722889 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
BUG-2878: Add the XML declaration to every outgoing NETCONF message. Cisco routers expect that NETCONF messages are prefixed by the XML declaration <?xml version="1.0" encoding="UTF-8"?>. Else, they close the NETCONF/SSH connection and log an error such as "NETCONF-ERROR: parse error before hello seen". This patch adds the XML declaration to every outgoing NETCONF message so that Cisco routers accept NETCONF messages coming from the OpenDaylight controller. This is a workaround for the sake of interoperability: according to RFC 6241, the XML declaration is optional so Cisco routers should accept NETCONF messages without XML declaration. See RFC 6241 section 3 "XML Considerations": A NETCONF message MAY begin with an XML declaration (see Section 2.8 of [W3C.REC-xml-20001006]). Change-Id: I04a8b61a8fcef6738e8a4552f0560aa319add014 Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@b-com.com>
BUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier Change-Id: I76b94b896e138e778f0a6abd6d42a481347f1a13 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
BUG-2560 Canonical write to remote netconf devices Current sequence for writing to remote netconf devices: Writable running only: - lock running or fail - edit running (unlock on fail) - unlock running Candidate only: - lock candidate -- if lock fails, try to discard changes --- if discard fails, fail --- if discard succeeds, lock candidate ---- if lock fails, fail - edit candidate (discard-changes + unlock on fail) - commit - unlock candidate Both writable running and candidate: - lock running or fail - SAME AS FOR CANDIDATE ONLY - unlock running Change-Id: Ia4e0d43f3131c4072e8505ba72ef09ff441c1fac Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
BUG-2459: reuse EXI Reader The reader performs an internal reset on each invocation of parse(), so it can be freely reused as long as we guarantee there are no concurrent invocations. Our decoder class is not Shared, so netty guarantees this. Change-Id: Icd575988e48ca5252d6f6716f4e08f83b23c99ca Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-2459: reuse EXI Transmogrifier EXI Transmogrifier performs an internal reset whenever we acquire the SAXTransmogrifier. This means that we are free to reuse the instance between individual invocations as long as we can guarantee there are no concurrent access. That is guaranteed by our Handler not being Shared. Change-Id: Iba141915000b016579b273d4413ecd205f8da777 Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge changes Ic8cadf33,If59b1dd3 * changes: Bug-2342: Add stress test with more threads and start of testtool device. Bug-2342: Fixing rpc-reply messages id's get mixed up
BUG-2459: maintain a cache of grammar caches This just reuses instances across multiple sessions, since the cardinality is usually low. Change-Id: Icd18348eee51295f50e224572c103e3b5572963b Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-2459: cache GrammarCache The GrammarCache without a schema is used as a template, so it is expliticly okay to reuse it across multiple instances. Make sure we reuse it as much as possible. Change-Id: I0e642b1b580051e997de9602020ab0dace7dbcac Signed-off-by: Robert Varga <rovarga@cisco.com>