20.4. PTP 이벤트에 소비자 애플리케이션 구독
PTP 이벤트 소비자 애플리케이션에서 이벤트를 폴링하려면 먼저 애플리케이션을 이벤트 프로듀서에 가입해야 합니다.
20.4.1. PTP 잠금 이벤트 구독
PTP 잠금 상태 이벤트에 대한 서브스크립션을 생성하려면 다음 페이로드를 사용하여 http://localhost:8081/api/ocloudNotifications/v1/subscriptions 의 클라우드 이벤트 API에 POST 작업을 보냅니다.
{
"endpointUri": "http://localhost:8989/event",
"resource": "/cluster/node/<node_name>/sync/ptp-status/lock-state",
}응답 예
{
"id": "e23473d9-ba18-4f78-946e-401a0caeff90",
"endpointUri": "http://localhost:8989/event",
"uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions/e23473d9-ba18-4f78-946e-401a0caeff90",
"resource": "/cluster/node/<node_name>/sync/ptp-status/lock-state",
}
20.4.2. PTP os-clock-sync-state 이벤트 구독
PTP os-clock-sync-state 이벤트에 대한 서브스크립션을 생성하려면 다음 페이로드가 있는 http://localhost:8081/api/ocloudNotifications/v1/subscriptions 에서 클라우드 이벤트 API에 POST 작업을 보냅니다.
{
"endpointUri": "http://localhost:8989/event",
"resource": "/cluster/node/<node_name>/sync/sync-status/os-clock-sync-state",
}응답 예
{
"id": "e23473d9-ba18-4f78-946e-401a0caeff90",
"endpointUri": "http://localhost:8989/event",
"uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions/e23473d9-ba18-4f78-946e-401a0caeff90",
"resource": "/cluster/node/<node_name>/sync/sync-status/os-clock-sync-state",
}
20.4.3. PTP ptp-clock-class-change 이벤트 구독
PTP ptp-clock-class-change 이벤트에 대한 서브스크립션을 생성하려면 다음 페이로드를 사용하여 http://localhost:8081/api/ocloudNotifications/v1/subscriptions 에서 클라우드 이벤트 API에 POST 작업을 보냅니다.
{
"endpointUri": "http://localhost:8989/event",
"resource": "/cluster/node/<node_name>/sync/ptp-status/ptp-clock-class-change",
}응답 예
{
"id": "e23473d9-ba18-4f78-946e-401a0caeff90",
"endpointUri": "http://localhost:8989/event",
"uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions/e23473d9-ba18-4f78-946e-401a0caeff90",
"resource": "/cluster/node/<node_name>/sync/ptp-status/ptp-clock-class-change",
}