Build a raidcom script
raidcom_build_scriptBuild a validated shell script of raidcom commands from steps with foreach/zip expansion, per-step errors, exit-status checks, and optional locking—nothing is executed.
Instructions
Build a shell script of raidcom commands from steps. Each step is a command with options, optionally repeated with foreach (every combination) or zip (values advance together), so "create LDEVs 100 to 109 in pool 0, then map each to port CL1-A" is two steps. Every expanded command is validated; the script is returned only if all of them are valid, otherwise you get the errors per step. The script checks each command's exit status, adds raidcom get command_status after asynchronous commands, and can lock the resource group and log in (credentials are read from RAIDCOM_USER and RAIDCOM_PASSWORD in the user's shell, never written into the script). Nothing is executed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"steps": "<steps>"
},
"name": "raidcom_build_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| login | No | Add raidcom -login / -logout using $RAIDCOM_USER and $RAIDCOM_PASSWORD. | |
| model | No | Storage model, so values are checked against its limits: vsp-one-b24, vsp-one-b26, vsp-one-b28, vsp-5000, vsp-e590, vsp-e790, vsp-e990, vsp-e1090. Aliases such as B28 or E990 work. Omit it to check against the widest range of any model. | |
| steps | Yes | ||
| global | No | Settings that apply to the whole command, not to one raidcom option. | |
| strict | No | Default true. The command catalogue is parsed from the manual, whose syntax lines are occasionally incomplete, so a "needs <option>" error can be a false alarm. If one looks wrong after reading raidcom_describe_command, retry with strict=false: missing-option errors then become warnings. Unknown options and out-of-range values stay errors. | |
| description | No | A one-line comment for the top of the script. | |
| lock_resource | No | Wrap the commands in raidcom lock resource / unlock resource. Recommended for changing commands. |