Go to main content

Oracle® ZFS Storage Appliance RESTful API 指南,发行版 OS8.8.0

退出打印视图

更新时间: 2018 年 11 月
 
 

上载系统更新

此命令可上载新的系统更新映像。

使用 curl 的上载命令示例:

$ curl --user root:root-password -k --data-binary @nas@2013.08.24,1-0.pkg.gz \
  --header "Content-Type: application/octet-stream" \
  https://zfs-storage.example.com/api/system/v1/updates

在上载并解压缩映像后,将返回更新映像的属性。成功后,HTTP 状态将设置为 "201 (Created)",并在位置头中返回新映像的相对位置。

结果示例:

HTTP/1.1 201 Created
X-Zfssa-Appliance-Api: 1.0
Content-Length: 541
Content-Type: application/json
Location: /api/system/v1/updates/nas@2013.08.24,1-0

{
    "update": {
        "release_date": "Sat Aug 24 2013 17:54:23 GMT+0000 (UTC)",
        "install_date": "Sun Aug 25 2013 11:30:14 GMT+0000 (UTC)"
        "href": "/api/system/v1/updates/nas@2013.08.24,1-0",
        "status": "current",
        "version": "2013.08.24,1-0",
        "update_deferred", "on_request"
    }
}