JavaScript is required to for searching.
탐색 링크 건너뛰기
인쇄 보기 종료
Oracle® ZFS Storage Appliance RESTful API 설명서, 릴리스 2013.1.3.0
Oracle Technology Network
라이브러리
PDF
인쇄 보기
피드백
search filter icon
search icon

문서 정보

Oracle ZFS Storage Appliance RESTful API 시작하기

RESTful API 작업

RESTful API 경보 서비스

Analytics Services

하드웨어 서비스

로그 명령

네트워크 명령

RESTful API 문제 서비스

RESTful API 역할 서비스

RESTful API SAN 서비스

SAN 개요

SAN 개시자

개시자 나열

개시자 세부 정보 가져오기

개시자 만들기

개시자 수정

개시자 삭제

개시자 그룹

개시자 그룹 나열

개시자 그룹 세부 정보 가져오기

개시자 그룹 만들기

개시자 그룹 삭제

대상

대상 나열

대상 세부 정보 가져오기

대상 만들기

대상 수정

대상 삭제

대상 그룹

대상 그룹 나열

대상 그룹 가져오기

대상 그룹 만들기

대상 그룹 삭제

서비스 명령

RESTful API 스토리지 서비스

시스템 명령

RESTful API 사용자 서비스

워크플로우 명령

RESTful 클라이언트

대상

iSCSI 대상 명령은 iSCSI 대상 및 iSCSI 대상 그룹을 관리하는 데 사용됩니다. 사용 가능한 명령은 아래에 나열되어 있습니다.

표 10-7  대상 명령
요청
경로 /san/v1.0
설명
GET
/<protocol>/targets
지정된 프로토콜(FC, iSCSI, SRP) 객체에 대한 모든 SAN 대상을 나열합니다.
GET
/<protocol>/targets/<target>
지정된 프로토콜(FC, iSCSI, SRP) 등록 정보에 대한 지정된 SAN 대상을 가져옵니다.
POST
/<protocol>/targets
지정된 프로토콜(FC, iSCSI, SRP)에 대한 새 SAN 대상을 만듭니다.
PUT
/<protocol>/targets/<target>
지정된 프로토콜(FC, iSCSI, SRP) 객체에 대한 지정된 SAN 대상을 수정합니다.
DELETE
/<protocol>/targets/<target>
지정된 대상 객체를 삭제합니다.

이 명령은 다음 URI 매개변수를 사용합니다.

표 10-8  URI 매개변수
유형
이름
설명
string
protocol
SAN 프로토콜(FC, iSCSI, SRP)
string
target
대상 ID(IQN, WWN, EUI)

모든 대상 "get" 명령은 대상 등록 정보를 반환하고 "target" "create" 및 수정 명령은 다음 등록 정보를 입력으로 사용합니다.

표 10-9  대상 등록 정보
이름
프로토콜
설명
alias
iscsi
사람이 읽을 수 있는 간단한 이름
iqn
iscsi
iSCSI 정규화된 이름
state
iscsi
iSCSI 대상 상태("online", "offline")
auth
iscsi
선택적 인증 유형("none", "chap")
targetchapuser
iscsi
선택적 CHAP 사용자 인증
targetchapsecret
iscsi
선택적 CHAP 암호 인증
interfaces
iscsi
대상을 사용할 수 있는 네트워크 인터페이스 목록
wwn
fc
이 대상에 대한 Worldwide 이름
port
fc
포트의 물리적 위치
mode
fc
이 포트의 모드(개시자 또는 대상)
speed
fc
이 포트의 협상 속도
discovered_ports
fc
검색된 원격 개시자 포트의 수
alias
srp
SRP 대상에 대한 별칭
eui
srp
이 대상의 EUI(Extended Unique Identifier)

다음 등록 정보는 iSCSI 대상 그룹 정보를 가져오는 데 사용됩니다.

표 10-10  대상 그룹 등록 정보
유형
이름
설명
string
protocol
대상 그룹 프로토콜(FC, iSCSI, SRP)
string
name
iSCSI 대상 그룹 이름
array
targets
iSCSI 대상 IQN 그룹 구성원 목록

