cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
442
Views
2
Helpful
3
Replies

C9800 get info using netconf

guilhermebrato
Level 1
Level 1

Hello guys,

I want to use netconf to get status from C9800.

Particularly this tang model, I know i have two pass two information, mac and slot id but not sure how to do it using xpath.

module: Cisco-IOS-XE-wireless-access-point-oper 
+--ro access-point-oper-data
+--ro ap-radio-audit-info* [wtp-mac radio-slot-id]

 

Here is my code for the filter, but doesn't seems to work. need a hand to figure this out.

 

ap_radio_audit_info_filter = etree.Element("{urn:ietf:params:xml:ns:netconf:base:1.0}filter",
                               type="xpath",
                               nsmap = {None: 'urn:cisco:com:ns:yang:Cisco-IOS-XE-wireless-access-point-oper'},
                               select = "/access-point-oper-data/ap-radio-audit-info[wtp-mac='xx:xx:xx:xx:xx:xx'][radio-slot-id='1']")

 

3 Replies 3

Marcel Zehnder
Spotlight
Spotlight

Hi 

"radio-slot-id" is a uint8  so you propaply need to change your xpath to
"/access-point-oper-data/ap-radio-audit-info[wtp-mac='xx:xx:xx:xx:xx:xx'][radio-slot-id=1]"

However with the WLC I have access to, there seems to be a problem with this path, im not able to get any info - neither RESTCONF nor NETCONF is working:

RESTCONF GET /restconf/data/Cisco-IOS-XE-wireless-access-point-oper:access-point-oper-data/ap-radio-audit-info returns 204/no content.

NETCONF get with xpath-filter 
/access-point-oper-data/ap-radio-audit-info returns an empty data section:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2de73f9f-f73e-4c44-8417-cf7bfe461de3" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><data></data></rpc-reply>

Cheers
Marcel

 

Take a look at https://developer.cisco.com/yangsuite/ this can be very helpful in finding the information you need for YANG and Netconf.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Ruben Cocheno
Spotlight
Spotlight

@guilhermebrato 

Still facing the issue?All sorted?

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/