The hardware commands are used to get a list of appliance hardware chassis and components.
|
The get chassis command does not take any arguments and returns a list of system chassis objects. An HTTP Status 200 (OK) is returned for a successful command.
|
Example Request:
GET /api/hardware/v1/chassis HTTP/1.1 Host: zfs-storage.example.com:215 Accept: application/json
Example Response:
HTTP/1.1 200 OK Content-Length: 788 Content-Type: application/json X-Zfssa-Appliance-Api: 1.0 { "hardware": [{ "faulted": false, "href": "/api/hardware/v1/chassis/chassis-000", "manufacturer": "Oracle", "model": "Oracle ZFS Storage ZS3-1", "name": "cairo", "rpm": "--", "serial": "1211FM200C", "type": "system" }, { "faulted": false, "href": "/api/hardware/v1/chassis/chassis-001", "locate": false, "manufacturer": "Oracle", "model": "Oracle Storage DE2-24C", "name": "1235FM4002", "part": "7046842", "path": 2, "revision": "0010", "rpm": 7200, "serial": "1235FM4002", "type": "storage" }, { "faulted": false, "href": "/api/hardware/v1/chassis/chassis-002", "locate": false, "manufacturer": "Oracle", "model": "Oracle Storage DE2-24P", "name": "50050cc10c206b96", "part": "7046836", "path": 2, "revision": "0010", "rpm": 10000, "serial": "50050cc10c206b96", "type": "storage" }] }
This command returns all the hardware components within the specified chassis. An HTTP Status 200 (OK) is returned for a successful command.
Example Request:
GET /api/nas/v1/chassis/chassis-001 HTTP/1.1 Host: zfs-storage.example.com Accept: application/json
Example Response:
HTTP/1.1 200 OK Content-Type: application/json { "chassis": { "type": "storage" "faulted": false, "href": "/api/hardware/v1/chassis/chassis-001", "locate": false, "manufacturer": "Oracle", "model": "Oracle Storage DE2-24C", "name": "1235FM4002", "part": "7046842", "path": 2, "revision": "0010", "rpm": 7200, "serial": "1235FM4002", "disk": [{ "device": "c0t5000CCA01A76A2B8d0", "faulted": false, "href": "/api/hardware/v1/chassis/chassis-001/disk/disk-000", "interface": "SAS", "label": "HDD 0", "locate": false, "manufacturer": "HITACHI", "model": "H7230AS60SUN3.0T", "pathcount": 4, "present": true, "revision": "A310", "rpm": 7200, "serial": "001210R37LVD YHJ37LVD", "size": 3000592982016, "type": "data", "use": "peer" }, { "href": "/api/hardware/v1/chassis/chassis-001/disk/disk-001", ... }, { "href": "/api/hardware/v1/chassis/chassis-001/disk/disk-002", ... }, ... { "href": "/api/hardware/v1/chassis/chassis-001/disk/disk-023", ... }], "fan": [ { "href": "/api/hardware/v1/chassis/chassis-001/fan/fan-000", ... }, ... { "href": "/api/hardware/v1/chassis/chassis-001/fan/fan-007", }], "psu": [ { "href": "/api/hardware/v1/chassis/chassis-001/psu/psu-000", ... }, { "href": "/api/hardware/v1/chassis/chassis-001/psu/psu-001", }, { "href": "/api/hardware/v1/chassis/chassis-001/psu/psu-002", }, { "href": "/api/hardware/v1/chassis/chassis-001/psu/psu-003", }], "slot": [{ "href": "/api/hardware/v1/chassis/chassis-001/slot/slot-000", }, { "href": "/api/hardware/v1/chassis/chassis-001/slot/slot-001", }], } }
This command returns the properties from a single hardware component. An HTTP Status 200 (OK) is returned for a successful command. The response object contains the component properties contained in the following table.
|
Example Request:
GET /api/hardware/v1/chassis/chassis-001/disk/disk-011 HTTP/1.1 Host: zfs-storage.example.com Accept: application/json
Example Response:
HTTP/1.1 200 OK Content-Type: application/json { "disk": { "device": "c0t5000CCA01A764FB0d0", "faulted": false, "href": "/api/hardware/v1/chassis/chassis-001/disk/disk-011", "interface": "SAS", "label": "HDD 11", "locate": false, "manufacturer": "HITACHI", "model": "H7230AS60SUN3.0T", "pathcount": 4, "present": true, "revision": "A310", "rpm": 7200, "serial": "001210R322ED YHJ322ED", "size": 3000592982016, "type": "data", "use": "peer" } }
A PUT request can be used to set properties on a selected hardware component. A successful request returns HTTP status 201 (Accepted) as well as the component properties in JSON format.
Example Request:
PUT /api/hardware/v1/chassis/chassis-001/disk/disk-011 HTTP/1.1 Host: zfssa.example.com:215 X-Auth-User: root X-Auth-Key: letmein Accept: application/json Content-Type: application/json Content-Length: 16 {"locate": true}
Example JSON Response:
HTTP/1.1 202 Accepted X-Zfssa-Appliance-Api: 1.0 Content-Length: 403 Content-Type: application/json { "disk": { "href": "/api/hardware/v1/chassis/chassis-001/disk/disk-011", ..., "locate": true } }