|
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +Network Working Group %(initials)s %(surname)s |
| 6 | +Internet-Draft |
| 7 | +Intended status: Informational %(month)s %(year)s |
| 8 | +Expires: %(expiration)s |
| 9 | + |
| 10 | + |
| 11 | + %(title)s |
| 12 | + %(name)s |
| 13 | + |
| 14 | +Abstract |
| 15 | + |
| 16 | + This document describes how to test tests. |
| 17 | + |
| 18 | +Status of This Memo |
| 19 | + |
| 20 | + This Internet-Draft is submitted in full conformance with the |
| 21 | + provisions of BCP 78 and BCP 79. |
| 22 | + |
| 23 | + Internet-Drafts are working documents of the Internet Engineering |
| 24 | + Task Force (IETF). Note that other groups may also distribute |
| 25 | + working documents as Internet-Drafts. The list of current Internet- |
| 26 | + Drafts is at http://datatracker.ietf.org/drafts/current/. |
| 27 | + |
| 28 | + Internet-Drafts are draft documents valid for a maximum of six months |
| 29 | + and may be updated, replaced, or obsoleted by other documents at any |
| 30 | + time. It is inappropriate to use Internet-Drafts as reference |
| 31 | + material or to cite them other than as "work in progress." |
| 32 | + |
| 33 | + This Internet-Draft will expire on %(expiration)s. |
| 34 | + |
| 35 | +Copyright Notice |
| 36 | + |
| 37 | + Copyright (c) %(year)s IETF Trust and the persons identified as the |
| 38 | + document authors. All rights reserved. |
| 39 | + |
| 40 | + This document is subject to BCP 78 and the IETF Trust's Legal |
| 41 | + Provisions Relating to IETF Documents |
| 42 | + (http://trustee.ietf.org/license-info) in effect on the date of |
| 43 | + publication of this document. Please review these documents |
| 44 | + carefully, as they describe your rights and restrictions with respect |
| 45 | + to this document. Code Components extracted from this document must |
| 46 | + include Simplified BSD License text as described in Section 4.e of |
| 47 | + the Trust Legal Provisions and are provided without warranty as |
| 48 | + described in the Simplified BSD License. |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +Name Expires %(expiration)s [Page 1] |
| 57 | + |
| 58 | +Internet-Draft Testing Tests %(month)s %(year)s |
| 59 | + |
| 60 | + |
| 61 | +Table of Contents |
| 62 | + |
| 63 | + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 |
| 64 | + 2. Yang . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 |
| 65 | + 3. JSON example . . . . . . . . . . . . . . . . . . . . . . . . 2 |
| 66 | + 4. Security Considerations . . . . . . . . . . . . . . . . . . . 2 |
| 67 | + 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 2 |
| 68 | + 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 2 |
| 69 | + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 2 |
| 70 | + |
| 71 | +1. Introduction |
| 72 | + |
| 73 | + This document describes a protocol for testing tests. |
| 74 | + |
| 75 | +2. Yang |
| 76 | + |
| 77 | + <CODE BEGINS> file "ietf-yang-metadata@2016-08-05.yang" |
| 78 | + |
| 79 | + module ietf-yang-metadata { |
| 80 | + |
| 81 | + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata"; |
| 82 | + |
| 83 | + prefix "md"; |
| 84 | + |
| 85 | + organization |
| 86 | + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; |
| 87 | + |
| 88 | + contact |
| 89 | + "WG Web: <https://datatracker.ietf.org/wg/netmod/> |
| 90 | + |
| 91 | + WG List: <mailto:netmod@ietf.org> |
| 92 | + |
| 93 | + WG Chair: Lou Berger |
| 94 | + <mailto:lberger@labn.net> |
| 95 | + |
| 96 | + WG Chair: Kent Watsen |
| 97 | + <mailto:kwatsen@juniper.net> |
| 98 | + |
| 99 | + Editor: Ladislav Lhotka |
| 100 | + <mailto:lhotka@nic.cz>"; |
| 101 | + |
| 102 | + description |
| 103 | + "This YANG module defines an 'extension' statement that allows |
| 104 | + for defining metadata annotations. |
| 105 | + |
| 106 | + Copyright (c) 2016 IETF Trust and the persons identified as |
| 107 | + authors of the code. All rights reserved. |
| 108 | + |
| 109 | + Redistribution and use in source and binary forms, with or |
| 110 | + without modification, is permitted pursuant to, and subject to |
| 111 | + the license terms contained in, the Simplified BSD License set |
| 112 | + forth in Section 4.c of the IETF Trust's Legal Provisions |
| 113 | + Relating to IETF Documents |
| 114 | + (http://trustee.ietf.org/license-info). |
| 115 | + |
| 116 | + This version of this YANG module is part of RFC 7952 |
| 117 | + (http://www.rfc-editor.org/info/rfc7952); see the RFC itself |
| 118 | + for full legal notices."; |
| 119 | + |
| 120 | + revision 2016-08-05 { |
| 121 | + description |
| 122 | + "Initial revision."; |
| 123 | + reference |
| 124 | + "RFC 7952: Defining and Using Metadata with YANG"; |
| 125 | + } |
| 126 | + |
| 127 | + extension annotation { |
| 128 | + argument name; |
| 129 | + description |
| 130 | + "This extension allows for defining metadata annotations in |
| 131 | + YANG modules. The 'md:annotation' statement can appear only |
| 132 | + at the top level of a YANG module or submodule, i.e., it |
| 133 | + becomes a new alternative in the ABNF production rule for |
| 134 | + 'body-stmts' (Section 14 in RFC 7950). |
| 135 | + |
| 136 | + The argument of the 'md:annotation' statement defines the name |
| 137 | + of the annotation. Syntactically, it is a YANG identifier as |
| 138 | + defined in Section 6.2 of RFC 7950. |
| 139 | + |
| 140 | + An annotation defined with this 'extension' statement inherits |
| 141 | + the namespace and other context from the YANG module in which |
| 142 | + it is defined. |
| 143 | + |
| 144 | + The data type of the annotation value is specified in the same |
| 145 | + way as for a leaf data node using the 'type' statement. |
| 146 | + |
| 147 | + The semantics of the annotation and other documentation can be |
| 148 | + specified using the following standard YANG substatements (all |
| 149 | + are optional): 'description', 'if-feature', 'reference', |
| 150 | + 'status', and 'units'. |
| 151 | + |
| 152 | + A server announces support for a particular annotation by |
| 153 | + including the module in which the annotation is defined among |
| 154 | + the advertised YANG modules, e.g., in a NETCONF <hello> |
| 155 | + message or in the YANG library (RFC 7950). The annotation can |
| 156 | + then be attached to any instance of a data node defined in any |
| 157 | + YANG module that is advertised by the server. |
| 158 | + |
| 159 | + XML encoding and JSON encoding of annotations are defined in |
| 160 | + RFC 7952."; |
| 161 | + } |
| 162 | + } |
| 163 | + |
| 164 | + <CODE ENDS> |
| 165 | + |
| 166 | +3. JSON example |
| 167 | + |
| 168 | + The JSON object should look like this: |
| 169 | + |
| 170 | + { |
| 171 | + "test": 1234 |
| 172 | + } |
| 173 | + |
| 174 | +4. Security Considerations |
| 175 | + |
| 176 | + There are none. |
| 177 | + |
| 178 | +5. IANA Considerations |
| 179 | + |
| 180 | + No new registrations for IANA. |
| 181 | + |
| 182 | + [RFC8175] is mentioned here in order to give the reference |
| 183 | + classification code a chance to mess up. |
| 184 | + |
| 185 | + |
| 186 | +6. References |
| 187 | + |
| 188 | +6.1. Normative References |
| 189 | + |
| 190 | + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate |
| 191 | + Requirement Levels", BCP 14, RFC 2119, |
| 192 | + DOI 10.17487/RFC2119, March 1997, |
| 193 | + <https://www.rfc-editor.org/info/rfc2119>. |
| 194 | + |
| 195 | + [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC |
| 196 | + 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, |
| 197 | + May 2017, <https://www.rfc-editor.org/info/rfc8174>. |
| 198 | + |
| 199 | +6.2. Informative References |
| 200 | + |
| 201 | + [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for |
| 202 | + Writing an IANA Considerations Section in RFCs", BCP 26, |
| 203 | + RFC 8126, DOI 10.17487/RFC8126, June 2017, |
| 204 | + <https://www.rfc-editor.org/info/rfc8126>. |
| 205 | + |
| 206 | + [RFC8175] Ratliff, S., Jury, S., Satterwhite, D., Taylor, R., and B. |
| 207 | + Berry, "Dynamic Link Exchange Protocol (DLEP)", RFC 8175, |
| 208 | + DOI 10.17487/RFC8175, June 2017, |
| 209 | + <https://www.rfc-editor.org/info/rfc8175>. |
| 210 | + |
| 211 | +Author's Address |
| 212 | + |
| 213 | + %(author)s |
| 214 | + |
| 215 | + Email: %(email)s |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | +Appendix A. Comments |
| 220 | + |
| 221 | + [RFC8174] is mentioned here just to give the reference classification |
| 222 | + code a chance to mess up. |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | +Name Expires %(expiration)s [Page 2] |
0 commit comments