将脚本上载到设备并在设备上运行脚本。
根用户可以查看和访问所有已上载到设备的脚本。非根用户只能查看和访问自己的脚本。
有关脚本的更多信息,请参见Oracle ZFS Storage Appliance 管理指南,发行版 OS8.8.0 中的 使用 CLI 脚本编写工具。
此脚本列出设备上的所有共享资源。
请求示例:
$ curl -kv --user root:pw --data-binary @listShares.aksh \ https://hostname:215/api/workflow/v1/scripts POST /api/workflow/v1/scripts HTTP/1.1 Host: zfs-storage.example.com:215 Authorization: Basic dDpscm9vMWE= User-Agent: curl/7.45.0 Accept: */* Content-Length: 12 Content-Type: application/x-www-form-urlencoded
结果示例:
HTTP/1.1 201 Created Date: Mon, 27 Mar 2017 22:16:38 GMT X-Zfssa-Workflow-Api: 1.1 X-Zfssa-Version: user/generic@2017.02.27,1-0 X-Zfssa-Api-Version: 1.0 Content-Type: plain/text; charset=utf-8 Transfer-Encoding: chunked default share1 share2 fs1 lun1