대상 나열

어플라이언스에서 사용할 수 있는 지정된 프로토콜의 모든 SAN 대상을 나열합니다.

요청 예:

GET /api/san/v1/iscsi/targets HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=
Accept: application/json

응답 예:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1337

{
    "size": 7,
     "targets": [{
        "alias": "tst.volumes.py.12866.target",
        "href": "/api/san/v1/iscsi/targets/iqn.1986-03.com.sun:02:
            72b6fa9a-96c4-e511-db19-aadb9bac2052",
        "iqn": "iqn.1986-03.com.sun:02:72b6fa9a-96c4-
            e511-db19-aadb9bac2052",
        ...
    }, {
        "alias": "tst.volumes.py.96238.target",
         "href": "/api/san/v1/iscsi/targets/iqn.1986-03.com.sun:02:
            31d26d2e-6aa0-6054-fe58-8b1fb508b008",
        "iqn": "iqn.1986-03.com.sun:31d26d2e-6aa0-6054-fe58-8b1fb508b008",
        ...
    }
    ...]
}

대상 세부 정보 가져오기

단일 대상에서 등록 정보를 가져옵니다. "iqn" 등록 정보 또는 "alias=<alias>"를 사용하여 대상을 선택할 수 있습니다.

요청 예:

GET /api/san/v1/iscsi/targets/alias=test-target HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=
Accept: application/json

응답 예:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 251

{
    "target": {
        "alias": "test-target",
        "auth": "none",
        "href": "/api/san/v1/iscsi/targets/alias=test-target",
        "interfaces": ["ixgbe0"],
        "iqn": "iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008",
        "targetchapsecret": "",
        "targetchapuser": ""
    }
}

대상 만들기

새 대상을 만듭니다. 요청 본문은 새 iSCSI 대상 그룹의 이름인 단일 name 등록 정보가 있는 JSON 객체를 포함합니다.

요청 예:

POST /api/san/v1/iscsi/targets HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=
Content-Type: application/json
Content-Length: 23
Accept: application/json

{"alias": "test-target"}

응답 예:

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 233
X-Zfssa-San-Api: 1.0
Location: /api/san/v1/iscsi/targets/iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008

{
    "target": {
        "href": "/api/san/v1/iscsi/targets/iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008",
        "alias": "test-target",
        "iqn": "iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008",
        "auth": "none",
        "targetchapuser": "",
        "targetchapsecret": "",
        "interfaces": ["ixgbe0"]
    }
}

대상 수정

기존 iSCSI 대상을 수정합니다. 요청 본문은 수정되는 iSCSI 대상 등록 정보를 포함하는 JSON 객체를 포함합니다. 성공 시 HTTP 상태 202(Accepted)가 반환됩니다. 응답 본문은 JSON 객체로 인코딩된 대상에 대한 결과 iSCSI 대상 등록 정보를 포함합니다.

요청 예:

PUT /api/san/v1/iscsi/targets/alias=test-target HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=
Host: zfs-storage.example.com
Content-Type: application/json
Content-Length: 54
Accept: application/json

{"targetchapsecret":"letmeinnowplease", "auth":"chap",
 "targetchapuser":"argus"}

응답 예:

HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 189
X-Zfssa-San-Api: 1.0

{
    "target": {
        "href": "/api/san/v1/iscsi/targets/alias=test-target",
        "auth": "chap",
        "targetchapsecret": "letmeinnowplease",
        "alias": "test-arget",
        "iqn": "iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008",
        "targetchapuser": "argus",
        "interfaces": ["ixgbe0"]
    }
}

대상 삭제

시스템에서 SAN 대상을 제거합니다.

요청 예:

DELETE /api/san/v1/iscsi/targets/iqn.1986-03.com.sun:02:e7e688b1 HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=

성공한 삭제는 다음과 같이 HTTP 코드 204(No Content)를 반환합니다.

HTTP/1.1 204 No-Content