Comments (9)
With this patch:
diff --git a/jnc/src/com/tailf/jnc/NetconfSession.java b/jnc/src/com/tailf/jnc/NetconfSession.java
index 0d25abe..60a4124 100644
--- a/jnc/src/com/tailf/jnc/NetconfSession.java
+++ b/jnc/src/com/tailf/jnc/NetconfSession.java
@@ -1559,6 +1559,7 @@ public class NetconfSession {
* side are the base NETCONF capability.
*/
void encode_hello(Transport out) {
+ out.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
out.print("<hello xmlns=\"" + Capabilities.NS_NETCONF + "\">");
out.print("<capabilities>");
out.println("<capability>" + Capabilities.NETCONF_BASE_CAPABILITY
It will negotiate a hello
.
However, it then dies as follows:
*NetconfSession: reply=
<?xml version="1.0" encoding="UTF-8"?><rpc-reply xmlns="urn:ietf:params:netconf:base:1.0"><rpc-error><error-type>rpc</error-type><error-tag>missing-element</error-tag><error-severity>error</error-severity><error-info><bad-element>xml</bad-element></error-info></rpc-error></rpc-reply>
[Fatal Error] :2:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
Exception in thread "main" Parse error: parse error: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.tailf.jnc.XMLParser.parse(XMLParser.java:139)
at com.tailf.jnc.XMLParser.parse(XMLParser.java:154)
at com.tailf.jnc.NetconfSession.recv_rpc_reply(NetconfSession.java:1483)
at com.tailf.jnc.NetconfSession.recv_rpc_reply_data(NetconfSession.java:1460)
at com.tailf.jnc.NetconfSession.getConfig(NetconfSession.java:443)
at com.tailf.jnc.NetconfSession.getConfig(NetconfSession.java:433)
at testnetconf.TestNetconf.main(TestNetconf.java:46)
It looks like JNC really neither wants to send or receive <?xml ... ?>
but the Cisco insists on it. Who is right here?
from jnc.
Apparently both JNC and the Cisco are broken.
From RFC 6241 section 3:
A NETCONF message MAY begin with an XML declaration (see Section 2.8 of [W3C.REC-xml-20001006]).
MAY
in RFC terms means this is optional. The Cisco is therefore at fault for requiring it on Netconf commands received. JNC is also at fault in refusing to accept responses containing it.
from jnc.
The Cisco CSR1000v doesn't have a working netconf impl.
that can be used. No need to pursue that ...
/klacke
On 16/11/14 23:00, Alex Bligh wrote:
Apparently both JNC and the Cisco are broken.
From RFC 6241 section 3:
A NETCONF message MAY begin with an XML declaration (see Section 2.8 of [W3C.REC-xml-20001006]).
|MAY| in RFC terms means this is optional. The Cisco is therefore at
fault for requiring it on Netconf commands received. JNC is also at
fault in refusing to accept responses containing it.—
Reply to this email directly or view it on GitHub
#38 (comment).
from jnc.
Dear @klacke
can you give me the document which describe "The Cisco CSR1000v doesn't have a working netconf impl." Thanks
from jnc.
Don't have such a doc, I just know this. XR has working
netconf by now, not IOS.
They have something, but it's not NETCONF, just NETCONFish.
/klacke
On 03/12/14 01:09, t-anh wrote:
Dear @klacke https://github.com/klacke
can you give me the document which describe "The Cisco CSR1000v doesn't
have a working netconf impl." Thanks—
Reply to this email directly or view it on GitHub
#38 (comment).
from jnc.
Now I'm using Cisco CSR 1000v 3.11s, and it support NETCONF.
from jnc.
Hello ,
Can i have the whole list on devices that support NETCONF ?
thank you
2014-12-04 11:10 GMT+01:00 t-anh [email protected]:
Now I'm using Cisco CSR 1000v 3.11s, and it support NETCONF.
—
Reply to this email directly or view it on GitHub
#38 (comment).
[image: UBIqube Solutions] http://www.ubiqube.com
Said MALAH / R&D Apprentice Enginner
+33 (0)7 53 65 01 75/ [email protected]
UBIqube Solutions Office: +33 438 498 364 / Fax: +33 438 498 361
Parc Sud Galaxie 5, rue des Tropiques 38130 Échirolles France
www.ubiqube.com
[image: Facebook] http://www.facebook.com/saiid.junior [image:
Twitter] http://www.twitter.com/Saiid.juni0r [image: Instagram]
http://instagram.com/Said_Malah [image: Skype]
http://skype.com/SAID+MALAH
from jnc.
t-anh: I opened this issue precisely because neither Cisco CSR 1000v (3.12) nor JNC appear to follow the Netconf standard:
Apparently both JNC and the Cisco are broken.
From RFC 6241 section 3:
A NETCONF message MAY begin with an XML declaration (see Section 2.8 of [W3C.REC-xml-20001006]).
MAY in RFC terms means this is optional. The Cisco is therefore at fault for requiring it on Netconf commands received. JNC is also at fault in refusing to accept responses containing it.
from jnc.
I agree that the <?xml header should be both sent and received by JNC. Needs to be fixed.
As for the NETCONF impl on CSR 1000v , maybe you know more than me here, but
last time I looked it was completely worthless. You're stumbling on the <?xml header, if
you were to get pass that, the list of anomalies continues forever. Furthermore, the payload
was just CLI commands wrapped in garbled XML.
The CSR 1000v NETCONF is probably just there to fill a tickmark in some RFQ.
from jnc.
Related Issues (20)
- 1-interfaces example re-defines standard modules
- raw input to subscribers is broken
- jnc.py does not generate correct Java `import` statements for typedefs from imported modules
- `FramingTest.java` seems to use Java 11 features in "Java 8" declared JNC library HOT 1
- Path tokenizer encodes a string to bytes just to decode it back later.
- Device.connect got stuck HOT 3
- Error during generating .java classes for yang files using jnc HOT 4
- Typedef is not converted to Java class HOT 1
- NPE on getting attribute which doesn't exist HOT 3
- pyang_jnc : Convert multiple yang files at once HOT 1
- New session creation is failing HOT 24
- Getting "Key exchange was not finished, connection is closed" exception HOT 4
- Session closed HOT 5
- convert `trace` to `slf4j`
- Special character in mehtod toXMLString not getting escaped. HOT 1
- Issue related to conversion of yang to java classes. HOT 1
- Getting unhashable type: 'JavaMethod' when pyang 2.5.2 is using python3 HOT 1
- resolve errors/warnings reported by flake8 (or other python linter) HOT 1
- JNC & python supported version / requirement HOT 1
- JNC & Java supported version / requirement HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnc.