JavaScript is required to for searching.
탐색 링크 건너뛰기
인쇄 보기 종료
Oracle® ZFS Storage Appliance RESTful 응용 프로그램 프로그래밍 인터페이스 설명서
Oracle 기술 네트워크
라이브러리
PDF
인쇄 보기
피드백
search filter icon
search icon

문서 정보

이 설명서 사용

 1 개요

 2 API 작업

 3 경보 서비스 명령

 4 Analytics Services

 5 하드웨어 서비스

 6 로그 명령

 7 네트워크 명령

 8 문제 서비스 명령

 9 역할 서비스

 10 SAN 서비스

 11 서비스 명령

 12 스토리지 서비스

 13 시스템 명령

 14 사용자 서비스

 15 워크플로우 명령

 16 RESTful 클라이언트

Curl Rest 클라이언트

리소스 데이터 가져오기

새 리소스 만들기

기존 리소스 수정

기존 리소스 삭제

Python RESTful 클라이언트

리소스 가져오기

리소스 만들기

리소스 수정

기존 리소스 삭제

리소스 만들기

새 리소스를 만드는 Python 코드 예:

>>> action = {'category': 'network'}
>>> post_data = json.dumps(action)
>>> request = urllib2.Request("https://zfssa:215/api/alert/v1/actions", post_data)
>>> request.add_header('Content-Type', 'application/json')

>>> response = opener.open(request)
>>> response.getcode()
201
>>> response.info().getheader('Location')
'/api/alert/v1/actions/actions-001'
>>> body = json.loads(response.read())
>>> print json.dumps(body, sort_keys=True, indent=4)
{

        "actions": {
        "category": "network",
        "datalink_failed": true,

        "datalink_ok": true,
        "href":
        "/api/alert/v1/actions/actions-001",

        "ip_address_conflict": true,

        "ip_address_conflict_resolved": true,

        "ip_interface_degraded": true,
        "ip_interface_failed":
        true,
        "ip_interface_ok": true,

        "network_port_down": true,
        "network_port_up":
        true
    }
}