次の表に、使用可能なレプリケーションターゲットのコマンドを示します。
|
システム上の使用可能なレプリケーションターゲットをすべて一覧表示します。
リクエストの例:
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