Go to main content

Oracle® ZFS Storage Appliance RESTful API 설명서, 릴리스 OS8.8.x

인쇄 보기 종료

업데이트 날짜: 2021년 8월
 
 

대상 그룹

대상 그룹은 대상의 모음입니다. 대상 그룹 명령은 아래 표에 나열되어 있습니다.

대상 그룹 명령은 다음 URI 매개변수를 사용합니다.

protocol

개시자의 NAS 프로토콜(fc, iscsi 또는 srp)

target-group

대상 그룹의 이름

표 39  대상 그룹 명령
요청
경로 /san/v{1|2}에 추가
설명
GET
/protocol/target-groups
지정된 프로토콜(fc, iscsi 또는 srp) 객체에 대한 모든 SAN 대상 그룹을 나열합니다.
GET
/protocol/target-groups/target-group
지정된 프로토콜(fc, iscsi 또는 srp) 등록 정보에 대한 지정된 SAN 대상 그룹을 가져옵니다.
POST
/protocol/target-groups
지정된 프로토콜(fc, iscsi 또는 srp)에 대한 새 SAN 대상 그룹을 만듭니다.
PUT
/protocol/target-groups/target-group
지정된 프로토콜(fc, iscsi 또는 srp) 객체에 대한 지정된 SAN 대상 그룹을 수정합니다.
DELETE
/protocol/target-groups/target-group
지정된 대상-그룹 객체를 삭제합니다.

대상 그룹 나열

어플라이언스에 대해 사용할 수 있는 모든 대상 그룹을 나열합니다. 성공 시 HTTP 상태 200(OK)이 반환되고 본문은 대상 그룹 객체 배열을 포함하는 이름이 groups인 등록 정보가 있는 JSON 객체를 포함합니다.

요청 예:

GET /api/san/v1/iscsi/target-groups
Host: zfs-storage.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Accept: application/json

결과 예:

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

{
    "groups": [{
        "href": "/api/san/v1/iscsi/target-groups/test-group",
        "name": "test-group",
        "targets": [
            "iqn.zfs-storage.example.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008"
        ]
    }, {
        "href": "/api/san/v1/iscsi/target-groups/alt-group",
        ...
    }]
}

대상 그룹 가져오기

단일 대상 그룹을 가져옵니다. 요청은 대상 그룹 이름인 단일 URI 매개변수를 사용합니다. 응답 본문은 대상 그룹 등록 정보를 포함하는 이름이 group인 JSON 객체 등록 정보를 포함합니다.

요청 예:

GET /api/san/v1/iscsi/target-groups/test-group
Host: zfs-storage.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Accept: application/json

결과 예:

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

{
    "group": {
        "href": "/api/san/v1/iscsi/target-groups/test-group",
        "name": "test-group",
        "targets": [
            "iqn.zfs-storage.example.com.sun:02:0d5a0ed8-44b6-49f8-a594-872bf787ca5a"]
    }
}

대상 그룹 만들기

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

요청 예:

POST /api/san/v1/iscsi/target-groups HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Accept: application/json
Content-Type: application/json
Content-Length: 97

{"name":"test-group",
 "targets": ["iqn.zfs-storage.example.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008"]}

결과 예:

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 154
X-Zfssa-San-Api: 1.0
Location: /api/san/v1/iscsi/target-groups/test-group

{
    "group": {
        "href": "/api/san/v1/iscsi/target-groups/test-group",
        "name": "test-group",
        "targets": [
            "iqn.zfs-storage.example.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008"]
    }
}

대상 그룹 삭제

기존 대상 그룹을 삭제합니다.

요청 예:

DELETE /api/san/v1.0/iscsi/target-groups/test-group

성공한 삭제는 HTTP 상태 204(No Content)를 반환합니다.

HTTP/1.1 204 No-Content