[c-nsp] Netconf (over SSHv2) in SXI

Phil Mayers p.mayers at imperial.ac.uk
Mon Feb 2 11:17:05 EST 2009


On Mon, Feb 02, 2009 at 12:11:23PM +0000, Lincoln Dale wrote:
>Phil Mayers wrote:
>> Does anyone have working examples talking to the netconf 
>> implementation in 12.2(33)SXI? Or pointers to libraries / code that 
>> works?
>> [..]
>> <rpc ... xmlns:cpi="http://www.cisc.com/cpi_10/schema">
>>  <get>
>>    <filter>
>>      <cpi:config-format-cli-ios-text-cmd> ... </..>
>>      <cpi:cli-operational-data>
>>     <show>arp</show>
>>      </cpi:cli...>
>>
>> ...I get error messages about the cpi: namespace and "debug cns xml" 
>> on the box tells me the XML stanzas in that namespace have no handler.
>i have worked extensively with Netconf/XML on NX-OS on Nexus 7000.
>
>whatever you're requesting needs to match the schema.  based on my 
>experience, i think you'll most likely need to modify what you have to:
>    <show><arp /></show>

That directly contradicts Cisco's examples.

Can you share the xml for any non-trivial thing you have working? I have 
literally tried every combo of xml and namespacing I can imagine.

This for example fails:

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" \
		      xmlns:cpi="http://www.cisco.com/cpi_10/schema">
   <edit-config>
      <target>
	 <running/>
      </target>
      <config>
	 <cpi:cli-config-data>
	    <cmd>hostname test</cmd>
	    <cmd>interface fastEthernet0/1</cmd>
	    <cmd>ip address 192.168.1.1 255.255.255.0</cmd>
	 </cpi:cli-config-data>
      </config>
   </edit-config>
</rpc>

The netconf session reports:

<rpc-reply xmlns="urn:ietf:params:netconf:base:1.0">
  <rpc-error>
    <error-type>rpc</error-type>
    <error-tag>unknown-element</error-tag>
    <error-severity>error</error-severity>
    <error-info>
      <bad-element>cli-config-data</bad-element>
    </error-info>
  </rpc-error>
</rpc-reply>

...whilst "debug cns xml" says:

CNS XML Parser: ERROR - no handler for tag <cli-config-data>

*All* the cisco examples I have found fail the same way - elements from 
their namespace:

  http://www.cisco.com/cpi_10/schema

...are just not recognized.

>
>that is purely a guess - but checking the XML schema definition (XSD) 
>that should also be posted on cisco.com will let you verify.

The only XSD I can find is inside the docs I referenced in my tinyurl 
link, and it's minimal at best - it certainly does not document that.

>>
>> It seems like netconf would be really useful for automating IOS; has 
>> anyone made it work?
>yes, on N7K at least. :)

It seems it doesn't do anything useful on 12.2(33)SXI :o(


More information about the cisco-nsp mailing list