python-redfish-library icon indicating copy to clipboard operation
python-redfish-library copied to clipboard

Problem using skip and expand params

Open lesomora opened this issue 3 years ago • 3 comments

Hello

I'm need some help. On my redfish API i have 1152 devices. If i did the request to /redfish/v1/systems only show 500 devices to see other devices i need use skip or expand, but that querys parameters doesnt work.

i have tried this /redfish/v1/systems/?$skip=1150

lesomora avatar Jul 29 '21 20:07 lesomora

Can you please show us the code you're using with the library to perform the query? It should look something like this:

system_collection_response = redfish_obj.get( "/redfish/v1/systems", args = "$skip=1150" )

Also, please make sure the library is up to date (version 3.0.0 or higher); query support was not functional in earlier versions. You can check your library's version with:

pip3 show redfish

mraineri avatar Jul 29 '21 22:07 mraineri

Hi mraineri

I have tried this:

ConnObject.get("/redfish/v1/Systems", headers=self.authheaders, args="$skip=1150").text

that option args="$skip=1150" return to me None value

pip3 show redfish output:

pip3 show redfish Name: redfish Version: 3.0.0 Summary: Redfish Python Library Home-page: https://github.com/DMTF/python-redfish-library Author: DMTF, https://www.dmtf.org/standards/feedback Author-email: None License: BSD 3-clause "New" or "Revised License" Location: /usr/local/lib/python3.6/site-packages Requires: jsonpath-rw, jsonpatch, jsonpointer

lesomora avatar Jul 30 '21 12:07 lesomora

Thanks; a few things to try:

  • Can you remove headers=self.authheaders? The library handles adding authentication headers underneath the covers.
  • What's the value of ConnObject.get("/redfish/v1/Systems", args="$skip=1150").status?
  • Can you send the output of the following curl commands?
    • curl -k -u <username>:<password> -D - 'https://<bmc-ip>/redfish/v1/'
    • curl -k -u <username>:<password> -D - 'https://<bmc-ip>/redfish/v1/Systems'
    • curl -k -u <username>:<password> -D - 'https://<bmc-ip>/redfish/v1/Systems?$skip=1150'

mraineri avatar Aug 02 '21 12:08 mraineri