cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
462
Views
0
Helpful
3
Replies

RESTCONF API Call Results Differ

JamesMathis
Level 1
Level 1

We have encountered a strange issue with our ASR 1001x routers.  We use RESTCONF to add IP's to a blocklist object group.  Recently we had to remove an IP from that blocklist.  In the CLI, we do not see the IP.  However, when we run a GET method using RESTCONF for that object group, we do see the IP.  Has anyone ever experienced this before?  Is there something we are missing?

We are putting together an automated workflow and have four routers to run this workflow against.  We need to make sure that we have consistent results so we can successfully complete this automation. 

This is the cURL we are running:
curl --request GET --insecure -H 'Content-Type: application/yang-data+json' -u 'un:pw' https://X.X.X.X/restconf/data/Cisco-IOS-XE-native:native/object-group/Cisco-IOS-XE-object-group:network=blacklist_sources/obj-Mode-config-network-group/host

We can confirm that with a PATCH method, the IP is added.  We have not approached removing IP's with RESTCONF as this is another phase of the project.  But we cannot understand why we see differences in the CLI.

3 Replies 3

Interesting.  Are you saying that each time we make a change with RESTCONF, we would need to run a full commit or refresh operation?  If so, do you know how to do that with RESTCONF?

@JamesMathis as far as i know there is no direct "commit" or "refresh" operation like in some other configuration management protocols using RESTCONF. 

I found this https://bst.cisco.com/quickview/bug/CSCwk43646 - reading over this, it matches your issue

  • Synchronization failure between running configuration and NETCONF/RESTCONF data stores
  • Potential inconsistencies when viewing configuration through different interfaces

Might be worth a TAC call or exploring more bugs for your software version.

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

Interesting case! It could be that the difference between CLI and RESTCONF views is a caching or synchronization issue on your routers configuration management plane. I’ve seen some inconsistencies between the management interfaces, especially during configuration changes, not this one, but my memory isn’t the best these day, something is sound familiar tho.

I wonder if this is a config sync delay between different management planes?

 

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