Oracle® ZFS Storage Appliance RESTful API 설명서, 릴리스 2013.1.5.0

인쇄 보기 종료

업데이트 날짜: 2016년 2월
 
 

복제 대상

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

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

복제 대상 나열

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

요청 예:

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