diff --git a/draft-yn-netmod-yang2.xml b/draft-yn-netmod-yang2.xml index 4f3b489..4e58fb1 100644 --- a/draft-yn-netmod-yang2.xml +++ b/draft-yn-netmod-yang2.xml @@ -1991,9 +1991,12 @@ For example, with these modules: prefix "a"; import b { - revision-date 2015-01-01; + revision-date 2015-01-01; + prefix b; + } + import c { + prefix c; } - import c; revision 2015-01-01; @@ -2472,11 +2475,11 @@ For example, consider the following definition: type decimal64 { fraction-digits 18; } - must ". <= 10"; + must ". <= 9"; } ]]> -An instance of the "lxiv" leaf having the value of 10.0000000000000001 +An instance of the "lxiv" leaf having the value of 9.0000000000000001 will then successfully pass validation.
@@ -2678,7 +2681,7 @@ The accessible tree for a notification "down" on /a/b[id="2"] is: The accessible tree for an action invocation of "reset" on ⁠/a⁠/b[id="1"] -with the "when" parameter set to "10" would be: +with the "delay" parameter set to "10" would be: @@ -4146,10 +4149,10 @@ passed as <error‑app‑tag> in the <rpc‑error> in NETCONF. leaf ifMTU { type uint32; } - must 'ifType != "ethernet" or ifMTU = 1500' { + must 'string(ifType) != "ethernet" or ifMTU = 1500' { error-message "An Ethernet MTU must be 1500"; } - must 'ifType != "atm" or' + must 'string(ifType) != "atm" or' + ' (ifMTU <= 17966 and ifMTU >= 64)' { error-message "An ATM MTU must be 64 .. 17966"; } @@ -7625,7 +7628,9 @@ module: } ]]> -A corresponding XML instance example of the complete notification: +A corresponding XML instance example of the complete notification +follows. This example reports an event for an interface from the +"example-foo" module defined in Section 13.1.1. 2008-07-08T00:01:00Z fault - + /ex:interface[ex:name='Ethernet0'] major @@ -7706,7 +7711,7 @@ MUST be used. If the "augment" statement is a substatement to the If the target node is a container, list, case, input, output, or -notification node, the "container", "leaf", "list", "leaf‑list", +notification node, the "anydata", "anyxml", "container", "leaf", "list", "leaf‑list", "uses", and "choice" statements can be used within the "augment" statement. @@ -8544,7 +8549,7 @@ statement. The properties to replace MUST exist in the target node. The argument "delete" deletes properties from the target node. The -properties to delete are identified by substatements to the "delete" +properties to delete are identified by substatements to the "deviate" statement. The substatement's keyword MUST match a corresponding keyword in the target node, and the argument's string MUST be equal to the corresponding keyword's argument string in the target node. @@ -8834,9 +8839,9 @@ context, in addition to the definition in If the "when" statement is a child of a "uses", "choice", or "case" statement, then the context node is the closest ancestor node to the -node with the "when" statement that is also a data node. If no +node with the "when" statement that is also a data node, rpc, action, or notification. If no such node exists, the context node is the root node. The accessible tree is tentatively altered during the processing of the XPath expression by removing all instances (if @@ -10355,9 +10360,12 @@ which the "path" statement is defined. The "require-instance" Statement The "require‑instance" statement, which is a substatement to the -"type" statement, MAY be present if the type is "instance‑identifier" -or "leafref". It takes as an argument the string "true" or "false". -If this statement is not present, it defaults to "true". +"type" statement, MAY be present if the type is "instance‑identifier", +"leafref" or a type derived from them. It takes as an argument the +string "true" or "false". If this statement is not present, it +defaults to "true". Tn the case the type is derived, it defaults +to the value specified by the closest parent type having the value +set, if any, else it defaults to "true". If "require‑instance" is "true", it means that the instance being @@ -11158,10 +11166,10 @@ submodule. ]]> The derived-from-or-self() function returns "true" if any node in the -argument "nodes" is a node of type "identityref" and -its value is an identity that is equal to or derived from -(see ) the identity "identity"; otherwise, -it returns "false". +argument "nodes" is a node of type "identityref" or a type derived +from "identityref", and its value is an identity that is equal to or +derived from (see ) the identity "identity"; +otherwise, it returns "false". The parameter "identity" is a string matching the rule @@ -11179,7 +11187,7 @@ The module defined in might al @@ -11264,7 +11272,7 @@ If an interface has this leaf: leaf flags { type bits { bit UP; - bit PROMISCUOUS + bit PROMISCUOUS; bit DISABLED; } } @@ -11402,7 +11410,7 @@ provided there is at least one "base" statement left.
  • -New typedefs, groupings, rpcs, notifications, extensions, features, +New typedefs, groupings, rpcs, actions, notifications, extensions, features, and identities may be added.
  • @@ -12948,7 +12956,17 @@ quoted-string = (DQUOTE string DQUOTE) / (SQUOTE string SQUOTE) path-arg-str = < a string that matches the rule > < path-arg > -path-arg = absolute-path / relative-path +path-arg = deref-expr / path-str + +deref-expr = deref-function-invocation *WSP "/" *WSP + relative-path + +path-str = absolute-path / relative-path + +deref-function-invocation = deref-keyword *WSP + "(" *WSP path-str *WSP ")" + +deref-keyword = %s"deref" absolute-path = 1*("/" (node-identifier *path-predicate))