{"id":13648210,"url":"https://github.com/DMTF/Redfishtool","last_synced_at":"2025-04-22T07:30:52.672Z","repository":{"id":39667579,"uuid":"69603283","full_name":"DMTF/Redfishtool","owner":"DMTF","description":"A Python34 program that implements a command line tool for accessing the Redfish API.","archived":false,"fork":false,"pushed_at":"2024-08-23T19:26:30.000Z","size":428,"stargazers_count":246,"open_issues_count":11,"forks_count":69,"subscribers_count":48,"default_branch":"main","last_synced_at":"2025-04-12T16:48:50.859Z","etag":null,"topics":["redfish"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DMTF.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-29T20:01:16.000Z","updated_at":"2025-04-01T08:18:24.000Z","dependencies_parsed_at":"2022-07-14T03:40:37.818Z","dependency_job_id":"99efe1f4-7fde-405b-9112-1e884d31f288","html_url":"https://github.com/DMTF/Redfishtool","commit_stats":{"total_commits":86,"total_committers":15,"mean_commits":5.733333333333333,"dds":0.627906976744186,"last_synced_commit":"102776163126f715e702ee879c89a3b0d2d1a8f4"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMTF%2FRedfishtool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMTF%2FRedfishtool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMTF%2FRedfishtool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMTF%2FRedfishtool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DMTF","download_url":"https://codeload.github.com/DMTF/Redfishtool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250195033,"owners_count":21390230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["redfish"],"created_at":"2024-08-02T01:04:03.666Z","updated_at":"2025-04-22T07:30:52.374Z","avatar_url":"https://github.com/DMTF.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Copyright 2016-2018 DMTF. All rights reserved.\n\n# redfishtool\n\n## About\n\n***redfishtool*** is a commandline tool that implements the client side of the Redfish RESTful API for Data Center Hardware Management.\n\n**Redfish** is the new RESTful API for hardware management defined by the DMTF Scalable Platform Management Forum (SPMF).  It provides a modern, secure, multi-node, extendable interface for doing hardware management.  The initial release included hardware inventory, server power-on/off/reset, reading power draw, setting power limits, reading sensors such as fans, read/write of ID LEDs, asset tags, and went beyond IPMI in functionality to include inventory of processors, storage, Ethernet controllers, and total memory.  New Redfish extensions have now been added to the spec and include firmware update, BIOS config, memory inventory, direct attached storage control, and the list grows.\n\n***redfishtool*** makes it simple to use the Redfish API from a BASH script or interactively from a client command shell.\n\nWhile other generic HTTP clients such as Linux curl can send and receive Redfish requests, ***redfishtool*** goes well beyond these generic HTTP clients by automatically handling many of the hypermedia and Redfish-specific protocol aspects of the Redfish API that require a client to often execute multiple queries to a redfish service to walk the hypermedia links from the redfish root down to the detailed URI of a specific resource (eg Processor-2 of Blade-4 in a computer blade system).  Specifically, redfishtool provides the following functions over curl:\n\n* implements Redfish Session Authentication as well as HTTP Basic Auth\n* walks the Redfish schema following strict interoperpbility processors...] to find find the targeted instance based on Id, UUID, URL or other attributes\n* handles GETs for collections that are returned in multiple pieces--requiring client to read in a loop until the full collection is returned\n* handles ETag and If-Match headers when PATCHing a resource to write properties\n* implements many common set or action operations with simple commandline syntax (eg server reset, setting LEDs, assetTag, powerLimits, etc)\n* negotiates the latest redfish protocol version between client and service (demonstrating the proper way to do this)\n* can read specific properties of a resource, or expand collections to include all members of the collection expanded\n* supports adding and deleting users, and common Redfish account service operations\n* For debug, provides multiple levels of verbose output to add descriptive headers, and show what HTTP requests are being executed\n* For debug, includes multiple levels of status display showing HTTP status codes and headers returned and sent \n* For easy parsing, outputs all responses in JSON format unless verbose or status debug options were specified \n\n\n## Why redfishtool?\n\n1. ***redfishtool*** was originally written during the development of the Redfish specification to help find ambiguities in the spec.\n1. ***redfishtool*** is now also being used to test interoperability between redfish service implementations.\n1. In addition, ***redfishtool*** provides an example implementation for how a client can execute common server management functions like inventory; power-on/off/reset; setting power limits, indicator LEDs, and AssetTags, and searching a multi-node redfish service to find a specific node (with specific UUID, redfish Id, etc).  redfishtool follows strict rules of interoperability.  To support this goal, liberal comments are added throughout code to explain why each step is being executed.\n1. As described above, it makes it easy to use the Redfish API from a BASH script, or as an easy-to-use interactive CLI -- but WITHOUIT creating a 'new API'.   All (rather most) of the responses from ***redfishtool*** are Redfish-defined responses.  The properties and resources are defined in the redfish spec.   ***redfishtool*** is just a tool to access the Redfish API-not a new interface itself.\n    * The exception is that a 'list' operation was added for all collections to display the key properties for each of the members--rather than just the URIs to the members.\n\n\n## Installation\n`redfishtool` can be installed via [pip](https://pip.pypa.io/en/stable/).\n\n```\npip install redfishtool\n```\n\n\n## Requirements\n\n***redfishtool*** is based on Python 3 and the client system is required to have the Python framework installed before the tool can be installed and executed on the system.\n\nIf cloning the tool from Github, as opposed to performing the installation via pip, the following packages are required to be installed and accessible from the python environment:\n\n* requests - [https://github.com/psf/requests]()\n* python-dateutil - [https://github.com/dateutil/dateutil]()\n\nYou may install the required packages by running:\n\n    pip install -r requirements.txt\n\n\n## Usage\n\n***python***  ***redfishtool*** [ ***Options*** ] [ ***SubCommands*** ] [ ***Operation*** ] [ ***OtherArgs*** ]\n\n* ***redfishtool*** is a python3.4+ program.  It uses the python3 \"requests\" lib for sending HTTP requests, and a host of other standard libs in python3.4+\n* The ***redfishtool*** option/optarg parsing strictly follows the well established linux/GNU getopt syntax where arguments and options can be specified in any order, and both short (eg `-r \u003chost\u003e`) or long (`--rhost=\u003chost\u003e`) syntax is supported.\n* ***options*** are used to pass usernames, passwords, Host:port, authentication options, verbose/status flags, and also to specify how to search to find specific collection members (`-I \u003cId\u003e`, `-a (all)`, `-M \u003cprop\u003e:\u003cval\u003e` ).\n* ***subCommands*** indicate the general area of the API (following ipmitool convention), and align with Redfish navigation property names like \"Chassis\", \"Systems\", \"AccountService\", etc.\n* ***Operations*** are specify an action or operation you want to perform like `Systems setBootOverride` ..., or `Systems reset`.\n* ***OtherArgs*** are any other arguments after the Operation that are sometimes required--like:  `Systems \u003csetBootOverride\u003e \u003cenableValue\u003e \u003ctargetValue\u003e`\n\n### Common OPTIONS:\n\n    -V,          --version           -- show redfishtool version, and exit\n    -h,          --help              -- show Usage, Options, and list of subCommands, and exit\n    -v,          --verbose           -- verbose level, can repeat up to 5 times for more verbose output\n                               -v(header), -vv(+addl info), -vvv(Request trace), -vvvv(+subCmd dbg), -vvvvv(max dbg)\n    -s,          --status            -- status level, can repeat up to 5 times for more status output\n                                -s(http_status), \n                                -ss(+r.url, +r.elapsed executionTime ), \n                                -sss(+request hdrs,data,authType, +response status_code, +response executionTime, \n                                     +login auth token/sessId/sessUri)\n                                -ssss(+response headers), -sssss(+response data\n    -u \u003cuser\u003e,   --user=\u003cusernm\u003e     -- username used for remote redfish authentication\n    -p \u003cpasswd\u003e, --password=\u003cpasswd\u003e -- password used for remote redfish authentication\n    -r \u003crhost\u003e,  --rhost=\u003crhost\u003e     -- remote redfish service hostname or IP:port\n    -t \u003ctoken\u003e,  --token=\u003ctoken\u003e     -- redfish auth session token-for sessions across multiple calls\n    -q,          --quiet             -- quiet mode--suppress error, warning, and diagnostic messages\n    -c \u003ccfgFile\u003e,--config=\u003ccfgFile\u003e  -- read options (including credentials) from file \u003ccfgFile\u003e\n    -T \u003ctimeout\u003e,--Timeout=\u003ctimeout\u003e -- timeout in seconds for each http request.  Default=10\n\n    -P \u003cproperty\u003e, --Prop=\u003cproperty\u003e -- return only the specified property. Applies only to all \"get\" operations\n    -E, --Entries                    -- Fetch the Logs entries. Applies to Logs sub-command of Systems, Chassis and Managers\n\n\n###### Options used by \"raw\" subcommand:\n\n    -d \u003cdata\u003e    --data=\u003cdata\u003e       -- the http request \"data\" to send on PATCH,POST,or PUT requests\n\n\n###### Options to specify top-level collection members: eg: `Systems -I \u003csysId\u003e`\nFor `Systems`, `Managers`, and `Chassis` commands that require specifying a top-level collection member, if no option is specified the default is `--One`.\n\n    -I \u003cId\u003e, --Id=\u003cId\u003e               -- Use \u003cId\u003e to specify the collection member\n    -M \u003cprop\u003e:\u003cval\u003e --Match=\u003cprop\u003e:\u003cval\u003e-- Use \u003cprop\u003e=\u003cval\u003e search to find the collection member\n    -F,  --First                     -- Use the 1st link returned in the collection or 1st \"matching\" link if used with -M\n    -1,  --One                       -- Use the single link returned in the collection. Return error if more than one member exists\n    -a,  --all                       -- Returns all members if the operation is a Get on a top-level collection like Systems\n    -L \u003cLink\u003e,  --Link=\u003cLink\u003e        -- Use \u003cLink\u003e (eg /redfish/v1/Systems/1) to reference the collection member. \n                                     --   If \u003cLink\u003e is not one of the links in the collection, and error is returned.\n\n\n###### Options to specify 2nd-level collection members: eg: `Systems -I\u003csysId\u003e Processors -i\u003cprocId\u003e`\n\n    -i \u003cid\u003e, --id=\u003cid\u003e               -- use \u003cid\u003e to specify the 2nd-level collection member\n    -m \u003cprop\u003e:\u003cval\u003e --match=\u003cprop\u003e:val\u003e--use \u003cprop\u003e=\u003cval\u003e search of 2nd-level collection to specify member\n    -l \u003clink\u003e  --link=\u003clink\u003e         -- Use \u003clink\u003e (eg /redfish/v1/SYstems/1/Processors/1) to reference a 2nd level resource\n                                     --   A -I|M|F|1|L option is still required to specify the link to the top-lvl collection\n    -a,  --all                       -- Returns all members of the 2nd level collection if the operation is a Get on the \n                                     --   2nd level collection (eg Processors). -I|M|F|1|L still specifies the top-lvl collection.\n\n\n###### Additional OPTIONS:\n\n    -W \u003cnum\u003e:\u003cconnTimeout\u003e,          -- Send up to \u003cnum\u003e {GET /redfish} requests with \u003cconnTimeout\u003e TCP connection timeout\n          --Wait=\u003cnum\u003e:\u003cConnTimeout\u003e --   before sending subcommand to rhost.  Default is -W 1:3\n    -A \u003cAuthn\u003e,   --Auth \u003cAuthn\u003e     -- Authentication type to use:  Authn={None|Basic|Session}  Default is Basic\n    -S \u003cSecure\u003e,  --Secure=\u003cSecure\u003e  -- When to use https: (Note: doesn't stop rhost from redirect http to https)\n                                        \u003cSecure\u003e={Always | IfSendingCredentials | IfLoginOrAuthenticatedApi(default) }\n    -R \u003cver\u003e,  --RedfishVersion=\u003cver\u003e-- The Major Redfish Protocol version to use: ver={v1(dflt), v\u003cn\u003e, Latest}\n    -C         --CheckRedfishVersion -- tells Redfishtool to execute GET /redfish to verify that the rhost supports\n                                        the specified redfish protocol version before executing a sub-command. \n                                        The -C flag is auto-set if the -R Latest or -W ... options are selected\n    -N,        --NonBlocking         -- Do not wait for asynchronous requests to complete.\n    -n,        --no-proxy            -- Ignore any PROXY environment variables.\n    -H \u003chdrs\u003e, --Headers=\u003chdrs\u003e      -- Specify the request header list--overrides defaults. Format \"{ A:B, C:D...}\" \n    -D \u003cflag\u003e,  --Debug=\u003cflag\u003e       -- Flag for dev debug. \u003cflag\u003e is a 32-bit uint: 0x\u003chex\u003e or \u003cdec\u003e format\n\n\n### Subcommands:\n\n    hello                 -- redfishtool hello world subcommand for dev testing\n    about                 -- display version and other information about this version of redfishtool\n    versions              -- get redfishProtocol versions supported by rhost: GET ^/redfish\n    root   |  serviceRoot -- get serviceRoot resource: GET ^/redfish/v1/\n    Systems               -- operations on Computer Systems in the /Systems collection \n    Chassis               -- operations on Chassis in the /Chassis collection\n    Managers              -- operations on Managers in the /Managers collection\n    AccountService        -- operations on AccountService including user administration\n    SessionService        -- operations on SessionService including Session login/logout\n    odata                 -- get the Odata Service document: GET ^/redfish/v1/odata\n    metadata              -- get the CSDL metadata document: GET ^/redfish/v1/$metadata\n    raw                   -- subcommand to execute raw http methods(GET,PATCH,POST...) and URIs\n\nFor Subcommand usage, including subcommand Operations and OtherArgs, execute:\n\n    redfishtool \u003cSubCommand\u003e -h  -- usage and options for specific subCommand\n\n### Subcommand Operations and Addl Args\n\n###### Systems Operations\n\n    python redfishtool.py -r \u003crhost\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -h\n    Usage:\n     redfishtool [OPTNS]  Systems  \u003coperation\u003e [\u003cargs\u003e]  -- perform \u003coperation\u003e on the system specified\n    \u003coperations\u003e:\n       [collection]              -- get the main Systems collection. (Default operation if no member specified)\n       [get]                     -- get the computerSystem object. (Default operation if collection member specified)\n       list                      -- list information about the Systems collection members(\"Id\", URI, and AssetTag)\n       patch {A: B,C: D,...}     -- patch the json-formatted {prop: value...} data to the object\n       reset \u003cresetType\u003e         -- reset a system.  \u003cresetType\u003e= On,  GracefulShutdown, GracefulRestart, \n                                     ForceRestart, ForceOff, ForceOn, Nmi, PushPowerButton, PowerCycle\n       setAssetTag \u003cassetTag\u003e    -- set the system's asset tag \n       setIndicatorLed  \u003cstate\u003e  -- set the indicator LED.  \u003cstate\u003e=redfish defined values: Off, Lit, Blinking\n       setBootOverride \u003cenabledVal\u003e \u003ctargetVal\u003e -- set Boot Override properties. \u003cenabledVal\u003e=Disabled|Once|Continuous\n                                 -- \u003ctargetVal\u003e =None|Pxe|Floppy|Cd|Usb|Hdd|BiosSetup|Utilities|Diags|UefiTarget|\n       Processors [list]         -- get the \"Processors\" collection, or list \"id\" and URI of members.\n        Processors [IDOPTN]        --  get the  member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n       Inventory [list]          -- get the \"Inventory\" collection, or list \"id\" and URI of members.\n\n       EthernetInterfaces [list] -- get the \"EthernetInterfaces\" collection, or list \"id\" and URI of members.\n        EthernetInterfaces [IDOPTN]--  get the member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n\n       SimpleStorage [list]      -- get the ComputerSystem \"SimpleStorage\" collection, or list \"id\" and URI of members.\n        SimpleStorage [IDOPTN]     --  get the member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n\n       Logs [list]               -- get the ComputerSystem \"LogServices\" collection , or list \"id\" and URI of members.\n        Logs [IDOPTN]              --  get the member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n       clearLog   \u003cid\u003e           -- clears the log defined by \u003cid\u003e\n       examples                  -- example commands with syntax\n       hello                     -- Systems hello -- debug command\n\n\n###### Chassis Operations\n\n    python redfishtool.py -r \u003crhost\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -h\n    Usage:\n     redfishtool [OPTNS]  Chassis  \u003coperation\u003e [\u003cargs\u003e]  -- perform \u003coperation\u003e on the Chassis specified \n    \u003coperations\u003e:\n       [collection]              -- get the main Chassis collection. (Default operation if no member specified)\n       [get]                     -- get the Chassis object. (Default operation if collection member specified)\n       list                      -- list information about the Chassis collection members(\"Id\", URI, and AssetTag)\n       patch {A: B,C: D,...}     -- patch the json-formatted {prop: value...} data to the object\n       setAssetTag \u003cassetTag\u003e    -- set the Chassis's asset tag \n       setIndicatorLed  \u003cstate\u003e  -- set the indicator LED.  \u003cstate\u003e=redfish defined values: Off, Lit, Blinking\n       Power                     -- get the full Power resource under a specified Chassis instance.\n       Thermal                   -- get the full Thermal resource under a specified Chassis instance.\n       Sensors                   -- get all sensors\n\n       getPowerReading [-i\u003cindx\u003e] [consumed]-- get powerControl resource w/ power capacity, PowerConsumed, and power limits\n                                    if \"consumed\" keyword is added, then only current usage of powerControl[indx] is returned\n                                    \u003cindx\u003e is the powerControl array index. default is 0.  normally, 0 is the only entry\n       setPowerLimit [-i\u003cindx\u003e] \u003climit\u003e [\u003cexception\u003e [\u003ccorrectionTime\u003e]] -- set powerLimit control properties\n                                 \u003climit\u003e=null disables power limiting. \u003cindx\u003e is the powerControl array indx (dflt=0)\n\n       Logs [list]               -- get the Chassis \"LogServices\" collection , or list \"id\" and URI of members.\n        Logs [IDOPTN]              --  get the member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n       clearLog   \u003cid\u003e           -- clears the log defined by \u003cid\u003e\n       examples                  -- example commands with syntax\n       hello                     -- Chassis hello -- debug command\n\n\n###### Managers Operations\n\n    python redfishtool.py -r \u003crhost\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -h\n    Usage:\n     redfishtool [OPTNS]  Managers  \u003coperation\u003e [\u003cargs\u003e]  -- perform \u003coperation\u003e on the Managers specified \n    \u003coperations\u003e:\n       [collection]              -- get the main Managers collection. (Default operation if no member specified)\n       [get]                     -- get the specified Manager object. (Default operation if collection member specified)\n       list                      -- list information about the Managers collection members(\"Id\", URI, and UUID)\n       patch {A: B,C: D,...}     -- patch the json-formatted {prop: value...} data to the object\n       reset \u003cresetType\u003e         -- reset a Manager.  \u003cresetType\u003e= On,  GracefulShutdown, GracefulRestart, \n                                     ForceRestart, ForceOff, ForceOn, Nmi, PushPowerButton, PowerCycle\n       setDateTime \u003cdateTimeString\u003e--set the date and time\n       setTimeOffset offset=\u003coffsetString\u003e  --set the time offset w/o changing time setting\n                                              \u003coffsetString\u003e is of form \"[+/-]mm:ss\". Ex: \"-10:01\" \n       NetworkProtocol           -- get the \"NetworkProtocol\" resource under the specified manager.\n       setIpAddress [-i\u003cindx\u003e]... -- set the Manager IP address -NOT IMPLEMENTED YET\n\n       EthernetInterfaces [list] -- get the managers \"EthernetInterfaces\" collection, or list \"id\",URI, Name of members.\n        EthernetInterfaces [IDOPTN]--  get the member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -a #all\n\n       SerialInterfaces [list]   -- get the managers \"SerialInterfaces\" collection, or list \"id\",URI, Name of members.\n        SerialInterfaces [IDOPTN]  --  get the member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n\n       Logs [list]               -- get the Managers \"LogServices\" collection , or list \"id\",URI, Name of members.\n        Logs [IDOPTN]              --  get the member specified by IDOPTN: -i\u003cid\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n       clearLog   \u003cid\u003e           -- clears the log defined by \u003cid\u003e\n       examples                  -- example commands with syntax\n       hello                     -- Systems hello -- debug command\n\n\n###### AccountService Operations\n\n    python redfishtool.py -r \u003crhost\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService -h\n    Usage:\n     redfishtool [OPTNS]  AccountService  \u003coperation\u003e [\u003cargs\u003e]  -- perform \u003coperation\u003e on the AccountService  \n    \u003coperations\u003e:\n       [get]                     -- get the AccountService object. \n       patch {A: B,C: D,...}     -- patch the AccountService w/ json-formatted {prop: value...} \n       Accounts [list]           -- get the \"Accounts\" collection, or list \"Id\", username, and Url \n         Accounts [IDOPTN]       --   get the member specified by IDOPTN: -i\u003cId\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n       Roles [list]              -- get the \"Roles\" collection, or list \"Id\", IsPredefined, and Url \n         Roles [IDOPTN]          --   get the member specified by IDOPTN: -i\u003cId\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n       adduser \u003cusernm\u003e \u003cpasswd\u003e [\u003croleId\u003e] -- add a new user to the Accounts collection\n                                 -- \u003croleId\u003e:{Administrator | Operator | ReadOnlyUser | \u003ca custom roleId}, dflt=Operator\n       deleteuser \u003cusernm\u003e       -- delete an existing user from Accouts collection\n       setpassword  \u003cusernm\u003e \u003cpasswd\u003e  -- set (change) the password of an existing user account\n       useradmin \u003cuserName\u003e [enable|disable|unlock|[setRoleId \u003croleId\u003e]] -- enable|disable|unlock.. a user account\n       setusername \u003cid\u003e \u003cuserName\u003e -- set UserName for account with given Id\n       examples                  -- example commands with syntax\n       hello                     -- AccountService hello -- debug command\n\n\n###### SessionService Operations\n\n    python redfishtool.py -r \u003crhost\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService -h\n    Usage:\n     redfishtool [OPTNS]  SessionService  \u003coperation\u003e [\u003cargs\u003e]  -- perform \u003coperation\u003e on the SessionService  \n    \u003coperations\u003e:\n       [get]                     -- get the sessionService object. \n       patch {A: B,C: D,...}     -- patch the sessionService w/ json-formatted {prop: value...} \n       setSessionTimeout \u003ctimeout\u003e -- patches the SessionTimeout property w/ etag support \n       Sessions [list]           -- get the \"Sessions\" collection, or list \"Id\", username, and Url \n         Sessions [IDOPTN]       --   get the member specified by IDOPTN: -i\u003cId\u003e, -m\u003cprop\u003e:\u003cval\u003e, -l\u003clink\u003e, -a #all\n       login                     -- sessionLogin.  post to Sessions collection to create a session\n                                     the user is -u\u003cuser\u003e, password is -p\u003cpassword\u003e\n       logout                    -- logout or delete the session by identified by -i\u003cSessionId\u003e or -l\u003clink\u003e\n                                     where \u003clink\u003e is the session path returned in Location from login\n       examples                  -- example commands with syntax\n       hello                     -- Systems hello -- debug command\n\n\n###### raw Operations\n\n    python redfishtool.py -r \u003crhost\u003e -u \u003cusername\u003e -p \u003cpassword\u003e raw -h\n    Usage:\n     redfishtool [OPTNS] raw \u003cmethod\u003e \u003cpath\u003e \n\n     redfishtool raw -h        # for help\n     redfishtool raw examples  #for example commands\n\n    \u003cmethod\u003e is one of:  GET, PATCH, POST, DELETE, HEAD, PUT\n    \u003cpath\u003e is full URI path to a redfish resource--the full path following \u003cipaddr:port\u003e, starting with forward slash /\n\n     Common OPTNS:\n     -u \u003cuser\u003e,   --user=\u003cusernm\u003e     -- username used for remote redfish authentication\n     -p \u003cpasswd\u003e, --password=\u003cpasswd\u003e -- password used for remote redfish authentication\n     -t \u003ctoken\u003e,  --token=\u003ctoken\u003e    - redfish auth session token-for sessions across multiple calls\n\n     -r \u003crhost\u003e,  --rhost=\u003crhost\u003e     -- remote redfish service hostname or IP:port\n     -X \u003cmethod\u003e  --request=\u003cmethod\u003e  -- the http method to use. \u003cmethod\u003e={GET,PATCH,POST,DELETE,HEAD,PUT}. Default=GET\n     -d \u003cdata\u003e    --data=\u003cdata\u003e       -- the http request \"data\" to send on PATCH,POST,or PUT requests\n     -H \u003chdrs\u003e, --Headers=\u003chdrs\u003e      -- Specify the request header list--overrides defaults. Format \"{ A:B, C:D...}\" \n     -S \u003cSecure\u003e,  --Secure=\u003cSecure\u003e  -- When to use https: (Note: doesn't stop rhost from redirect http to https)\n    \u003coperations / methods\u003e:\n       GET             -- HTTP GET method\n       PATCH           -- HTTP PATCH method\n       POST            -- HTTP POST method\n       DELETE          -- HTTP DELETE method\n       HEAD            -- HTTP HEAD method\n       PUT             -- HTTP PUT method\n     examples        -- example raw commands with syntax\n     hello           -- raw hello -- debug command\n\n\n# Example Usage\n\n### System subcommand Examples\n\n    $ python redfishtool.py -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems examples\n     # Shows the Systems Collection\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems\n\n     # Lists Id, Uri, AssetTag for all systems\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems list\n\n     # Gets the system with Id=\u003cd\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cid\u003e\n\n     # Gets the system with AssetTag=12345\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -M AssetTag:12345\n\n     # Gets the system at URI=\u003csystemUrl\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -L \u003csystemUrl\u003e\n\n     # Gets the first system returned (for debug)\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -F\n\n     # Gets the first system and verify that there is only one system\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -1\n\n     # Patches the json-formated {prop: value...} data to the specified system\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cid\u003e patch {A: B,C: D,...}\n\n     # Patches the json-formated {prop: value...} data to all systems\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems --all patch {A: B,C: D,...}\n\n     # Resets a system.  \u003cresetType\u003e=the redfish-defined values: On, Off, gracefulOff...\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cid\u003e reset \u003cresetType\u003e\n\n     # Resets all systems.  \u003cresetType\u003e=the redfish-defined values: On, Off, gracefulOff...\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems --all reset \u003cresetType\u003e\n\n     # Sets the system's asset tag to \u003cassetTag\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cid\u003e setAssetTag \u003cassetTag\u003e\n\n     # Sets all system's asset tags to \u003cassetTag\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems --all setAssetTag \u003cassetTag\u003e\n\n     # Sets the indicator LED.  \u003cstate\u003e=redfish defined values: Off, Lit, Blinking\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cid\u003e setIndicatorLed \u003cstate\u003e\n\n     # Sets the indicator LED on all systems. \u003cstate\u003e=redfish defined values: Off, Lit, Blinking\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems --all setIndicatorLed \u003cstate\u003e\n\n     # Sets Boot Override properties.  \u003cenabledVal\u003e=Disabled|Once|Continuous\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cid\u003e setBootOverride \u003cenabledVal\u003e \u003ctargetVal\u003e\n\n     # Sets Boot Override properties on all systems.  \u003cenabledVal\u003e=Disabled|Once|Continuous\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems --all setBootOverride \u003cenabledVal\u003e \u003ctargetVal\u003e\n\n     # Gets the Processor Collection\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cId\u003e Processors\n\n     # Lists Id, Uri, \u0026 Socket for all processors in system w/ Id=\u003cId\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cId\u003e Processors list\n\n     # Gets the processor with id=1 in system with Id=\u003cId\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -I \u003cId\u003e Processors -i 1\n\n     # Gets processor with property Socket=CPU_1, on system at url \u003csysUrl\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -L \u003csysUrl\u003e Processors -m Socket:CPU_1\n\n     # Gets log member with Id=SEL from the first System\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -1 Logs -i SEL\n\n     # Gets log entries with Id=SEL from the first System\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems -1 Logs -E -i SEL\n\n     # Gets System inventory\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Systems Inventory\n\n\n### Chassis subcommand Examples\n\n    $ python redfishtool.py -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis examples\n     # Shows the Chassis Collection\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis\n\n     # Lists Id, Uri, AssetTag for all Chassis\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis list\n\n     # Gets the Chassis with Id=\u003cd\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -I \u003cid\u003e\n\n     # Gets the Chassis with AssetTag=12345\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -M AssetTag:12345\n\n     # Gets the Chassis at URI=\u003cchassisUrl\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -L \u003cchassisUrl\u003e\n\n     # Gets the first Chassis returned (for debug)\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -F\n\n     # Gets the first Chassis and verify that there is only one system\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -1\n\n     # Patches the json-formated {prop: value...} data to the specified chassis\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -I \u003cid\u003e patch {A: B,C: D,...}\n\n     # Patches the json-formated {prop: value...} data to all chassis\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis --all patch {A: B,C: D,...}\n\n     # Sets the chassis's asset tag\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -I \u003cid\u003e setAssetTag \u003cassetTag\u003e\n\n     # Sets all chassis's asset tags\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis --all setAssetTag \u003cassetTag\u003e\n\n     # Sets the indicator LED.  \u003cstate\u003e=redfish defined values: Off, Lit, Blinking\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -I \u003cid\u003e setIndicatorLed \u003cstate\u003e\n\n     # Sets the indicator LED on all chassis.  \u003cstate\u003e=redfish defined values: Off, Lit, Blinking\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis --all setIndicatorLed \u003cstate\u003e\n\n     # Gets the full chassis Power resource\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -I \u003cId\u003e Power\n\n     # Gets the full chassis Thermal resource\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -I \u003cId\u003e Thermal\n\n     # Gets chassis/Power powerControl[\u003cindx\u003e] resource if optional \"consumed\" arg, then return only the PowerConsumedWatts prop\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -I \u003cId\u003e getPowerReading[-i\u003cindx\u003e [consumed]\n\n     # Sets the power limit\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -L\u003cUrl\u003e setPowerLimit [-i\u003cindx\u003e] \u003climit\u003e [\u003cexception\u003e [\u003ccorrectionTime\u003e]]\n\n     # Sets the power limit on all chassis\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis --all setPowerLimit [-i\u003cindx\u003e] \u003climit\u003e [\u003cexception\u003e [\u003ccorrectionTime\u003e]]\n\n     # Gets log member with Id=SEL from the first Chassis\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -1 Logs -i SEL\n\n     # Gets log entries with Id=SEL from the first Chassis\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis -1 Logs -E -i SEL\n\n     # Gets all Sensors\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Chassis Sensors\n\n\n### Managers subcommand Examples\n\n    $ python redfishtool.py -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers examples\n     # Shows the Managers Collection\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e\n\n     # Lists Id, Uri, AssetTag for all Managers\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers list\n\n     # Gets the Manager with Id=\u003cd\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -I \u003cid\u003e\n\n     # Gets the Manager with AssetTag=12345\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -M AssetTag:12345\n\n     # Gets the Manager at URI=\u003cmgrUrl\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -L \u003cmgrUrl\u003e\n\n     # Gets the first Manager returned (for debug)\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -F\n\n     # Gets the first Manager and verify that there is only one Manager\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -1\n\n     # Patches the json-formated {prop: value...} data to the object\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -I \u003cid\u003e patch {A: B,C: D,...}\n\n     # Resets a Manager.  \u003cresetType\u003e=the redfish-defined values: On, Off, gracefulOff...\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -I \u003cid\u003e reset \u003cresetType\u003e\n\n     # Gets the NetworkProtocol resource under the specified manager\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -I \u003cId\u003e NetworkProtocol\n\n     # Lists Id, Uri, and Name for all of the NICs for Manager w/ Id=\u003cId\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -I \u003cId\u003e EthernetInterfaces list\n\n     # Gets the NIC with id=1 in manager with Id=\u003cId\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -I \u003cId\u003e EthernetInterfaces -i 1\n\n     # Gets the NIC with MAC AA:BB:CC:DD:EE:FF for manager at url \u003cUrl\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -L \u003cUrl\u003e EthernetInterfaces -m MACAddress:AA:BB:CC:DD:EE:FF\n\n     # Gets log member with Id=SEL from the first Manager\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -1 Logs -i SEL\n\n     # Gets log entries with Id=SEL from the first Manager\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e Managers -1 Logs -E -i SEL\n\n\n### AccountService subcommand Examples\n\n    $ python redfishtool.py -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService examples\n     # Gets the AccountService\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService\n\n     # Sets the failed login lockout threshold\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService patch { \"AccountLockoutThreshold\": 5 } ]\n\n     # Gets the Accounts collection\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService Accounts\n\n     # List Accounts to get Id, username, url for each account\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService Accounts list\n\n     # Gets the Accounts member with username: john\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService Accounts -m UserName:john\n\n     # Lists the Roles collection to get RoleId, IsPredefined, \u0026 url for each role\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService Roles list\n\n     # Gets the Roles member with RoleId=Admin\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService Roles -i Admin\n\n     # Adds the new user (john) w/ passwd \"12345\" and role: Admin\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService adduser john 12345 Admin\n\n     # Deletes the account with the username \"john\"\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService deleteuser john\n\n     # Disables the account with the username \"john\"\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService useradmin john disable\n\n     # Unlocks the account with the username \"john\"\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService useradmin john unlock\n\n     # Sets the username for account with id=3 to \"alice\"\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e AccountService setusername 3 alice\n\n\n### SessionService subcommand Examples\n\n    $ python redfishtool.py -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService examples\n     # Gets the sessionService\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService\n\n     # Sets the session timeout property\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService setSessionTimeout \u003ctimeout\u003e\n\n     # Gets Sessions collection\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService Sessions\n\n     # Gets the session at URI=\u003csessUrl\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService Sessions -l \u003csessUrl\u003e\n\n     # Gets the session with session Id \u003csessId\u003e\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService Sessions -i \u003csessId\u003e\n\n     # Patches the json-formated {prop: value...} data to the sessionService object\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService patch {A: B,C: D,...}\n\n     # Login (create session)\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService login -u \u003cuser\u003e -p \u003cpassword\u003e\n\n     # Logout (delete session \u003csessId\u003e)\n     redfishtool -r \u003cip\u003e -u \u003cusername\u003e -p \u003cpassword\u003e SessionService logout -i \u003csessionId\u003e\n\n\n## Running in Windows\n\nIn order for executables to resolve if using Windows, ensure both the \"Python\" and \"Scripts\" folder are included in the PATH environment variable.  For example, if Python is installed to \"C:\\Python\", the PATH environment variable should include \"C:\\Python\" and \"C:\\Python\\scripts\".\n\n\n## Known Issues, and ToDo Enhancements\n\n1. modifications to make PATCH commands work better with Windows cmd shell quoting \n2. support clearlog\n3. add additional APIs that have been added to Redfish after 1.0---this version supports only 1.0 APIs\n4. add custom role create and delete\n\n\n## Release Process\n\n1. Go to the \"Actions\" page\n2. Select the \"Release and Publish\" workflow\n3. Click \"Run workflow\"\n4. Fill out the form\n5. Click \"Run workflow\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDMTF%2FRedfishtool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDMTF%2FRedfishtool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDMTF%2FRedfishtool/lists"}