Redfishtool 的安装和使用

Redfishtool是一个Python3命令行工具,实现了Redfish RESTful API的客户端,用于数据中心硬件管理。它提供了一系列方便的子命令,如GET、PATCH、POST等,用于操作如系统、 chassis、managers等资源。通过Redfishtool,用户可以执行类似于curl和Postman的HTTP请求,但其命令更简洁,且内置了一些管理操作。例如,可以创建、获取和删除用户账户,管理会话等。此外,该工具还支持HTTPS连接,并能验证远程服务支持的Redfish协议版本。

GitHub - DMTF/Redfishtool: A Python34 program that implements a command line tool for accessing the Redfish API.A Python34 program that implements a command line tool for accessing the Redfish API. - GitHub - DMTF/Redfishtool: A Python34 program that implements a command line tool for accessing the Redfish API.https://github.com/DMTF/RedfishtoolIPMI 有IPMItool, Redfish 有Redfishtool

redfishtool is a commandline tool that implements the client side of the Redfish RESTful API for Data Center Hardware Management. 
redfishtool是一个命令行工具,用于实现用于数据中心硬件管理的 Redfish RESTful API 的客户端。

Redfishtool 是DMTF用python3來開發的,我們可以透過Redfishtool 來下指令給redfish,通常很少會用到這個tool,因為postman和curl其實就很好用了,但基于好奇我决定装来玩看看,它的安裝指令

// Update the package ind
$ sudo apt-get update

// Install redfishtool deb package
$ sudo apt-get install redfishtool

安装成功后,可以下"redfishtool -V"来查看版本

$ redfishtool -V
redfishtool Version: 1.1.5

查看有哪些指令可以使用redfishtool -h

$ redfishtool -h
   Usage:
     redfishtool:    {} [OPTIONS]  <SubCommand> <operation> [<args>]...
     redfishtool:    {} [OPTIONS]  hmraw  <method> <hmUrl> [<data>]

  Common OPTIONS:
   -V,          --version           -- show redfishtool version, and exit
   -h,          --help              -- show Usage, Options, and list of subCommands, and exit
   -v,          --verbose           -- verbose level, can repeat up to 5 times for more verbose output
                              -v(header), -vv(+addl info), -vvv(Request trace), -vvvv(+subCmd dbg), -vvvvv(max dbg)
   -s,          --status            -- status level, can repeat up to 5 times for more status output
                               -s(http_status),
                               -ss(+r.url, +r.elapsed executionTime ),
                               -sss(+request hdrs,data,authType, +response status_code, +response executionTime,
                                    +login auth token/sessId/sessUri)
                               -ssss(+response headers), -sssss(+response data
   -u <user>,   --user=<usernm>     -- username used for remote redfish authentication
   -p <passwd>, --password=<passwd> -- password used for remote redfish authentication
   -r <rhost>,  --rhost=<rhost>     -- remote redfish service hostname or IP:port
   -t <token>,  --token=<token>     -- redfish auth session token-for sessions across multiple calls
   -q,          --quiet             -- quiet mode--suppress error, warning, and diagnostic messages
   -c <cfgFile>,--config=<cfgFile>  -- read options (including credentials) from file <cfgFile>
   -T <timeout>,--Timeout=<timeout> -- timeout in seconds for each http request.  Default=10

   -P <property>, --Prop=<property> -- return only the specified property. Applies only to all "get" operations
   -E, --Entries                    -- Fetch the Logs entries. Applies to Logs sub-command of Systems, Chassis and Managers

  Options used by "raw" subcommand:
   -d <data>    --data=<data>       -- the http request "data" to send on PATCH,POST,or PUT requests

  Options to specify top-level collection members: eg: Systems -I <sysId>
   -I <Id>, --Id=<Id>               -- Use <Id> to specify the collection member
   -M <prop>:<val&
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值