2017-09-17 4 views
1

양 1.1 사양이 예제를 가지고, 다음 예는 데이터 노드에 통지를 정의이 양 알림은 어떻게 유효합니까?

module example-interface-module { 
    yang-version 1.1; 
    namespace "urn:example:interface-module"; 
    prefix "if"; 

    container interfaces { 
    list interface { 
     key "name"; 
     leaf name { 
     type string; 
     } 
     notification interface-enabled { 
     leaf by-user { 
      type string; 
     } 
     } 
    } 
    } 
} 

전체 통지의 해당 XML 인스턴스 예 :

<notification 
    xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> 
    <eventTime>2008-07-08T00:01:00Z</eventTime> 
    <interfaces xmlns="urn:example:interface-module"> 
    <interface> 
     <name>eth1</name> 
     <interface-enabled> 
     <by-user>fred</by-user> 
     </interface-enabled> 
    </interface> 
    </interfaces> 
</notification> 

내 질문은, 때 서버에서 알림을 제기합니다. 알림 내용은 다음과 같을 것입니다.

<notification 
    xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> 
    <eventTime>2008-07-08T00:01:00Z</eventTime> 
    <interface-enabled xmlns="urn:example:interface-module"> 
     <by-user>fred</by-user> 
    </interface-enabled> 
</notification> 

부 그러한 통지는 통지가 관련된 데이터 노드를 식별하지 않고는 쓸모 없게된다.

나는, 내 질문에, 어떤 규칙/사양에 텍스트가 나를 얼마나 제대로

답변

2

https://tools.ietf.org/html/rfc7950#section-7.16.2

알림 노드는 데이터 노드에 아이로서 정의 된 페이로드를 형성 알려줍니다 같아요 [RFC5277]에 정의 된 요소는 데이터 저장소의 노드를 식별하는 노드의 계층 구조를 포함합니다. 최상위 수준부터 목록까지 컨테이너 및 목록 노드를 모두 포함하거나이라는 알림이 포함 된 컨테이너를 반드시 포함해야합니다.

알림 페이로드에는 모듈 루트까지의 모든 상위 컨테이너/목록이 포함되어야합니다. 그래야만 알림이 언급하는 정확한 노드를 식별 할 수 있습니다.