대상 그룹은 대상의 모음입니다.
|
이러한 명령은 다음 URI 매개변수를 사용합니다.
|
어플라이언스에 대해 사용할 수 있는 모든 대상 그룹을 나열합니다. 성공 시 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