cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1093
Views
20
Helpful
2
Replies

Getting contents of Flash or Available Space via RESTCONF/REST API

BradRenner
Level 1
Level 1

I am trying to automate the upgrading of an IOS XE device using REST/RESTCONF and the accompany YANG data models. Using: https://{{device}}/restconf/data/Cisco-IOS-XE-install-rpc:install/ , for example, one can configure the body of the POST call to initialize the install RPC via RESTCONF and one-shot upgrade the device. The body of the POST call would look something like this in JSON:

{
    "Cisco-IOS-XE-install-rpc:input": {
        "uuid""test",
        "one-shot"true,
        "path""bootflash:image.x.x.x.SPA.bin"
    }
}
 
This is all working correctly. I can also copy the files via this RESTCONF API call: https://{{device}}/restconf/data/Cisco-IOS-XE-rpc:copy as well (if you'd like the body JSON of this I can provide it, but it works). What would be helpful would be to find out what Yang module or REST API call I can use to query the contents of the IOS XE device's flash (to verify the copy was successful and the file exists on the device) and/or a REST API call to display the available space left in the device's flash
 
I have been using Cisco's YangSuite to parse the many Yang modules available for my IOS XE device, but I am still having trouble finding any that will return the contents of a device's flash or the amount of space available in