Go to main content
Oracle® ZFS Storage Appliance RESTful API 설명서, 릴리스 OS8.6.x

인쇄 보기 종료

업데이트 날짜: 2016년 9월
 
 

대상 그룹

대상 그룹은 대상의 모음입니다.

표 57  대상 그룹 명령
요청
경로 /san/v1.0
설명
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>
지정된 대상-그룹 객체를 삭제합니다.

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

표 58  URI 매개변수
이름
설명
protocol
개시자(FC, iSCSI, SRP)에 대한 NAS 프로토콜
name
대상 그룹의 이름

대상 그룹 나열

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

요청 예:

GET /api/san/v1/iscsi/target-groups
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=
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.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008"
        ]
    }, {
        "href": "/api/san/v1/iscsi/target-groups/alt-group",
        ...
    }]
 }

대상 그룹 가져오기

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

요청 예:

GET /api/san/v1/iscsi/target-groups/test-group
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=
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.1986-03.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 abcd123MWE
Accept: application/json
Content-Type: application/json
Content-Length: 97

{"name":"test-group",
 "targets": ["iqn.1986-03.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.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008"]
    }
}

대상 그룹 삭제

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

요청 예:

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

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

HTTP/1.1 204 No-Content