9.3。 RESTCONF监控模块

    ietf-restconf-monitoring”模块定义了RESTCONF协议的监控信息。

    本模块使用[RFC6991]中的“ietf-yang-types”和“ietf-inet-types”模块来进行某些类型定义。

    <CODE BEGINS>

    file “ietf-restconf-monitoring@2017-01-26.yang”

    1. module ietf-restconf-monitoring {
    2. namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
    3. prefix "rcmon";
    4. import ietf-yang-types { prefix yang; }
    5. import ietf-inet-types { prefix inet; }
    6. organization
    7. "IETF NETCONF (Network Configuration) Working Group";
    8. contact
    9. "WG Web: <https://datatracker.ietf.org/wg/netconf/>
    10. WG List: <mailto:netconf@ietf.org>
    11. Author: Andy Bierman
    12. <mailto:andy@yumaworks.com>
    13. Author: Martin Bjorklund
    14. <mailto:mbj@tail-f.com>
    15. Author: Kent Watsen
    16. <mailto:kwatsen@juniper.net>";
    17. description
    18. "This module contains monitoring information for the
    19. RESTCONF protocol.
    20. Copyright (c) 2017 IETF Trust and the persons identified as
    21. authors of the code. All rights reserved.
    22. Redistribution and use in source and binary forms, with or
    23. without modification, is permitted pursuant to, and subject
    24. to the license terms contained in, the Simplified BSD License
    25. set forth in Section 4.c of the IETF Trust's Legal Provisions
    26. Relating to IETF Documents
    27. (http://trustee.ietf.org/license-info).
    28. This version of this YANG module is part of RFC 8040; see
    29. the RFC itself for full legal notices.";
    30. revision 2017-01-26 {
    31. description
    32. "Initial revision.";
    33. reference
    34. "RFC 8040: RESTCONF Protocol.";
    35. }
    36. container restconf-state {
    37. config false;
    38. description
    39. "Contains RESTCONF protocol monitoring information.";
    40. container capabilities {
    41. description
    42. "Contains a list of protocol capability URIs.";
    43. leaf-list capability {
    44. type inet:uri;
    45. description
    46. "A RESTCONF protocol capability URI.";
    47. }
    48. }
    49. container streams {
    50. description
    51. "Container representing the notification event streams
    52. supported by the server.";
    53. reference
    54. "RFC 5277, Section 3.4, <streams> element.";
    55. list stream {
    56. key name;
    57. description
    58. "Each entry describes an event stream supported by
    59. the server.";
    60. leaf name {
    61. type string;
    62. description
    63. "The stream name.";
    64. reference
    65. "RFC 5277, Section 3.4, <name> element.";
    66. }
    67. leaf description {
    68. type string;
    69. description
    70. "Description of stream content.";
    71. reference
    72. "RFC 5277, Section 3.4, <description> element.";
    73. }
    74. leaf replay-support {
    75. type boolean;
    76. default false;
    77. description
    78. "Indicates if replay buffer is supported for this stream.
    79. If 'true', then the server MUST support the 'start-time'
    80. and 'stop-time' query parameters for this stream.";
    81. reference
    82. "RFC 5277, Section 3.4, <replaySupport> element.";
    83. }
    84. leaf replay-log-creation-time {
    85. when "../replay-support" {
    86. description
    87. "Only present if notification replay is supported.";
    88. }
    89. type yang:date-and-time;
    90. description
    91. "Indicates the time the replay log for this stream
    92. was created.";
    93. reference
    94. "RFC 5277, Section 3.4, <replayLogCreationTime>
    95. element.";
    96. }
    97. list access {
    98. key encoding;
    99. min-elements 1;
    100. description
    101. "The server will create an entry in this list for each
    102. encoding format that is supported for this stream.
    103. The media type 'text/event-stream' is expected
    104. for all event streams. This list identifies the
    105. subtypes supported for this stream.";
    106. leaf encoding {
    107. type string;
    108. description
    109. "This is the secondary encoding format within the
    110. 'text/event-stream' encoding used by all streams.
    111. The type 'xml' is supported for XML encoding.
    112. The type 'json' is supported for JSON encoding.";
    113. }
    114. leaf location {
    115. type inet:uri;
    116. mandatory true;
    117. description
    118. "Contains a URL that represents the entry point
    119. for establishing notification delivery via
    120. server-sent events.";
    121. }
    122. }
    123. }
    124. }
    125. }
    126. }

    <CODE ENDS>