Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gkeishin/redfishbmc_tools
A redfish tools for performing operation using redfish API from DMTF
https://github.com/gkeishin/redfishbmc_tools
Last synced: 19 days ago
JSON representation
A redfish tools for performing operation using redfish API from DMTF
- Host: GitHub
- URL: https://github.com/gkeishin/redfishbmc_tools
- Owner: gkeishin
- Created: 2018-08-08T05:48:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-11T14:20:50.000Z (over 5 years ago)
- Last Synced: 2024-03-05T06:48:54.271Z (10 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# redfishbmc_tools
A redfish tools for performing operation using redfish API from DMTFRefer for more on DMTF: https://github.com/DMTF/python-redfish-library
```
$ pip install redfish
```# Usage: #
* Command line support:
```
usage: redfish_cmd.py [OPTIONS]Process redfish request.
optional arguments:
-h, --help show this help message and exit
--target_ip TARGET_IP
BMC target IP. (default: None)
--username USERNAME BMC target user name. (default: root)
--password PASSWORD BMC target password. (default: 0penBmc)
--request REQUEST GET, PUT, POST, PATCH, DELETE. (default: GET)
--url URL URL path /redfish/v1/ (default: None)
--op OP list, enumerate RESTful like (default: None)
```* For root: /redfish/v1/
```
$ python redfish_cmd.py --target_ip xx.xx.xx.xx --request GET --url ""
IP: xx.xx.xx.xx
{
"@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
"@odata.id": "/redfish/v1/",
"@odata.type": "#ServiceRoot.v1_1_1.ServiceRoot",
"AccountService": {
"@odata.id": "/redfish/v1/AccountService"
},
"Chassis": {
"@odata.id": "/redfish/v1/Chassis"
},
"Id": "RootService",
"Links": {
"Sessions": {
"@odata.id": "/redfish/v1/SessionService/Sessions"
}
},
"Managers": {
"@odata.id": "/redfish/v1/Managers"
},
"Name": "Root Service",
"RedfishVersion": "1.1.0",
"SessionService": {
"@odata.id": "/redfish/v1/SessionService/"
},
"Systems": {
"@odata.id": "/redfish/v1/Systems"
},
"UUID": "00000000-0000-0000-0000-000000000000",
"UpdateService": {
"@odata.id": "/redfish/v1/UpdateService"
}
}
```* For other resource say "Systems"
```
$ python redfish_cmd.py --target_ip xx.xx.xx.xx --request GET --url "Systems"
IP: xx.xx.xx.xx
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystemCollection.ComputerSystemCollection",
"@odata.id": "/redfish/v1/Systems",
"@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/motherboard"
}
],
"[email protected]": 1,
"Name": "Computer System Collection"
}
```* For resource listing
```
$ python redfish_cmd.py --target_ip xx.xx.xx.xx --url "" --op list
IP: xx.xx.xx.xx/redfish/v1/list
/redfish/v1/Managers
/redfish/v1/Links
/redfish/v1/AccountService
/redfish/v1/UpdateService
/redfish/v1/Chassis
/redfish/v1/Systems
/redfish/v1/SessionService```