Go to main content

Oracle® ZFS Storage Appliance RESTful API Guide, Release OS8.7.x

Exit Print View

Updated: December 2017
 
 

Chassis

The hardware commands are used to get a list of appliance hardware chassis and components.

Request
Path /hardware/v1.0
Description
GET
/chassis
List hardware chassis
GET
/chassis/<chassis>
Get the specified hardware chassis properties
PUT
/chassis/<chassis>
Modify the specified hardware chassis properties
GET
/chassis/<chassis>/<fru_type>
List hardware chassis components
GET
/chassis/<chassis>/<fru_type> /<fru>
Get the specified chassis component properties
PUT
/chassis/<chassis>/<fru_type> /<fru>
Modify hardware chassis component properties

List Chassis

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.

Type
Property
Description
string
name
Chassis name
string
model
Chassis model number
string
manufacturer
Chassis manufacturer
string
serial
Chassis serial number
string
revision
Chassis revision level
string
part
Chassis replacement part number
string
type
Chassis storage type
boolean
faulted
Fault indicator
string
fru
FMRI representation of the chassis
string
uuid
Chassis uuid identifier

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"
    }]
}

Get Chassis Components

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",
        }],
    }
}

Get Hardware Component

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.

Type
Name
Description
string
device
The FRU device ID
boolean
faulted
Flag indicating if FRU is faulted
string
fru
FMRI representation of a FRU
string
interface
FRU interface type
string
label
FRU location label
boolean
locate
Locate indicator on flag
string
manufacturer
FRU manufacturer
string
model
FRU model
string
part
FRU part number
boolean
present
FRU presence indicator
number
rpm
Platter RPM (disk only)
string
serial
FRU serial number
number
size
FRU size (capacity)
string
type
Component type
string
use
Component usage enumeration

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"
    }
}

Modify Component Property

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
    }
}