다음 표는 사용 가능한 복제 대상 명령을 보여 줍니다.
|
시스템에서 사용할 수 있는 모든 복제 대상을 나열합니다.
요청 예:
GET /api/service/v1/services/replication/targets HTTP/1.1 Host: zfssa-storage.example.com:215 Authorization: Basic ab6rt4psMWE= Accept: application/json
응답 예:
HTTP/1.1 200 OK X-Zfssa-Replication-Api: 1.0 Content-Type: application/json Content-Length: 529 { "targets": [{ "actions": 0, "address": "10.80.231.52:216", "asn": "fa5bf303-0dcb-e20d-ac92-cd129ccd2c81", "hostname": "luxor", "href": "/service/v1/services/replication/targets/target-000", "label": "luxor" }] }
이 명령은 대상 데이터에 사용할 수 있는 사용 가능한 스토리지 풀 목록을 포함하여 단일 복제 대상의 세부 정보를 나열합니다. 대상은 해당 href(target-000) 또는 <name>=<value> 선택에 의해 액세스됩니다.
요청 예:
GET api/service/v1/services/replication/targets/hostname=luxor HTTP/1.1 Authorization: Basic ab6rt4psMWE= Host: zfs-storage.example.com:215 Accept: application/json
응답 예:
HTTP/1.1 200 OK X-Zfssa-Replication-Api: 1.0 Content-Type: application/json Content-Length: 337 { "hostname=luxor": { "actions": 0, "address": "10.80.231.52:216", "asn": "fa5bf303-0dcb-e20d-ac92-cd129ccd2c81", "hostname": "luxor", "href": "/service/v1/services/replication/targets/hostname=luxor", "label": "luxor" } }
원격 복제에 대한 새 복제 대상을 만듭니다.
요청 예:
POST /api/replication/v1/targets HTTP/1.1 Authorization: Basic ab6rt4psMWE= Host: example.zfssa.com:215 Accept: application/json Content-Type: application/json Content-Length: 54 {"hostname":"example", “root_password”:”letmein”, “label”:”east”}
응답 예:
HTTP/1.1 201 Created Content-Length: 135 Content-Type: application/json Location: /service/v1/services/replication/targets/target-000 X-Zfssa-Replication-Api: 1.0 { "target": { "actions": 0, "address": "123.45.78.9:216", "asn": "fa5bf303-0dcb-e20d-ac92-cd129ccd2c81", "hostname": "example", "href": "/service/v1/services/replication/targets/target-000", "label": "east" } }
이 명령은 기존 복제 대상을 삭제합니다.
요청 예:
DELETE /service/v1/services/replication/targets/target-000 HTTP/1.1 Host: zfs-storage.example.com Authorization: Basic ab6rt4psMWE=
성공한 삭제는 HTTP 상태 204(No Content)를 반환합니다.
응답 예:
HTTP/1.1 204 No-Content X-Zfssa-Replication-Api: 1.0