python-redfish-library
python-redfish-library copied to clipboard
Problem using skip and expand params
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
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
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
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'
-