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

인쇄 보기 종료

업데이트 날짜: 2016년 9월
 
 

복제 대상

다음 표는 사용 가능한 복제 대상 명령을 보여 줍니다.

표 96  복제 대상 명령
요청
경로 /api/storage/v1
설명
POST
/replication/targets
새 복제 대상을 만듭니다.
GET
/replication/targets/<target>
지정된 복제 대상 등록 정보를 가져옵니다.
GET
/replication/targets
모든 복제 대상 객체를 나열합니다.
PUT
/replication/targets/<target>
지정된 복제 대상 객체를 수정합니다.
DELETE
/replication/targets/<target>
지정된 대상 객체를 삭제합니다.

복제 대상 나열

시스템에서 사용할 수 있는 모든 복제 대상을 나열합니다.

요청 예:

GET /api/storage/v1/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": [{     
            "address": "10.133.64.44:216", 
            "label": "chum", 
            "hostname": "10.133.64.44", 
            "asn": "9d7a7543-ca83-68f5-a8fc-f818f65e1cfc", 
            "actions": 0, 
            "target": "target-000", 
            "href": "/api/storage/v1/replication/targets/chum" 
        }, { 
            "address": "10.153.34.165:216", 
            "label": "oakmeal-7320-165", 
            "hostname": "10.153.34.165", 
            "asn": "16a4c82c-26c1-4a50-e317-ac53181f2e86", 
            "actions": 0, 
            "target": "target-001", 
            "href": "/api/storage/v1/replication/targets/oakmeal-7320-165" 
        }] 
} 

복제 대상 가져오기

이 명령은 단일 복제 대상의 세부정보를 나열합니다. 대상은 해당 호스트 이름으로 액세스합니다.

요청 예:

GET /api/storage/v1/replication/targets/chum 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

{ 
        "target": { 
            "href": "/api/storage/v1/replication/targets/chum", 
            "address": "10.133.64.44:216", 
            "label": "chum", 
            "hostname": "10.133.64.44", 
            "asn": "9d7a7543-ca83-68f5-a8fc-f818f65e1cfc", 
            "actions": 0 
        } 
}

복제 대상 만들기

원격 복제에 대한 새 복제 대상을 만듭니다.

요청 예:

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