Bug 7735 - Update restconf models by RFC 8040 03/51403/3
authorJakub Toth <jatoth@cisco.com>
Fri, 3 Feb 2017 14:20:45 +0000 (15:20 +0100)
committerJakub Toth <jatoth@cisco.com>
Wed, 8 Feb 2017 11:26:40 +0000 (11:26 +0000)
  * rename base class Draft18 -> Rfc8040

Change-Id: I60da9a81472fb86f8a4e2bb2df6d90c0e58ec9e4
Signed-off-by: Jakub Toth <jatoth@cisco.com>
44 files changed:
restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2016-08-15.yang [deleted file]
restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2017-01-26.yang [new file with mode: 0644]
restconf/models/ietf-restconf/src/main/yang/ietf-restconf@2016-08-15.yang [deleted file]
restconf/models/ietf-restconf/src/main/yang/ietf-restconf@2017-01-26.yang [new file with mode: 0644]
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaExportContentYangBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaExportContentYinBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/api/Draft02.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonNormalizedNodeBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHJsonBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHXmlBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/streams/listeners/AbstractNotificationsData.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Rfc8040.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Draft18.java with 95% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/api/RestconfOperationsService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/api/RestconfSchemaService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/api/RestconfService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/impl/RestconfImpl.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/common/references/SchemaContextRef.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/handlers/SchemaContextHandler.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/JsonNormalizedNodeBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/JsonToPATCHBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/NormalizedNodeJsonBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/NormalizedNodeXmlBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/XmlNormalizedNodeBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/XmlToPATCHBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfDataService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfInvokeOperationsService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/utils/SubscribeToStreamUtil.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/mapping/RestconfMappingNodeUtil.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/base/services/impl/RestconfImplTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/utils/mapping/RestconfMappingNodeUtilTest.java
restconf/sal-rest-connector/src/test/resources/invoke-rpc/ietf-restconf-monitoring@2016-08-15.yang [deleted file]
restconf/sal-rest-connector/src/test/resources/invoke-rpc/ietf-restconf-monitoring@2017-01-26.yang [new file with mode: 0644]
restconf/sal-rest-connector/src/test/resources/jukebox/ietf-restconf-monitoring@2016-08-15.yang [deleted file]
restconf/sal-rest-connector/src/test/resources/jukebox/ietf-restconf-monitoring@2017-01-26.yang [new file with mode: 0644]
restconf/sal-rest-connector/src/test/resources/modules/ietf-restconf-monitoring@2016-08-15.yang [deleted file]
restconf/sal-rest-connector/src/test/resources/modules/ietf-restconf-monitoring@2017-01-26.yang [new file with mode: 0644]
restconf/sal-rest-connector/src/test/resources/modules/modules-behind-mount-point/ietf-restconf-monitoring@2016-08-15.yang [deleted file]
restconf/sal-rest-connector/src/test/resources/modules/modules-behind-mount-point/ietf-restconf-monitoring@2017-01-26.yang [new file with mode: 0644]
restconf/sal-rest-connector/src/test/resources/notifications/ietf-restconf-monitoring@2016-08-15.yang [deleted file]
restconf/sal-rest-connector/src/test/resources/notifications/ietf-restconf-monitoring@2017-01-26.yang [new file with mode: 0644]
restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf-monitoring@2016-08-15.yang [deleted file]
restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf-monitoring@2017-01-26.yang [new file with mode: 0644]
restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf@2016-08-15.yang [deleted file]
restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf@2017-01-26.yang [new file with mode: 0644]

diff --git a/restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2016-08-15.yang b/restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2016-08-15.yang
deleted file mode 100644 (file)
index 8204141..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-module ietf-restconf-monitoring {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-  prefix "rcmon";
-
-  import ietf-yang-types { prefix yang; }
-  import ietf-inet-types { prefix inet; }
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains monitoring information for the
-     RESTCONF protocol.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  container restconf-state {
-    config false;
-    description
-      "Contains RESTCONF protocol monitoring information.";
-
-    container capabilities {
-      description
-        "Contains a list of protocol capability URIs";
-
-      leaf-list capability {
-        type inet:uri;
-        description "A RESTCONF protocol capability URI.";
-      }
-    }
-
-    container streams {
-      description
-        "Container representing the notification event streams
-         supported by the server.";
-       reference
-         "RFC 5277, Section 3.4, <streams> element.";
-
-      list stream {
-        key name;
-        description
-          "Each entry describes an event stream supported by
-           the server.";
-
-        leaf name {
-          type string;
-          description "The stream name";
-          reference "RFC 5277, Section 3.4, <name> element.";
-        }
-
-        leaf description {
-          type string;
-          description "Description of stream content";
-          reference
-            "RFC 5277, Section 3.4, <description> element.";
-        }
-
-        leaf replay-support {
-          type boolean;
-          default false;
-          description
-            "Indicates if replay buffer supported for this stream.
-             If 'true', then the server MUST support the 'start-time'
-             and 'stop-time' query parameters for this stream.";
-          reference
-            "RFC 5277, Section 3.4, <replaySupport> element.";
-        }
-
-        leaf replay-log-creation-time {
-          when "../replay-support" {
-            description
-              "Only present if notification replay is supported";
-          }
-          type yang:date-and-time;
-          description
-            "Indicates the time the replay log for this stream
-             was created.";
-          reference
-            "RFC 5277, Section 3.4, <replayLogCreationTime>
-             element.";
-        }
-
-        list access {
-          key encoding;
-          min-elements 1;
-          description
-            "The server will create an entry in this list for each
-             encoding format that is supported for this stream.
-             The media type 'text/event-stream' is expected
-             for all event streams. This list identifies the
-             sub-types supported for this stream.";
-
-          leaf encoding {
-            type string;
-            description
-              "This is the secondary encoding format within the
-               'text/event-stream' encoding used by all streams.
-               The type 'xml' is supported for XML encoding.
-               The type 'json' is supported for JSON encoding.";
-          }
-
-          leaf location {
-            type inet:uri;
-            mandatory true;
-            description
-              "Contains a URL that represents the entry point
-               for establishing notification delivery via server
-               sent events.";
-          }
-        }
-      }
-    }
-  }
-
-}
diff --git a/restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2017-01-26.yang b/restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2017-01-26.yang
new file mode 100644 (file)
index 0000000..55c3cb1
--- /dev/null
@@ -0,0 +1,149 @@
+module ietf-restconf-monitoring {
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
+     prefix "rcmon";
+
+     import ietf-yang-types { prefix yang; }
+     import ietf-inet-types { prefix inet; }
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains monitoring information for the
+        RESTCONF protocol.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     container restconf-state {
+       config false;
+       description
+         "Contains RESTCONF protocol monitoring information.";
+
+       container capabilities {
+         description
+           "Contains a list of protocol capability URIs.";
+
+         leaf-list capability {
+           type inet:uri;
+           description
+             "A RESTCONF protocol capability URI.";
+         }
+       }
+
+       container streams {
+         description
+           "Container representing the notification event streams
+            supported by the server.";
+          reference
+            "RFC 5277, Section 3.4, <streams> element.";
+
+         list stream {
+           key name;
+           description
+             "Each entry describes an event stream supported by
+              the server.";
+
+           leaf name {
+             type string;
+             description
+               "The stream name.";
+             reference
+               "RFC 5277, Section 3.4, <name> element.";
+           }
+
+           leaf description {
+             type string;
+             description
+               "Description of stream content.";
+             reference
+               "RFC 5277, Section 3.4, <description> element.";
+           }
+
+           leaf replay-support {
+             type boolean;
+             default false;
+             description
+               "Indicates if replay buffer is supported for this stream.
+                If 'true', then the server MUST support the 'start-time'
+                and 'stop-time' query parameters for this stream.";
+             reference
+               "RFC 5277, Section 3.4, <replaySupport> element.";
+           }
+
+           leaf replay-log-creation-time {
+             when "../replay-support" {
+               description
+                 "Only present if notification replay is supported.";
+             }
+             type yang:date-and-time;
+             description
+               "Indicates the time the replay log for this stream
+                was created.";
+             reference
+               "RFC 5277, Section 3.4, <replayLogCreationTime>
+                element.";
+           }
+
+           list access {
+             key encoding;
+             min-elements 1;
+             description
+               "The server will create an entry in this list for each
+                encoding format that is supported for this stream.
+                The media type 'text/event-stream' is expected
+                for all event streams.  This list identifies the
+                subtypes supported for this stream.";
+
+             leaf encoding {
+               type string;
+               description
+                 "This is the secondary encoding format within the
+                  'text/event-stream' encoding used by all streams.
+                  The type 'xml' is supported for XML encoding.
+                  The type 'json' is supported for JSON encoding.";
+             }
+
+             leaf location {
+               type inet:uri;
+               mandatory true;
+               description
+                 "Contains a URL that represents the entry point
+                  for establishing notification delivery via
+                  server-sent events.";
+             }
+           }
+         }
+       }
+     }
+}
diff --git a/restconf/models/ietf-restconf/src/main/yang/ietf-restconf@2016-08-15.yang b/restconf/models/ietf-restconf/src/main/yang/ietf-restconf@2016-08-15.yang
deleted file mode 100644 (file)
index 2f642de..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-module ietf-restconf {
-  yang-version 1.1;
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf";
-  prefix "rc";
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains conceptual YANG specifications
-     for basic RESTCONF media type definitions used in
-     RESTCONF protocol messages.
-     Note that the YANG definitions within this module do not
-     represent configuration data of any kind.
-     The 'restconf-media-type' YANG extension statement
-     provides a normative syntax for XML and JSON message
-     encoding purposes.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  extension yang-data {
-    argument name {
-      yin-element true;
-    }
-    description
-      "This extension is used to specify a YANG data template which
-       represents conceptual data defined in YANG. It is
-       intended to describe hierarchical data independent of
-       protocol context or specific message encoding format.
-       Data definition statements within a yang-data extension
-       specify the generic syntax for the specific YANG data
-       template, whose name is the argument of the yang-data
-       extension statement.
-       Note that this extension does not define a media-type.
-       A specification using this extension MUST specify the
-       message encoding rules, including the content media type.
-       The mandatory 'name' parameter value identifies the YANG
-       data template that is being defined. It contains the
-       template name.
-       This extension is ignored unless it appears as a top-level
-       statement. It MUST contain data definition statements
-       that result in exactly one container data node definition.
-       An instance of a YANG data template can thus be translated
-       into an XML instance document, whose top-level element
-       corresponds to the top-level container.
-       The module name and namespace value for the YANG module using
-       the extension statement is assigned to instance document data
-       conforming to the data definition statements within
-       this extension.
-       The sub-statements of this extension MUST follow the
-       'data-def-stmt' rule in the YANG ABNF.
-       The XPath document root is the extension statement itself,
-       such that the child nodes of the document root are
-       represented by the data-def-stmt sub-statements within
-       this extension. This conceptual document is the context
-       for the following YANG statements:
-         - must-stmt
-         - when-stmt
-         - path-stmt
-         - min-elements-stmt
-         - max-elements-stmt
-         - mandatory-stmt
-         - unique-stmt
-         - ordered-by
-         - instance-identifier data type
-       The following data-def-stmt sub-statements are constrained
-       when used within a yang-data-resource extension statement.
-         - The list-stmt is not required to have a key-stmt defined.
-         - The if-feature-stmt is ignored if present.
-         - The config-stmt is ignored if present.
-         - The available identity values for any 'identityref'
-           leaf or leaf-list nodes is limited to the module
-           containing this extension statement, and the modules
-           imported into that module.
-      ";
-  }
-
-  rc:yang-data yang-errors {
-    uses errors;
-  }
-
-  rc:yang-data yang-api {
-    uses restconf;
-  }
-
-  grouping errors {
-    description
-      "A grouping that contains a YANG container
-       representing the syntax and semantics of a
-       YANG Patch errors report within a response message.";
-
-    container errors {
-      description
-        "Represents an error report returned by the server if
-         a request results in an error.";
-
-      list error {
-        description
-          "An entry containing information about one
-           specific error that occurred while processing
-           a RESTCONF request.";
-        reference "RFC 6241, Section 4.3";
-
-        leaf error-type {
-          type enumeration {
-            enum transport {
-              description "The transport layer";
-            }
-            enum rpc {
-              description "The rpc or notification layer";
-            }
-            enum protocol {
-              description "The protocol operation layer";
-            }
-            enum application {
-              description "The server application layer";
-            }
-          }
-          mandatory true;
-          description
-            "The protocol layer where the error occurred.";
-        }
-
-        leaf error-tag {
-          type string;
-          mandatory true;
-          description
-            "The enumerated error tag.";
-        }
-
-        leaf error-app-tag {
-          type string;
-          description
-            "The application-specific error tag.";
-        }
-
-        leaf error-path {
-          type instance-identifier;
-          description
-            "The YANG instance identifier associated
-             with the error node.";
-        }
-
-        leaf error-message {
-          type string;
-          description
-            "A message describing the error.";
-        }
-
-        anydata error-info {
-           description
-             "This anydata value MUST represent a container with
-             zero or more data nodes representing additional
-             error information.";
-        }
-      }
-    }
-  }
-
-  grouping restconf {
-    description
-      "Conceptual grouping representing the RESTCONF
-       root resource.";
-
-    container restconf {
-      description
-        "Conceptual container representing the RESTCONF
-         root resource.";
-
-      container data {
-        description
-          "Container representing the datastore resource.
-           Represents the conceptual root of all state data
-           and configuration data supported by the server.
-           The child nodes of this container can be any data
-           resource which are defined as top-level data nodes
-           from the YANG modules advertised by the server in
-           the ietf-yang-library module.";
-      }
-
-      container operations {
-        description
-          "Container for all operation resources.
-           Each resource is represented as an empty leaf with the
-           name of the RPC operation from the YANG rpc statement.
-           For example, the 'system-restart' RPC operation defined
-           in the 'ietf-system' module would be represented as
-           an empty leaf in the 'ietf-system' namespace. This is
-           a conceptual leaf, and will not actually be found in
-           the module:
-              module ietf-system {
-                leaf system-reset {
-                  type empty;
-                }
-              }
-           To invoke the 'system-restart' RPC operation:
-              POST /restconf/operations/ietf-system:system-restart
-           To discover the RPC operations supported by the server:
-              GET /restconf/operations
-           In XML the YANG module namespace identifies the module:
-             <system-restart
-                xmlns='urn:ietf:params:xml:ns:yang:ietf-system' />
-           In JSON the YANG module name identifies the module:
-             { 'ietf-system:system-restart' : [null] }
-          ";
-      }
-
-      leaf yang-library-version {
-        type string {
-          pattern '\d{4}-\d{2}-\d{2}';
-        }
-        config false;
-        mandatory true;
-        description
-          "Identifies the revision date of the ietf-yang-library
-           module that is implemented by this RESTCONF server.
-           Indicates the year, month, and day in YYYY-MM-DD
-           numeric format.";
-      }
-    }
-  }
-
-}
diff --git a/restconf/models/ietf-restconf/src/main/yang/ietf-restconf@2017-01-26.yang b/restconf/models/ietf-restconf/src/main/yang/ietf-restconf@2017-01-26.yang
new file mode 100644 (file)
index 0000000..dc54388
--- /dev/null
@@ -0,0 +1,279 @@
+module ietf-restconf {
+     yang-version 1.1;
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf";
+     prefix "rc";
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains conceptual YANG specifications
+        for basic RESTCONF media type definitions used in
+        RESTCONF protocol messages.
+
+        Note that the YANG definitions within this module do not
+        represent configuration data of any kind.
+        The 'restconf-media-type' YANG extension statement
+        provides a normative syntax for XML and JSON
+        message-encoding purposes.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     extension yang-data {
+       argument name {
+         yin-element true;
+       }
+       description
+         "This extension is used to specify a YANG data template that
+          represents conceptual data defined in YANG.  It is
+          intended to describe hierarchical data independent of
+          protocol context or specific message-encoding format.
+          Data definition statements within a yang-data extension
+          specify the generic syntax for the specific YANG data
+          template, whose name is the argument of the 'yang-data'
+          extension statement.
+
+          Note that this extension does not define a media type.
+          A specification using this extension MUST specify the
+          message-encoding rules, including the content media type.
+
+          The mandatory 'name' parameter value identifies the YANG
+          data template that is being defined.  It contains the
+          template name.
+
+          This extension is ignored unless it appears as a top-level
+          statement.  It MUST contain data definition statements
+          that result in exactly one container data node definition.
+          An instance of a YANG data template can thus be translated
+          into an XML instance document, whose top-level element
+          corresponds to the top-level container.
+
+          The module name and namespace values for the YANG module using
+          the extension statement are assigned to instance document data
+          conforming to the data definition statements within
+          this extension.
+
+          The substatements of this extension MUST follow the
+          'data-def-stmt' rule in the YANG ABNF.
+
+          The XPath document root is the extension statement itself,
+          such that the child nodes of the document root are
+          represented by the data-def-stmt substatements within
+          this extension.  This conceptual document is the context
+          for the following YANG statements:
+
+            - must-stmt
+            - when-stmt
+            - path-stmt
+            - min-elements-stmt
+            - max-elements-stmt
+            - mandatory-stmt
+            - unique-stmt
+            - ordered-by
+            - instance-identifier data type
+
+          The following data-def-stmt substatements are constrained
+          when used within a 'yang-data' extension statement.
+
+            - The list-stmt is not required to have a key-stmt defined.
+            - The if-feature-stmt is ignored if present.
+            - The config-stmt is ignored if present.
+            - The available identity values for any 'identityref'
+              leaf or leaf-list nodes are limited to the module
+              containing this extension statement and the modules
+              imported into that module.
+         ";
+     }
+
+     rc:yang-data yang-errors {
+       uses errors;
+     }
+
+     rc:yang-data yang-api {
+       uses restconf;
+     }
+
+     grouping errors {
+       description
+         "A grouping that contains a YANG container
+          representing the syntax and semantics of a
+          YANG Patch error report within a response message.";
+
+       container errors {
+         description
+           "Represents an error report returned by the server if
+            a request results in an error.";
+
+         list error {
+           description
+             "An entry containing information about one
+              specific error that occurred while processing
+              a RESTCONF request.";
+           reference
+             "RFC 6241, Section 4.3.";
+
+           leaf error-type {
+             type enumeration {
+               enum transport {
+                 description
+                   "The transport layer.";
+               }
+               enum rpc {
+                 description
+                   "The rpc or notification layer.";
+               }
+               enum protocol {
+                 description
+                   "The protocol operation layer.";
+               }
+               enum application {
+                 description
+                   "The server application layer.";
+               }
+             }
+             mandatory true;
+             description
+               "The protocol layer where the error occurred.";
+           }
+
+           leaf error-tag {
+             type string;
+             mandatory true;
+             description
+               "The enumerated error-tag.";
+           }
+
+           leaf error-app-tag {
+             type string;
+             description
+               "The application-specific error-tag.";
+           }
+
+           leaf error-path {
+             type instance-identifier;
+             description
+               "The YANG instance identifier associated
+                with the error node.";
+           }
+
+           leaf error-message {
+             type string;
+             description
+               "A message describing the error.";
+           }
+
+           anydata error-info {
+              description
+                "This anydata value MUST represent a container with
+                 zero or more data nodes representing additional
+                 error information.";
+           }
+         }
+       }
+     }
+
+     grouping restconf {
+       description
+         "Conceptual grouping representing the RESTCONF
+          root resource.";
+
+       container restconf {
+         description
+           "Conceptual container representing the RESTCONF
+            root resource.";
+
+         container data {
+           description
+             "Container representing the datastore resource.
+              Represents the conceptual root of all state data
+              and configuration data supported by the server.
+              The child nodes of this container can be any data
+              resources that are defined as top-level data nodes
+              from the YANG modules advertised by the server in
+              the 'ietf-yang-library' module.";
+         }
+
+         container operations {
+           description
+             "Container for all operation resources.
+
+              Each resource is represented as an empty leaf with the
+              name of the RPC operation from the YANG 'rpc' statement.
+
+              For example, the 'system-restart' RPC operation defined
+              in the 'ietf-system' module would be represented as
+              an empty leaf in the 'ietf-system' namespace.  This is
+              a conceptual leaf and will not actually be found in
+              the module:
+
+                 module ietf-system {
+                   leaf system-reset {
+                     type empty;
+                   }
+                 }
+
+              To invoke the 'system-restart' RPC operation:
+
+                 POST /restconf/operations/ietf-system:system-restart
+
+              To discover the RPC operations supported by the server:
+
+                 GET /restconf/operations
+
+              In XML, the YANG module namespace identifies the module:
+
+                <system-restart
+                   xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/>
+
+              In JSON, the YANG module name identifies the module:
+
+                { 'ietf-system:system-restart' : [null] }
+             ";
+         }
+
+         leaf yang-library-version {
+           type string {
+             pattern '\d{4}-\d{2}-\d{2}';
+           }
+           config false;
+           mandatory true;
+           description
+             "Identifies the revision date of the 'ietf-yang-library'
+              module that is implemented by this RESTCONF server.
+              Indicates the year, month, and day in YYYY-MM-DD
+              numeric format.";
+         }
+       }
+     }
+}
index 8d7632733bb2f2674b72a31e1b1ca6aa02306803..abc2ee87e1240e4befa62a7c0d5d2ba2efaa9bbd 100644 (file)
@@ -18,10 +18,10 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 
 @Provider
-@Produces({ SchemaRetrievalService.YANG_MEDIA_TYPE, Draft18.MediaTypes.YANG })
+@Produces({ SchemaRetrievalService.YANG_MEDIA_TYPE, Rfc8040.MediaTypes.YANG })
 public class SchemaExportContentYangBodyWriter implements MessageBodyWriter<SchemaExportContext> {
 
     @Override
index 76a9c4a0ddc7a89cdc46bd5fbf2e99e34b771b48..9b3351cc30574d8a97fab9f45a0b78de2e3c4ce6 100644 (file)
@@ -18,12 +18,12 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 import javax.xml.stream.XMLStreamException;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.model.export.YinExportUtils;
 
 @Provider
-@Produces({ SchemaRetrievalService.YIN_MEDIA_TYPE, Draft18.MediaTypes.YIN + RestconfConstants.XML })
+@Produces({ SchemaRetrievalService.YIN_MEDIA_TYPE, Rfc8040.MediaTypes.YIN + RestconfConstants.XML })
 public class SchemaExportContentYinBodyWriter implements MessageBodyWriter<SchemaExportContext> {
 
     @Override
index 0b1d28772727ac5408916dff0498158cbbed2c8b..8a122e7843a516d00fa22ef5de6c813deb9356aa 100644 (file)
@@ -7,12 +7,12 @@
  */
 package org.opendaylight.netconf.sal.rest.api;
 
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.yangtools.yang.common.QName;
 
 /**
  * @deprecated Do not use old implementation of restconf draft. It will be
- *             replaced by {@link Draft18}.
+ *             replaced by {@link Rfc8040}.
  *
  */
 @Deprecated
index 305e0067408dc208dc0f0b25d13f2db8ec8f3c80..226d07360ae7bc5c968862a3cd51b60c861ab5e0 100644 (file)
@@ -30,7 +30,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
@@ -53,7 +53,7 @@ import org.slf4j.LoggerFactory;
 
 @Provider
 @Consumes({ Draft02.MediaTypes.DATA + RestconfService.JSON, Draft02.MediaTypes.OPERATION + RestconfService.JSON,
-        Draft18.MediaTypes.DATA + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
+        Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
 public class JsonNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader<NormalizedNodeContext> {
 
     private final static Logger LOG = LoggerFactory.getLogger(JsonNormalizedNodeBodyReader.class);
index 8165704c9ceb02c4d59327c51b78c591fa2f536c..59e13927f5611edd3cccdc73b3ce06e1fe1ef37e 100644 (file)
@@ -27,14 +27,14 @@ import org.opendaylight.netconf.sal.rest.api.RestconfService;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.codec.gson.JsonWriterFactory;
 
 
 @Provider
 @Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.JSON,
-        Draft18.MediaTypes.PATCH_STATUS + RestconfConstants.JSON})
+        Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.JSON})
 public class PATCHJsonBodyWriter implements MessageBodyWriter<PATCHStatusContext> {
 
     @Override
index 0918d509e6296751aab2bb8e6818bb113ff10d43..9a60cabc5e721e4d74468153c7e218defe8149af 100644 (file)
@@ -29,12 +29,12 @@ import org.opendaylight.netconf.sal.rest.api.RestconfService;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 @Provider
 @Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.XML,
-        Draft18.MediaTypes.PATCH_STATUS + RestconfConstants.XML})
+        Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.XML})
 public class PATCHXmlBodyWriter implements MessageBodyWriter<PATCHStatusContext> {
 
     private static final XMLOutputFactory XML_FACTORY;
index 14c70a699450f3927579fea6fdd9400641f8939f..ad90eeedfa234227e896c4eff828e5d51b9cc83e 100644 (file)
@@ -26,7 +26,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
-import org.opendaylight.restconf.Draft18.MonitoringModule;
+import org.opendaylight.restconf.Rfc8040.MonitoringModule;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.handlers.TransactionChainHandler;
 import org.opendaylight.restconf.parser.IdentifierCodec;
similarity index 95%
rename from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Draft18.java
rename to restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Rfc8040.java
index 9f0e93ef7788b913f0606f7868152fb099e55129..9ff4fb127ba2be42f4f46300c0fd1b03a5a26fc9 100644 (file)
@@ -12,6 +12,7 @@ import java.net.URISyntaxException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.slf4j.Logger;
@@ -27,14 +28,10 @@ import org.slf4j.LoggerFactory;
  * <li>{@link MonitoringModule}
  * </ul>
  * </ul>
- *
- * We used old revision {@link Draft18.RestconfModule#REVISION} of restconf yang
- * because the latest restconf draft has to be supported by Yang 1.1 and we are
- * not. Then, this is only partial implementation of the latest restconf draft.
  */
-public final class Draft18 {
+public final class Rfc8040 {
 
-    private Draft18() {
+    private Rfc8040() {
         throw new UnsupportedOperationException("Util class");
     }
 
@@ -67,12 +64,12 @@ public final class Draft18 {
             throw new UnsupportedOperationException("Util class");
         }
 
-        public static final String REVISION = "2016-08-15";
+        public static final String REVISION = "2017-01-26";
         public static final String NAME = "ietf-restconf";
         public static final String NAMESPACE = "urn:ietf:params:xml:ns:yang:ietf-restconf";
 
-        public static final QName IETF_RESTCONF_QNAME = QName.create(Draft18.RestconfModule.NAMESPACE,
-                Draft18.RestconfModule.REVISION, Draft18.RestconfModule.NAME);
+        public static final QName IETF_RESTCONF_QNAME = QName.create(Rfc8040.RestconfModule.NAMESPACE,
+                Rfc8040.RestconfModule.REVISION, Rfc8040.RestconfModule.NAME);
 
         public static Date DATE = null;
         public static URI URI_MODULE = null;
@@ -205,7 +202,7 @@ public final class Draft18 {
 
         public static final String NAME = "ietf-restconf-monitoring";
         public static final String NAMESPACE = "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-        public static final String REVISION = "2016-08-15";
+        public static final String REVISION = "2017-01-26";
         public static final String PATH_TO_STREAM_WITHOUT_KEY =
                 "ietf-restconf-monitoring:restconf-state/streams/stream=";
         public static final String PATH_TO_STREAMS = "ietf-restconf-monitoring:restconf-state/streams";
index f43418faf907d6925f203dc78c00e55d2c814665..63d5e59de6294745d118ae64410ae827eb7a1403 100644 (file)
@@ -15,7 +15,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -34,7 +34,7 @@ public interface RestconfOperationsService {
      */
     @GET
     @Path("/operations")
-    @Produces({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getOperations(@Context UriInfo uriInfo);
 
@@ -49,7 +49,7 @@ public interface RestconfOperationsService {
      */
     @GET
     @Path("/operations/{identifier:.+}")
-    @Produces({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getOperations(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
 }
\ No newline at end of file
index b6a04223fc8519aff50435a742e2d1505ebce43e..01e73e36d165b840390be1f533946831a4593870 100644 (file)
@@ -12,7 +12,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContext;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -30,7 +30,7 @@ public interface RestconfSchemaService {
      * @return {@link SchemaExportContext}
      */
     @GET
-    @Produces({ Draft18.MediaTypes.YIN + RestconfConstants.XML, Draft18.MediaTypes.YANG })
+    @Produces({ Rfc8040.MediaTypes.YIN + RestconfConstants.XML, Rfc8040.MediaTypes.YANG })
     @Path("modules/{identifier:.+}")
     SchemaExportContext getSchema(@PathParam("identifier") String identifier);
 }
index acdcefc9e0eeaeafd5b2ed015f32af01a88bddfa..21e4d1b45be4df124503dab5e68689747bde26cc 100644 (file)
@@ -12,7 +12,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -28,7 +28,7 @@ public interface RestconfService {
      */
     @GET
     @Path("/yang-library-version")
-    @Produces({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getLibraryVersion();
 }
index bd76052d21780bc5aef1298b7cad38d21fddbe11..ea87bc484e374f3fbda7b31b69dc82058d25cedd 100644 (file)
@@ -9,8 +9,8 @@ package org.opendaylight.restconf.base.services.impl;
 
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft18.IetfYangLibrary;
-import org.opendaylight.restconf.Draft18.RestconfModule;
+import org.opendaylight.restconf.Rfc8040.IetfYangLibrary;
+import org.opendaylight.restconf.Rfc8040.RestconfModule;
 import org.opendaylight.restconf.base.services.api.RestconfService;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.yangtools.yang.common.QName;
index 371fee4bfb09e6dcca2a2f70fdd332884f3a74b0..f18ab0af6102f5d0f6332ea7887068610a0c79cb 100644 (file)
@@ -12,7 +12,7 @@ import java.net.URI;
 import java.util.Date;
 import java.util.Set;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
@@ -73,13 +73,13 @@ public final class SchemaContextRef {
 
     /**
      * Get {@link Module} by ietf-restconf qname from
-     * {@link Draft18.RestconfModule}
+     * {@link Rfc8040.RestconfModule}
      *
      * @return {@link Module}
      */
     public Module getRestconfModule() {
-        return this.findModuleByNamespaceAndRevision(Draft18.RestconfModule.IETF_RESTCONF_QNAME.getNamespace(),
-                Draft18.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
+        return this.findModuleByNamespaceAndRevision(Rfc8040.RestconfModule.IETF_RESTCONF_QNAME.getNamespace(),
+                Rfc8040.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
     }
 
     /**
index c9f849bc4eb007ba2184454cb6c9fbdef21f3e91..b00d0cfabd1c589a478bc7885759a40a34c4583d 100644 (file)
@@ -13,8 +13,8 @@ import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
-import org.opendaylight.restconf.Draft18.IetfYangLibrary;
-import org.opendaylight.restconf.Draft18.MonitoringModule;
+import org.opendaylight.restconf.Rfc8040.IetfYangLibrary;
+import org.opendaylight.restconf.Rfc8040.MonitoringModule;
 import org.opendaylight.restconf.utils.mapping.RestconfMappingNodeUtil;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
index 5b8acd269d37fd2e8046458d9829d72bdea3973f..f8ba6be5296a350353e7ed48adc5fc43846bf550 100644 (file)
@@ -29,7 +29,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @Provider
-@Consumes({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
+@Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
 public class JsonNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader<NormalizedNodeContext> {
 
     private final static Logger LOG = LoggerFactory.getLogger(JsonNormalizedNodeBodyReader.class);
index 68b67ccdb9b8426df4e5a75adcd505c1828f9663..b9b38ec1439d67d7ecd28919cb9c68a79a1f4abe 100644 (file)
@@ -35,7 +35,7 @@ import org.opendaylight.netconf.sal.restconf.impl.PATCHEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @Provider
-@Consumes({Draft18.MediaTypes.PATCH + RestconfConstants.JSON})
+@Consumes({Rfc8040.MediaTypes.PATCH + RestconfConstants.JSON})
 public class JsonToPATCHBodyReader extends AbstractIdentifierAwareJaxRsProvider
         implements MessageBodyReader<PATCHContext> {
 
index 6d31d6f26a742ff9d1cadfca88efe19848912fb2..b089efe0b123299ef4d7dba5619744e75935ce80 100644 (file)
@@ -27,7 +27,7 @@ import javax.ws.rs.ext.Provider;
 import org.opendaylight.netconf.sal.rest.api.RestconfNormalizedNodeWriter;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
@@ -47,7 +47,7 @@ import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 
 @Provider
-@Produces({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
+@Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
 public class NormalizedNodeJsonBodyWriter implements MessageBodyWriter<NormalizedNodeContext> {
 
     private static final int DEFAULT_INDENT_SPACES_NUM = 2;
index a6230627a9c706d8c7491564ab5a1406c3a01bc0..373955a248a396a5deae4efa6b212750c6343851 100644 (file)
@@ -31,7 +31,7 @@ import javax.xml.stream.XMLStreamWriter;
 import org.opendaylight.netconf.sal.rest.api.RestconfNormalizedNodeWriter;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
@@ -45,7 +45,7 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 
 @Provider
-@Produces({ Draft18.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+@Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
 public class NormalizedNodeXmlBodyWriter implements MessageBodyWriter<NormalizedNodeContext> {
 
     private static final XMLOutputFactory XML_FACTORY;
index 8c6fa6b8198c5286ace3413c35e2b7ea1997a87c..71359dd7790ebcc9ee5f70c4982c8b74cc609dd4 100644 (file)
@@ -34,7 +34,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
@@ -57,7 +57,7 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 @Provider
-@Consumes({ Draft18.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+@Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
 public class XmlNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader<NormalizedNodeContext> {
 
     private final static Logger LOG = LoggerFactory.getLogger(XmlNormalizedNodeBodyReader.class);
index 1bf1efbc9aeae1a1c24a98e71e598f2b9793d4b7..b4e0523b0af59e54a917e818f41bb15e515242b7 100644 (file)
@@ -35,7 +35,7 @@ import org.opendaylight.netconf.sal.restconf.impl.PATCHEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -58,7 +58,7 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
 @Provider
-@Consumes({Draft18.MediaTypes.PATCH + RestconfConstants.XML})
+@Consumes({Rfc8040.MediaTypes.PATCH + RestconfConstants.XML})
 public class XmlToPATCHBodyReader extends AbstractIdentifierAwareJaxRsProvider implements
         MessageBodyReader<PATCHContext> {
 
index 6b5876cb58ee8f7a4381a50e6bf73051513370cb..58656b622845f114d95f0e1fa93e24dd2c5cfe8a 100644 (file)
@@ -24,7 +24,7 @@ import org.opendaylight.netconf.sal.rest.impl.PATCH;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -45,7 +45,7 @@ public interface RestconfDataService {
      */
     @GET
     @Path("/data/{identifier:.+}")
-    @Produces({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response readData(@Encoded @PathParam("identifier") String identifier, @Context UriInfo uriInfo);
 
@@ -58,7 +58,7 @@ public interface RestconfDataService {
      */
     @GET
     @Path("/data")
-    @Produces({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response readData(@Context UriInfo uriInfo);
 
@@ -73,7 +73,7 @@ public interface RestconfDataService {
      */
     @PUT
     @Path("/data/{identifier:.+}")
-    @Consumes({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response putData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload,
             @Context UriInfo uriInfo);
@@ -91,7 +91,7 @@ public interface RestconfDataService {
      */
     @POST
     @Path("/data/{identifier:.+}")
-    @Consumes({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response postData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload,
             @Context UriInfo uriInfo);
@@ -107,7 +107,7 @@ public interface RestconfDataService {
      */
     @POST
     @Path("/data")
-    @Consumes({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response postData(NormalizedNodeContext payload, @Context UriInfo uriInfo);
 
@@ -136,9 +136,9 @@ public interface RestconfDataService {
      */
     @PATCH
     @Path("/data/{identifier:.+}")
-    @Consumes({ Draft18.MediaTypes.PATCH + RestconfConstants.JSON, Draft18.MediaTypes.PATCH + RestconfConstants.XML })
-    @Produces({ Draft18.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
-            Draft18.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
+    @Consumes({ Rfc8040.MediaTypes.PATCH + RestconfConstants.JSON, Rfc8040.MediaTypes.PATCH + RestconfConstants.XML })
+    @Produces({ Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
+            Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
     PATCHStatusContext patchData(@Encoded @PathParam("identifier") String identifier, PATCHContext context,
             @Context UriInfo uriInfo);
 
@@ -153,8 +153,8 @@ public interface RestconfDataService {
      */
     @PATCH
     @Path("/data")
-    @Consumes({ Draft18.MediaTypes.PATCH + RestconfConstants.JSON, Draft18.MediaTypes.PATCH + RestconfConstants.XML })
-    @Produces({ Draft18.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
-            Draft18.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
+    @Consumes({ Rfc8040.MediaTypes.PATCH + RestconfConstants.JSON, Rfc8040.MediaTypes.PATCH + RestconfConstants.XML })
+    @Produces({ Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
+            Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
     PATCHStatusContext patchData(PATCHContext context, @Context UriInfo uriInfo);
 }
index ebe762813a45a0beaca574b83156ccee5dc97407..becdf548c7836516063d9a3bb404d6d676a95375 100644 (file)
@@ -17,7 +17,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft18;
+import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -41,9 +41,9 @@ public interface RestconfInvokeOperationsService {
      */
     @POST
     @Path("/operations/{identifier:.+}")
-    @Produces({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
-    @Consumes({ Draft18.MediaTypes.DATA + RestconfConstants.JSON, Draft18.MediaTypes.DATA, MediaType.APPLICATION_JSON,
+    @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     NormalizedNodeContext invokeRpc(@Encoded @PathParam("identifier") String identifier,
             NormalizedNodeContext payload, @Context UriInfo uriInfo);
index d8df4d20c8d5ec62f2e31db9a7f038caf63645b6..fddbad9ee1ca8d1811217914eee741e07d9c5ca9 100644 (file)
@@ -37,7 +37,7 @@ import org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter;
 import org.opendaylight.netconf.sal.streams.listeners.NotificationListenerAdapter;
 import org.opendaylight.netconf.sal.streams.listeners.Notificator;
 import org.opendaylight.netconf.sal.streams.websockets.WebSocketServer;
-import org.opendaylight.restconf.Draft18.MonitoringModule;
+import org.opendaylight.restconf.Rfc8040.MonitoringModule;
 import org.opendaylight.restconf.handlers.NotificationServiceHandler;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.parser.IdentifierCodec;
index 53654132961bce7ff09485e5330f78590116a09f..a5146d8500114802653884f59d0cfedeab7fd94a 100644 (file)
@@ -13,9 +13,9 @@ import java.util.Collection;
 import java.util.Date;
 import java.util.Set;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
-import org.opendaylight.restconf.Draft18.IetfYangLibrary;
-import org.opendaylight.restconf.Draft18.MonitoringModule;
-import org.opendaylight.restconf.Draft18.MonitoringModule.QueryParams;
+import org.opendaylight.restconf.Rfc8040.IetfYangLibrary;
+import org.opendaylight.restconf.Rfc8040.MonitoringModule;
+import org.opendaylight.restconf.Rfc8040.MonitoringModule.QueryParams;
 import org.opendaylight.restconf.utils.parser.ParserIdentifier;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160621.module.list.Module.ConformanceType;
 import org.opendaylight.yangtools.yang.common.QName;
index a9d4fdec67e9fadc80de9d5c917a3e599db27ca4..d4997bf4b6b319399aee06bc77488dfd45ad64be 100644 (file)
@@ -15,7 +15,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
 import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft18.IetfYangLibrary;
+import org.opendaylight.restconf.Rfc8040.IetfYangLibrary;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.handlers.TransactionChainHandler;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
index 758bca72a045c62e54dc60fe57f791e4706e8003..01076f26d604663deea01da264d796f9fc6da858 100644 (file)
@@ -29,10 +29,10 @@ import org.junit.rules.ExpectedException;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
-import org.opendaylight.restconf.Draft18.IetfYangLibrary;
-import org.opendaylight.restconf.Draft18.MonitoringModule;
-import org.opendaylight.restconf.Draft18.MonitoringModule.QueryParams;
-import org.opendaylight.restconf.Draft18.RestconfModule;
+import org.opendaylight.restconf.Rfc8040.IetfYangLibrary;
+import org.opendaylight.restconf.Rfc8040.MonitoringModule;
+import org.opendaylight.restconf.Rfc8040.MonitoringModule.QueryParams;
+import org.opendaylight.restconf.Rfc8040.RestconfModule;
 import org.opendaylight.restconf.utils.parser.ParserIdentifier;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
diff --git a/restconf/sal-rest-connector/src/test/resources/invoke-rpc/ietf-restconf-monitoring@2016-08-15.yang b/restconf/sal-rest-connector/src/test/resources/invoke-rpc/ietf-restconf-monitoring@2016-08-15.yang
deleted file mode 100644 (file)
index 8204141..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-module ietf-restconf-monitoring {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-  prefix "rcmon";
-
-  import ietf-yang-types { prefix yang; }
-  import ietf-inet-types { prefix inet; }
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains monitoring information for the
-     RESTCONF protocol.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  container restconf-state {
-    config false;
-    description
-      "Contains RESTCONF protocol monitoring information.";
-
-    container capabilities {
-      description
-        "Contains a list of protocol capability URIs";
-
-      leaf-list capability {
-        type inet:uri;
-        description "A RESTCONF protocol capability URI.";
-      }
-    }
-
-    container streams {
-      description
-        "Container representing the notification event streams
-         supported by the server.";
-       reference
-         "RFC 5277, Section 3.4, <streams> element.";
-
-      list stream {
-        key name;
-        description
-          "Each entry describes an event stream supported by
-           the server.";
-
-        leaf name {
-          type string;
-          description "The stream name";
-          reference "RFC 5277, Section 3.4, <name> element.";
-        }
-
-        leaf description {
-          type string;
-          description "Description of stream content";
-          reference
-            "RFC 5277, Section 3.4, <description> element.";
-        }
-
-        leaf replay-support {
-          type boolean;
-          default false;
-          description
-            "Indicates if replay buffer supported for this stream.
-             If 'true', then the server MUST support the 'start-time'
-             and 'stop-time' query parameters for this stream.";
-          reference
-            "RFC 5277, Section 3.4, <replaySupport> element.";
-        }
-
-        leaf replay-log-creation-time {
-          when "../replay-support" {
-            description
-              "Only present if notification replay is supported";
-          }
-          type yang:date-and-time;
-          description
-            "Indicates the time the replay log for this stream
-             was created.";
-          reference
-            "RFC 5277, Section 3.4, <replayLogCreationTime>
-             element.";
-        }
-
-        list access {
-          key encoding;
-          min-elements 1;
-          description
-            "The server will create an entry in this list for each
-             encoding format that is supported for this stream.
-             The media type 'text/event-stream' is expected
-             for all event streams. This list identifies the
-             sub-types supported for this stream.";
-
-          leaf encoding {
-            type string;
-            description
-              "This is the secondary encoding format within the
-               'text/event-stream' encoding used by all streams.
-               The type 'xml' is supported for XML encoding.
-               The type 'json' is supported for JSON encoding.";
-          }
-
-          leaf location {
-            type inet:uri;
-            mandatory true;
-            description
-              "Contains a URL that represents the entry point
-               for establishing notification delivery via server
-               sent events.";
-          }
-        }
-      }
-    }
-  }
-
-}
diff --git a/restconf/sal-rest-connector/src/test/resources/invoke-rpc/ietf-restconf-monitoring@2017-01-26.yang b/restconf/sal-rest-connector/src/test/resources/invoke-rpc/ietf-restconf-monitoring@2017-01-26.yang
new file mode 100644 (file)
index 0000000..55c3cb1
--- /dev/null
@@ -0,0 +1,149 @@
+module ietf-restconf-monitoring {
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
+     prefix "rcmon";
+
+     import ietf-yang-types { prefix yang; }
+     import ietf-inet-types { prefix inet; }
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains monitoring information for the
+        RESTCONF protocol.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     container restconf-state {
+       config false;
+       description
+         "Contains RESTCONF protocol monitoring information.";
+
+       container capabilities {
+         description
+           "Contains a list of protocol capability URIs.";
+
+         leaf-list capability {
+           type inet:uri;
+           description
+             "A RESTCONF protocol capability URI.";
+         }
+       }
+
+       container streams {
+         description
+           "Container representing the notification event streams
+            supported by the server.";
+          reference
+            "RFC 5277, Section 3.4, <streams> element.";
+
+         list stream {
+           key name;
+           description
+             "Each entry describes an event stream supported by
+              the server.";
+
+           leaf name {
+             type string;
+             description
+               "The stream name.";
+             reference
+               "RFC 5277, Section 3.4, <name> element.";
+           }
+
+           leaf description {
+             type string;
+             description
+               "Description of stream content.";
+             reference
+               "RFC 5277, Section 3.4, <description> element.";
+           }
+
+           leaf replay-support {
+             type boolean;
+             default false;
+             description
+               "Indicates if replay buffer is supported for this stream.
+                If 'true', then the server MUST support the 'start-time'
+                and 'stop-time' query parameters for this stream.";
+             reference
+               "RFC 5277, Section 3.4, <replaySupport> element.";
+           }
+
+           leaf replay-log-creation-time {
+             when "../replay-support" {
+               description
+                 "Only present if notification replay is supported.";
+             }
+             type yang:date-and-time;
+             description
+               "Indicates the time the replay log for this stream
+                was created.";
+             reference
+               "RFC 5277, Section 3.4, <replayLogCreationTime>
+                element.";
+           }
+
+           list access {
+             key encoding;
+             min-elements 1;
+             description
+               "The server will create an entry in this list for each
+                encoding format that is supported for this stream.
+                The media type 'text/event-stream' is expected
+                for all event streams.  This list identifies the
+                subtypes supported for this stream.";
+
+             leaf encoding {
+               type string;
+               description
+                 "This is the secondary encoding format within the
+                  'text/event-stream' encoding used by all streams.
+                  The type 'xml' is supported for XML encoding.
+                  The type 'json' is supported for JSON encoding.";
+             }
+
+             leaf location {
+               type inet:uri;
+               mandatory true;
+               description
+                 "Contains a URL that represents the entry point
+                  for establishing notification delivery via
+                  server-sent events.";
+             }
+           }
+         }
+       }
+     }
+}
diff --git a/restconf/sal-rest-connector/src/test/resources/jukebox/ietf-restconf-monitoring@2016-08-15.yang b/restconf/sal-rest-connector/src/test/resources/jukebox/ietf-restconf-monitoring@2016-08-15.yang
deleted file mode 100644 (file)
index 8204141..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-module ietf-restconf-monitoring {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-  prefix "rcmon";
-
-  import ietf-yang-types { prefix yang; }
-  import ietf-inet-types { prefix inet; }
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains monitoring information for the
-     RESTCONF protocol.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  container restconf-state {
-    config false;
-    description
-      "Contains RESTCONF protocol monitoring information.";
-
-    container capabilities {
-      description
-        "Contains a list of protocol capability URIs";
-
-      leaf-list capability {
-        type inet:uri;
-        description "A RESTCONF protocol capability URI.";
-      }
-    }
-
-    container streams {
-      description
-        "Container representing the notification event streams
-         supported by the server.";
-       reference
-         "RFC 5277, Section 3.4, <streams> element.";
-
-      list stream {
-        key name;
-        description
-          "Each entry describes an event stream supported by
-           the server.";
-
-        leaf name {
-          type string;
-          description "The stream name";
-          reference "RFC 5277, Section 3.4, <name> element.";
-        }
-
-        leaf description {
-          type string;
-          description "Description of stream content";
-          reference
-            "RFC 5277, Section 3.4, <description> element.";
-        }
-
-        leaf replay-support {
-          type boolean;
-          default false;
-          description
-            "Indicates if replay buffer supported for this stream.
-             If 'true', then the server MUST support the 'start-time'
-             and 'stop-time' query parameters for this stream.";
-          reference
-            "RFC 5277, Section 3.4, <replaySupport> element.";
-        }
-
-        leaf replay-log-creation-time {
-          when "../replay-support" {
-            description
-              "Only present if notification replay is supported";
-          }
-          type yang:date-and-time;
-          description
-            "Indicates the time the replay log for this stream
-             was created.";
-          reference
-            "RFC 5277, Section 3.4, <replayLogCreationTime>
-             element.";
-        }
-
-        list access {
-          key encoding;
-          min-elements 1;
-          description
-            "The server will create an entry in this list for each
-             encoding format that is supported for this stream.
-             The media type 'text/event-stream' is expected
-             for all event streams. This list identifies the
-             sub-types supported for this stream.";
-
-          leaf encoding {
-            type string;
-            description
-              "This is the secondary encoding format within the
-               'text/event-stream' encoding used by all streams.
-               The type 'xml' is supported for XML encoding.
-               The type 'json' is supported for JSON encoding.";
-          }
-
-          leaf location {
-            type inet:uri;
-            mandatory true;
-            description
-              "Contains a URL that represents the entry point
-               for establishing notification delivery via server
-               sent events.";
-          }
-        }
-      }
-    }
-  }
-
-}
diff --git a/restconf/sal-rest-connector/src/test/resources/jukebox/ietf-restconf-monitoring@2017-01-26.yang b/restconf/sal-rest-connector/src/test/resources/jukebox/ietf-restconf-monitoring@2017-01-26.yang
new file mode 100644 (file)
index 0000000..55c3cb1
--- /dev/null
@@ -0,0 +1,149 @@
+module ietf-restconf-monitoring {
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
+     prefix "rcmon";
+
+     import ietf-yang-types { prefix yang; }
+     import ietf-inet-types { prefix inet; }
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains monitoring information for the
+        RESTCONF protocol.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     container restconf-state {
+       config false;
+       description
+         "Contains RESTCONF protocol monitoring information.";
+
+       container capabilities {
+         description
+           "Contains a list of protocol capability URIs.";
+
+         leaf-list capability {
+           type inet:uri;
+           description
+             "A RESTCONF protocol capability URI.";
+         }
+       }
+
+       container streams {
+         description
+           "Container representing the notification event streams
+            supported by the server.";
+          reference
+            "RFC 5277, Section 3.4, <streams> element.";
+
+         list stream {
+           key name;
+           description
+             "Each entry describes an event stream supported by
+              the server.";
+
+           leaf name {
+             type string;
+             description
+               "The stream name.";
+             reference
+               "RFC 5277, Section 3.4, <name> element.";
+           }
+
+           leaf description {
+             type string;
+             description
+               "Description of stream content.";
+             reference
+               "RFC 5277, Section 3.4, <description> element.";
+           }
+
+           leaf replay-support {
+             type boolean;
+             default false;
+             description
+               "Indicates if replay buffer is supported for this stream.
+                If 'true', then the server MUST support the 'start-time'
+                and 'stop-time' query parameters for this stream.";
+             reference
+               "RFC 5277, Section 3.4, <replaySupport> element.";
+           }
+
+           leaf replay-log-creation-time {
+             when "../replay-support" {
+               description
+                 "Only present if notification replay is supported.";
+             }
+             type yang:date-and-time;
+             description
+               "Indicates the time the replay log for this stream
+                was created.";
+             reference
+               "RFC 5277, Section 3.4, <replayLogCreationTime>
+                element.";
+           }
+
+           list access {
+             key encoding;
+             min-elements 1;
+             description
+               "The server will create an entry in this list for each
+                encoding format that is supported for this stream.
+                The media type 'text/event-stream' is expected
+                for all event streams.  This list identifies the
+                subtypes supported for this stream.";
+
+             leaf encoding {
+               type string;
+               description
+                 "This is the secondary encoding format within the
+                  'text/event-stream' encoding used by all streams.
+                  The type 'xml' is supported for XML encoding.
+                  The type 'json' is supported for JSON encoding.";
+             }
+
+             leaf location {
+               type inet:uri;
+               mandatory true;
+               description
+                 "Contains a URL that represents the entry point
+                  for establishing notification delivery via
+                  server-sent events.";
+             }
+           }
+         }
+       }
+     }
+}
diff --git a/restconf/sal-rest-connector/src/test/resources/modules/ietf-restconf-monitoring@2016-08-15.yang b/restconf/sal-rest-connector/src/test/resources/modules/ietf-restconf-monitoring@2016-08-15.yang
deleted file mode 100644 (file)
index 8204141..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-module ietf-restconf-monitoring {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-  prefix "rcmon";
-
-  import ietf-yang-types { prefix yang; }
-  import ietf-inet-types { prefix inet; }
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains monitoring information for the
-     RESTCONF protocol.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  container restconf-state {
-    config false;
-    description
-      "Contains RESTCONF protocol monitoring information.";
-
-    container capabilities {
-      description
-        "Contains a list of protocol capability URIs";
-
-      leaf-list capability {
-        type inet:uri;
-        description "A RESTCONF protocol capability URI.";
-      }
-    }
-
-    container streams {
-      description
-        "Container representing the notification event streams
-         supported by the server.";
-       reference
-         "RFC 5277, Section 3.4, <streams> element.";
-
-      list stream {
-        key name;
-        description
-          "Each entry describes an event stream supported by
-           the server.";
-
-        leaf name {
-          type string;
-          description "The stream name";
-          reference "RFC 5277, Section 3.4, <name> element.";
-        }
-
-        leaf description {
-          type string;
-          description "Description of stream content";
-          reference
-            "RFC 5277, Section 3.4, <description> element.";
-        }
-
-        leaf replay-support {
-          type boolean;
-          default false;
-          description
-            "Indicates if replay buffer supported for this stream.
-             If 'true', then the server MUST support the 'start-time'
-             and 'stop-time' query parameters for this stream.";
-          reference
-            "RFC 5277, Section 3.4, <replaySupport> element.";
-        }
-
-        leaf replay-log-creation-time {
-          when "../replay-support" {
-            description
-              "Only present if notification replay is supported";
-          }
-          type yang:date-and-time;
-          description
-            "Indicates the time the replay log for this stream
-             was created.";
-          reference
-            "RFC 5277, Section 3.4, <replayLogCreationTime>
-             element.";
-        }
-
-        list access {
-          key encoding;
-          min-elements 1;
-          description
-            "The server will create an entry in this list for each
-             encoding format that is supported for this stream.
-             The media type 'text/event-stream' is expected
-             for all event streams. This list identifies the
-             sub-types supported for this stream.";
-
-          leaf encoding {
-            type string;
-            description
-              "This is the secondary encoding format within the
-               'text/event-stream' encoding used by all streams.
-               The type 'xml' is supported for XML encoding.
-               The type 'json' is supported for JSON encoding.";
-          }
-
-          leaf location {
-            type inet:uri;
-            mandatory true;
-            description
-              "Contains a URL that represents the entry point
-               for establishing notification delivery via server
-               sent events.";
-          }
-        }
-      }
-    }
-  }
-
-}
diff --git a/restconf/sal-rest-connector/src/test/resources/modules/ietf-restconf-monitoring@2017-01-26.yang b/restconf/sal-rest-connector/src/test/resources/modules/ietf-restconf-monitoring@2017-01-26.yang
new file mode 100644 (file)
index 0000000..55c3cb1
--- /dev/null
@@ -0,0 +1,149 @@
+module ietf-restconf-monitoring {
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
+     prefix "rcmon";
+
+     import ietf-yang-types { prefix yang; }
+     import ietf-inet-types { prefix inet; }
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains monitoring information for the
+        RESTCONF protocol.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     container restconf-state {
+       config false;
+       description
+         "Contains RESTCONF protocol monitoring information.";
+
+       container capabilities {
+         description
+           "Contains a list of protocol capability URIs.";
+
+         leaf-list capability {
+           type inet:uri;
+           description
+             "A RESTCONF protocol capability URI.";
+         }
+       }
+
+       container streams {
+         description
+           "Container representing the notification event streams
+            supported by the server.";
+          reference
+            "RFC 5277, Section 3.4, <streams> element.";
+
+         list stream {
+           key name;
+           description
+             "Each entry describes an event stream supported by
+              the server.";
+
+           leaf name {
+             type string;
+             description
+               "The stream name.";
+             reference
+               "RFC 5277, Section 3.4, <name> element.";
+           }
+
+           leaf description {
+             type string;
+             description
+               "Description of stream content.";
+             reference
+               "RFC 5277, Section 3.4, <description> element.";
+           }
+
+           leaf replay-support {
+             type boolean;
+             default false;
+             description
+               "Indicates if replay buffer is supported for this stream.
+                If 'true', then the server MUST support the 'start-time'
+                and 'stop-time' query parameters for this stream.";
+             reference
+               "RFC 5277, Section 3.4, <replaySupport> element.";
+           }
+
+           leaf replay-log-creation-time {
+             when "../replay-support" {
+               description
+                 "Only present if notification replay is supported.";
+             }
+             type yang:date-and-time;
+             description
+               "Indicates the time the replay log for this stream
+                was created.";
+             reference
+               "RFC 5277, Section 3.4, <replayLogCreationTime>
+                element.";
+           }
+
+           list access {
+             key encoding;
+             min-elements 1;
+             description
+               "The server will create an entry in this list for each
+                encoding format that is supported for this stream.
+                The media type 'text/event-stream' is expected
+                for all event streams.  This list identifies the
+                subtypes supported for this stream.";
+
+             leaf encoding {
+               type string;
+               description
+                 "This is the secondary encoding format within the
+                  'text/event-stream' encoding used by all streams.
+                  The type 'xml' is supported for XML encoding.
+                  The type 'json' is supported for JSON encoding.";
+             }
+
+             leaf location {
+               type inet:uri;
+               mandatory true;
+               description
+                 "Contains a URL that represents the entry point
+                  for establishing notification delivery via
+                  server-sent events.";
+             }
+           }
+         }
+       }
+     }
+}
diff --git a/restconf/sal-rest-connector/src/test/resources/modules/modules-behind-mount-point/ietf-restconf-monitoring@2016-08-15.yang b/restconf/sal-rest-connector/src/test/resources/modules/modules-behind-mount-point/ietf-restconf-monitoring@2016-08-15.yang
deleted file mode 100644 (file)
index 8204141..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-module ietf-restconf-monitoring {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-  prefix "rcmon";
-
-  import ietf-yang-types { prefix yang; }
-  import ietf-inet-types { prefix inet; }
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains monitoring information for the
-     RESTCONF protocol.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  container restconf-state {
-    config false;
-    description
-      "Contains RESTCONF protocol monitoring information.";
-
-    container capabilities {
-      description
-        "Contains a list of protocol capability URIs";
-
-      leaf-list capability {
-        type inet:uri;
-        description "A RESTCONF protocol capability URI.";
-      }
-    }
-
-    container streams {
-      description
-        "Container representing the notification event streams
-         supported by the server.";
-       reference
-         "RFC 5277, Section 3.4, <streams> element.";
-
-      list stream {
-        key name;
-        description
-          "Each entry describes an event stream supported by
-           the server.";
-
-        leaf name {
-          type string;
-          description "The stream name";
-          reference "RFC 5277, Section 3.4, <name> element.";
-        }
-
-        leaf description {
-          type string;
-          description "Description of stream content";
-          reference
-            "RFC 5277, Section 3.4, <description> element.";
-        }
-
-        leaf replay-support {
-          type boolean;
-          default false;
-          description
-            "Indicates if replay buffer supported for this stream.
-             If 'true', then the server MUST support the 'start-time'
-             and 'stop-time' query parameters for this stream.";
-          reference
-            "RFC 5277, Section 3.4, <replaySupport> element.";
-        }
-
-        leaf replay-log-creation-time {
-          when "../replay-support" {
-            description
-              "Only present if notification replay is supported";
-          }
-          type yang:date-and-time;
-          description
-            "Indicates the time the replay log for this stream
-             was created.";
-          reference
-            "RFC 5277, Section 3.4, <replayLogCreationTime>
-             element.";
-        }
-
-        list access {
-          key encoding;
-          min-elements 1;
-          description
-            "The server will create an entry in this list for each
-             encoding format that is supported for this stream.
-             The media type 'text/event-stream' is expected
-             for all event streams. This list identifies the
-             sub-types supported for this stream.";
-
-          leaf encoding {
-            type string;
-            description
-              "This is the secondary encoding format within the
-               'text/event-stream' encoding used by all streams.
-               The type 'xml' is supported for XML encoding.
-               The type 'json' is supported for JSON encoding.";
-          }
-
-          leaf location {
-            type inet:uri;
-            mandatory true;
-            description
-              "Contains a URL that represents the entry point
-               for establishing notification delivery via server
-               sent events.";
-          }
-        }
-      }
-    }
-  }
-
-}
diff --git a/restconf/sal-rest-connector/src/test/resources/modules/modules-behind-mount-point/ietf-restconf-monitoring@2017-01-26.yang b/restconf/sal-rest-connector/src/test/resources/modules/modules-behind-mount-point/ietf-restconf-monitoring@2017-01-26.yang
new file mode 100644 (file)
index 0000000..55c3cb1
--- /dev/null
@@ -0,0 +1,149 @@
+module ietf-restconf-monitoring {
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
+     prefix "rcmon";
+
+     import ietf-yang-types { prefix yang; }
+     import ietf-inet-types { prefix inet; }
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains monitoring information for the
+        RESTCONF protocol.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     container restconf-state {
+       config false;
+       description
+         "Contains RESTCONF protocol monitoring information.";
+
+       container capabilities {
+         description
+           "Contains a list of protocol capability URIs.";
+
+         leaf-list capability {
+           type inet:uri;
+           description
+             "A RESTCONF protocol capability URI.";
+         }
+       }
+
+       container streams {
+         description
+           "Container representing the notification event streams
+            supported by the server.";
+          reference
+            "RFC 5277, Section 3.4, <streams> element.";
+
+         list stream {
+           key name;
+           description
+             "Each entry describes an event stream supported by
+              the server.";
+
+           leaf name {
+             type string;
+             description
+               "The stream name.";
+             reference
+               "RFC 5277, Section 3.4, <name> element.";
+           }
+
+           leaf description {
+             type string;
+             description
+               "Description of stream content.";
+             reference
+               "RFC 5277, Section 3.4, <description> element.";
+           }
+
+           leaf replay-support {
+             type boolean;
+             default false;
+             description
+               "Indicates if replay buffer is supported for this stream.
+                If 'true', then the server MUST support the 'start-time'
+                and 'stop-time' query parameters for this stream.";
+             reference
+               "RFC 5277, Section 3.4, <replaySupport> element.";
+           }
+
+           leaf replay-log-creation-time {
+             when "../replay-support" {
+               description
+                 "Only present if notification replay is supported.";
+             }
+             type yang:date-and-time;
+             description
+               "Indicates the time the replay log for this stream
+                was created.";
+             reference
+               "RFC 5277, Section 3.4, <replayLogCreationTime>
+                element.";
+           }
+
+           list access {
+             key encoding;
+             min-elements 1;
+             description
+               "The server will create an entry in this list for each
+                encoding format that is supported for this stream.
+                The media type 'text/event-stream' is expected
+                for all event streams.  This list identifies the
+                subtypes supported for this stream.";
+
+             leaf encoding {
+               type string;
+               description
+                 "This is the secondary encoding format within the
+                  'text/event-stream' encoding used by all streams.
+                  The type 'xml' is supported for XML encoding.
+                  The type 'json' is supported for JSON encoding.";
+             }
+
+             leaf location {
+               type inet:uri;
+               mandatory true;
+               description
+                 "Contains a URL that represents the entry point
+                  for establishing notification delivery via
+                  server-sent events.";
+             }
+           }
+         }
+       }
+     }
+}
diff --git a/restconf/sal-rest-connector/src/test/resources/notifications/ietf-restconf-monitoring@2016-08-15.yang b/restconf/sal-rest-connector/src/test/resources/notifications/ietf-restconf-monitoring@2016-08-15.yang
deleted file mode 100644 (file)
index 8204141..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-module ietf-restconf-monitoring {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-  prefix "rcmon";
-
-  import ietf-yang-types { prefix yang; }
-  import ietf-inet-types { prefix inet; }
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains monitoring information for the
-     RESTCONF protocol.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  container restconf-state {
-    config false;
-    description
-      "Contains RESTCONF protocol monitoring information.";
-
-    container capabilities {
-      description
-        "Contains a list of protocol capability URIs";
-
-      leaf-list capability {
-        type inet:uri;
-        description "A RESTCONF protocol capability URI.";
-      }
-    }
-
-    container streams {
-      description
-        "Container representing the notification event streams
-         supported by the server.";
-       reference
-         "RFC 5277, Section 3.4, <streams> element.";
-
-      list stream {
-        key name;
-        description
-          "Each entry describes an event stream supported by
-           the server.";
-
-        leaf name {
-          type string;
-          description "The stream name";
-          reference "RFC 5277, Section 3.4, <name> element.";
-        }
-
-        leaf description {
-          type string;
-          description "Description of stream content";
-          reference
-            "RFC 5277, Section 3.4, <description> element.";
-        }
-
-        leaf replay-support {
-          type boolean;
-          default false;
-          description
-            "Indicates if replay buffer supported for this stream.
-             If 'true', then the server MUST support the 'start-time'
-             and 'stop-time' query parameters for this stream.";
-          reference
-            "RFC 5277, Section 3.4, <replaySupport> element.";
-        }
-
-        leaf replay-log-creation-time {
-          when "../replay-support" {
-            description
-              "Only present if notification replay is supported";
-          }
-          type yang:date-and-time;
-          description
-            "Indicates the time the replay log for this stream
-             was created.";
-          reference
-            "RFC 5277, Section 3.4, <replayLogCreationTime>
-             element.";
-        }
-
-        list access {
-          key encoding;
-          min-elements 1;
-          description
-            "The server will create an entry in this list for each
-             encoding format that is supported for this stream.
-             The media type 'text/event-stream' is expected
-             for all event streams. This list identifies the
-             sub-types supported for this stream.";
-
-          leaf encoding {
-            type string;
-            description
-              "This is the secondary encoding format within the
-               'text/event-stream' encoding used by all streams.
-               The type 'xml' is supported for XML encoding.
-               The type 'json' is supported for JSON encoding.";
-          }
-
-          leaf location {
-            type inet:uri;
-            mandatory true;
-            description
-              "Contains a URL that represents the entry point
-               for establishing notification delivery via server
-               sent events.";
-          }
-        }
-      }
-    }
-  }
-
-}
diff --git a/restconf/sal-rest-connector/src/test/resources/notifications/ietf-restconf-monitoring@2017-01-26.yang b/restconf/sal-rest-connector/src/test/resources/notifications/ietf-restconf-monitoring@2017-01-26.yang
new file mode 100644 (file)
index 0000000..55c3cb1
--- /dev/null
@@ -0,0 +1,149 @@
+module ietf-restconf-monitoring {
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
+     prefix "rcmon";
+
+     import ietf-yang-types { prefix yang; }
+     import ietf-inet-types { prefix inet; }
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains monitoring information for the
+        RESTCONF protocol.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     container restconf-state {
+       config false;
+       description
+         "Contains RESTCONF protocol monitoring information.";
+
+       container capabilities {
+         description
+           "Contains a list of protocol capability URIs.";
+
+         leaf-list capability {
+           type inet:uri;
+           description
+             "A RESTCONF protocol capability URI.";
+         }
+       }
+
+       container streams {
+         description
+           "Container representing the notification event streams
+            supported by the server.";
+          reference
+            "RFC 5277, Section 3.4, <streams> element.";
+
+         list stream {
+           key name;
+           description
+             "Each entry describes an event stream supported by
+              the server.";
+
+           leaf name {
+             type string;
+             description
+               "The stream name.";
+             reference
+               "RFC 5277, Section 3.4, <name> element.";
+           }
+
+           leaf description {
+             type string;
+             description
+               "Description of stream content.";
+             reference
+               "RFC 5277, Section 3.4, <description> element.";
+           }
+
+           leaf replay-support {
+             type boolean;
+             default false;
+             description
+               "Indicates if replay buffer is supported for this stream.
+                If 'true', then the server MUST support the 'start-time'
+                and 'stop-time' query parameters for this stream.";
+             reference
+               "RFC 5277, Section 3.4, <replaySupport> element.";
+           }
+
+           leaf replay-log-creation-time {
+             when "../replay-support" {
+               description
+                 "Only present if notification replay is supported.";
+             }
+             type yang:date-and-time;
+             description
+               "Indicates the time the replay log for this stream
+                was created.";
+             reference
+               "RFC 5277, Section 3.4, <replayLogCreationTime>
+                element.";
+           }
+
+           list access {
+             key encoding;
+             min-elements 1;
+             description
+               "The server will create an entry in this list for each
+                encoding format that is supported for this stream.
+                The media type 'text/event-stream' is expected
+                for all event streams.  This list identifies the
+                subtypes supported for this stream.";
+
+             leaf encoding {
+               type string;
+               description
+                 "This is the secondary encoding format within the
+                  'text/event-stream' encoding used by all streams.
+                  The type 'xml' is supported for XML encoding.
+                  The type 'json' is supported for JSON encoding.";
+             }
+
+             leaf location {
+               type inet:uri;
+               mandatory true;
+               description
+                 "Contains a URL that represents the entry point
+                  for establishing notification delivery via
+                  server-sent events.";
+             }
+           }
+         }
+       }
+     }
+}
diff --git a/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf-monitoring@2016-08-15.yang b/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf-monitoring@2016-08-15.yang
deleted file mode 100644 (file)
index 8204141..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-module ietf-restconf-monitoring {
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
-  prefix "rcmon";
-
-  import ietf-yang-types { prefix yang; }
-  import ietf-inet-types { prefix inet; }
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains monitoring information for the
-     RESTCONF protocol.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  container restconf-state {
-    config false;
-    description
-      "Contains RESTCONF protocol monitoring information.";
-
-    container capabilities {
-      description
-        "Contains a list of protocol capability URIs";
-
-      leaf-list capability {
-        type inet:uri;
-        description "A RESTCONF protocol capability URI.";
-      }
-    }
-
-    container streams {
-      description
-        "Container representing the notification event streams
-         supported by the server.";
-       reference
-         "RFC 5277, Section 3.4, <streams> element.";
-
-      list stream {
-        key name;
-        description
-          "Each entry describes an event stream supported by
-           the server.";
-
-        leaf name {
-          type string;
-          description "The stream name";
-          reference "RFC 5277, Section 3.4, <name> element.";
-        }
-
-        leaf description {
-          type string;
-          description "Description of stream content";
-          reference
-            "RFC 5277, Section 3.4, <description> element.";
-        }
-
-        leaf replay-support {
-          type boolean;
-          default false;
-          description
-            "Indicates if replay buffer supported for this stream.
-             If 'true', then the server MUST support the 'start-time'
-             and 'stop-time' query parameters for this stream.";
-          reference
-            "RFC 5277, Section 3.4, <replaySupport> element.";
-        }
-
-        leaf replay-log-creation-time {
-          when "../replay-support" {
-            description
-              "Only present if notification replay is supported";
-          }
-          type yang:date-and-time;
-          description
-            "Indicates the time the replay log for this stream
-             was created.";
-          reference
-            "RFC 5277, Section 3.4, <replayLogCreationTime>
-             element.";
-        }
-
-        list access {
-          key encoding;
-          min-elements 1;
-          description
-            "The server will create an entry in this list for each
-             encoding format that is supported for this stream.
-             The media type 'text/event-stream' is expected
-             for all event streams. This list identifies the
-             sub-types supported for this stream.";
-
-          leaf encoding {
-            type string;
-            description
-              "This is the secondary encoding format within the
-               'text/event-stream' encoding used by all streams.
-               The type 'xml' is supported for XML encoding.
-               The type 'json' is supported for JSON encoding.";
-          }
-
-          leaf location {
-            type inet:uri;
-            mandatory true;
-            description
-              "Contains a URL that represents the entry point
-               for establishing notification delivery via server
-               sent events.";
-          }
-        }
-      }
-    }
-  }
-
-}
diff --git a/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf-monitoring@2017-01-26.yang b/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf-monitoring@2017-01-26.yang
new file mode 100644 (file)
index 0000000..55c3cb1
--- /dev/null
@@ -0,0 +1,149 @@
+module ietf-restconf-monitoring {
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
+     prefix "rcmon";
+
+     import ietf-yang-types { prefix yang; }
+     import ietf-inet-types { prefix inet; }
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains monitoring information for the
+        RESTCONF protocol.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     container restconf-state {
+       config false;
+       description
+         "Contains RESTCONF protocol monitoring information.";
+
+       container capabilities {
+         description
+           "Contains a list of protocol capability URIs.";
+
+         leaf-list capability {
+           type inet:uri;
+           description
+             "A RESTCONF protocol capability URI.";
+         }
+       }
+
+       container streams {
+         description
+           "Container representing the notification event streams
+            supported by the server.";
+          reference
+            "RFC 5277, Section 3.4, <streams> element.";
+
+         list stream {
+           key name;
+           description
+             "Each entry describes an event stream supported by
+              the server.";
+
+           leaf name {
+             type string;
+             description
+               "The stream name.";
+             reference
+               "RFC 5277, Section 3.4, <name> element.";
+           }
+
+           leaf description {
+             type string;
+             description
+               "Description of stream content.";
+             reference
+               "RFC 5277, Section 3.4, <description> element.";
+           }
+
+           leaf replay-support {
+             type boolean;
+             default false;
+             description
+               "Indicates if replay buffer is supported for this stream.
+                If 'true', then the server MUST support the 'start-time'
+                and 'stop-time' query parameters for this stream.";
+             reference
+               "RFC 5277, Section 3.4, <replaySupport> element.";
+           }
+
+           leaf replay-log-creation-time {
+             when "../replay-support" {
+               description
+                 "Only present if notification replay is supported.";
+             }
+             type yang:date-and-time;
+             description
+               "Indicates the time the replay log for this stream
+                was created.";
+             reference
+               "RFC 5277, Section 3.4, <replayLogCreationTime>
+                element.";
+           }
+
+           list access {
+             key encoding;
+             min-elements 1;
+             description
+               "The server will create an entry in this list for each
+                encoding format that is supported for this stream.
+                The media type 'text/event-stream' is expected
+                for all event streams.  This list identifies the
+                subtypes supported for this stream.";
+
+             leaf encoding {
+               type string;
+               description
+                 "This is the secondary encoding format within the
+                  'text/event-stream' encoding used by all streams.
+                  The type 'xml' is supported for XML encoding.
+                  The type 'json' is supported for JSON encoding.";
+             }
+
+             leaf location {
+               type inet:uri;
+               mandatory true;
+               description
+                 "Contains a URL that represents the entry point
+                  for establishing notification delivery via
+                  server-sent events.";
+             }
+           }
+         }
+       }
+     }
+}
diff --git a/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf@2016-08-15.yang b/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf@2016-08-15.yang
deleted file mode 100644 (file)
index 2f642de..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-module ietf-restconf {
-  yang-version 1.1;
-  namespace "urn:ietf:params:xml:ns:yang:ietf-restconf";
-  prefix "rc";
-
-  organization
-    "IETF NETCONF (Network Configuration) Working Group";
-
-  contact
-    "WG Web:   <http://tools.ietf.org/wg/netconf/>
-     WG List:  <mailto:netconf@ietf.org>
-     Author:   Andy Bierman
-               <mailto:andy@yumaworks.com>
-     Author:   Martin Bjorklund
-               <mailto:mbj@tail-f.com>
-     Author:   Kent Watsen
-               <mailto:kwatsen@juniper.net>";
-
-  description
-    "This module contains conceptual YANG specifications
-     for basic RESTCONF media type definitions used in
-     RESTCONF protocol messages.
-     Note that the YANG definitions within this module do not
-     represent configuration data of any kind.
-     The 'restconf-media-type' YANG extension statement
-     provides a normative syntax for XML and JSON message
-     encoding purposes.
-     Copyright (c) 2016 IETF Trust and the persons identified as
-     authors of the code.  All rights reserved.
-     Redistribution and use in source and binary forms, with or
-     without modification, is permitted pursuant to, and subject
-     to the license terms contained in, the Simplified BSD License
-     set forth in Section 4.c of the IETF Trust's Legal Provisions
-     Relating to IETF Documents
-     (http://trustee.ietf.org/license-info).
-     This version of this YANG module is part of RFC XXXX; see
-     the RFC itself for full legal notices.";
-
-  // RFC Ed.: replace XXXX with actual RFC number and remove this
-  // note.
-
-  // RFC Ed.: remove this note
-  // Note: extracted from draft-ietf-netconf-restconf-17.txt
-
-  // RFC Ed.: update the date below with the date of RFC publication
-  // and remove this note.
-  revision 2016-08-15 {
-    description
-      "Initial revision.";
-    reference
-      "RFC XXXX: RESTCONF Protocol.";
-  }
-
-  extension yang-data {
-    argument name {
-      yin-element true;
-    }
-    description
-      "This extension is used to specify a YANG data template which
-       represents conceptual data defined in YANG. It is
-       intended to describe hierarchical data independent of
-       protocol context or specific message encoding format.
-       Data definition statements within a yang-data extension
-       specify the generic syntax for the specific YANG data
-       template, whose name is the argument of the yang-data
-       extension statement.
-       Note that this extension does not define a media-type.
-       A specification using this extension MUST specify the
-       message encoding rules, including the content media type.
-       The mandatory 'name' parameter value identifies the YANG
-       data template that is being defined. It contains the
-       template name.
-       This extension is ignored unless it appears as a top-level
-       statement. It MUST contain data definition statements
-       that result in exactly one container data node definition.
-       An instance of a YANG data template can thus be translated
-       into an XML instance document, whose top-level element
-       corresponds to the top-level container.
-       The module name and namespace value for the YANG module using
-       the extension statement is assigned to instance document data
-       conforming to the data definition statements within
-       this extension.
-       The sub-statements of this extension MUST follow the
-       'data-def-stmt' rule in the YANG ABNF.
-       The XPath document root is the extension statement itself,
-       such that the child nodes of the document root are
-       represented by the data-def-stmt sub-statements within
-       this extension. This conceptual document is the context
-       for the following YANG statements:
-         - must-stmt
-         - when-stmt
-         - path-stmt
-         - min-elements-stmt
-         - max-elements-stmt
-         - mandatory-stmt
-         - unique-stmt
-         - ordered-by
-         - instance-identifier data type
-       The following data-def-stmt sub-statements are constrained
-       when used within a yang-data-resource extension statement.
-         - The list-stmt is not required to have a key-stmt defined.
-         - The if-feature-stmt is ignored if present.
-         - The config-stmt is ignored if present.
-         - The available identity values for any 'identityref'
-           leaf or leaf-list nodes is limited to the module
-           containing this extension statement, and the modules
-           imported into that module.
-      ";
-  }
-
-  rc:yang-data yang-errors {
-    uses errors;
-  }
-
-  rc:yang-data yang-api {
-    uses restconf;
-  }
-
-  grouping errors {
-    description
-      "A grouping that contains a YANG container
-       representing the syntax and semantics of a
-       YANG Patch errors report within a response message.";
-
-    container errors {
-      description
-        "Represents an error report returned by the server if
-         a request results in an error.";
-
-      list error {
-        description
-          "An entry containing information about one
-           specific error that occurred while processing
-           a RESTCONF request.";
-        reference "RFC 6241, Section 4.3";
-
-        leaf error-type {
-          type enumeration {
-            enum transport {
-              description "The transport layer";
-            }
-            enum rpc {
-              description "The rpc or notification layer";
-            }
-            enum protocol {
-              description "The protocol operation layer";
-            }
-            enum application {
-              description "The server application layer";
-            }
-          }
-          mandatory true;
-          description
-            "The protocol layer where the error occurred.";
-        }
-
-        leaf error-tag {
-          type string;
-          mandatory true;
-          description
-            "The enumerated error tag.";
-        }
-
-        leaf error-app-tag {
-          type string;
-          description
-            "The application-specific error tag.";
-        }
-
-        leaf error-path {
-          type instance-identifier;
-          description
-            "The YANG instance identifier associated
-             with the error node.";
-        }
-
-        leaf error-message {
-          type string;
-          description
-            "A message describing the error.";
-        }
-
-        anydata error-info {
-           description
-             "This anydata value MUST represent a container with
-             zero or more data nodes representing additional
-             error information.";
-        }
-      }
-    }
-  }
-
-  grouping restconf {
-    description
-      "Conceptual grouping representing the RESTCONF
-       root resource.";
-
-    container restconf {
-      description
-        "Conceptual container representing the RESTCONF
-         root resource.";
-
-      container data {
-        description
-          "Container representing the datastore resource.
-           Represents the conceptual root of all state data
-           and configuration data supported by the server.
-           The child nodes of this container can be any data
-           resource which are defined as top-level data nodes
-           from the YANG modules advertised by the server in
-           the ietf-yang-library module.";
-      }
-
-      container operations {
-        description
-          "Container for all operation resources.
-           Each resource is represented as an empty leaf with the
-           name of the RPC operation from the YANG rpc statement.
-           For example, the 'system-restart' RPC operation defined
-           in the 'ietf-system' module would be represented as
-           an empty leaf in the 'ietf-system' namespace. This is
-           a conceptual leaf, and will not actually be found in
-           the module:
-              module ietf-system {
-                leaf system-reset {
-                  type empty;
-                }
-              }
-           To invoke the 'system-restart' RPC operation:
-              POST /restconf/operations/ietf-system:system-restart
-           To discover the RPC operations supported by the server:
-              GET /restconf/operations
-           In XML the YANG module namespace identifies the module:
-             <system-restart
-                xmlns='urn:ietf:params:xml:ns:yang:ietf-system' />
-           In JSON the YANG module name identifies the module:
-             { 'ietf-system:system-restart' : [null] }
-          ";
-      }
-
-      leaf yang-library-version {
-        type string {
-          pattern '\d{4}-\d{2}-\d{2}';
-        }
-        config false;
-        mandatory true;
-        description
-          "Identifies the revision date of the ietf-yang-library
-           module that is implemented by this RESTCONF server.
-           Indicates the year, month, and day in YYYY-MM-DD
-           numeric format.";
-      }
-    }
-  }
-
-}
diff --git a/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf@2017-01-26.yang b/restconf/sal-rest-connector/src/test/resources/restconf/impl/ietf-restconf@2017-01-26.yang
new file mode 100644 (file)
index 0000000..dc54388
--- /dev/null
@@ -0,0 +1,279 @@
+module ietf-restconf {
+     yang-version 1.1;
+     namespace "urn:ietf:params:xml:ns:yang:ietf-restconf";
+     prefix "rc";
+
+     organization
+       "IETF NETCONF (Network Configuration) Working Group";
+
+     contact
+       "WG Web:   <https://datatracker.ietf.org/wg/netconf/>
+        WG List:  <mailto:netconf@ietf.org>
+
+        Author:   Andy Bierman
+                  <mailto:andy@yumaworks.com>
+
+        Author:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>
+
+        Author:   Kent Watsen
+                  <mailto:kwatsen@juniper.net>";
+
+     description
+       "This module contains conceptual YANG specifications
+        for basic RESTCONF media type definitions used in
+        RESTCONF protocol messages.
+
+        Note that the YANG definitions within this module do not
+        represent configuration data of any kind.
+        The 'restconf-media-type' YANG extension statement
+        provides a normative syntax for XML and JSON
+        message-encoding purposes.
+
+        Copyright (c) 2017 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 8040; see
+        the RFC itself for full legal notices.";
+
+     revision 2017-01-26 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 8040: RESTCONF Protocol.";
+     }
+
+     extension yang-data {
+       argument name {
+         yin-element true;
+       }
+       description
+         "This extension is used to specify a YANG data template that
+          represents conceptual data defined in YANG.  It is
+          intended to describe hierarchical data independent of
+          protocol context or specific message-encoding format.
+          Data definition statements within a yang-data extension
+          specify the generic syntax for the specific YANG data
+          template, whose name is the argument of the 'yang-data'
+          extension statement.
+
+          Note that this extension does not define a media type.
+          A specification using this extension MUST specify the
+          message-encoding rules, including the content media type.
+
+          The mandatory 'name' parameter value identifies the YANG
+          data template that is being defined.  It contains the
+          template name.
+
+          This extension is ignored unless it appears as a top-level
+          statement.  It MUST contain data definition statements
+          that result in exactly one container data node definition.
+          An instance of a YANG data template can thus be translated
+          into an XML instance document, whose top-level element
+          corresponds to the top-level container.
+
+          The module name and namespace values for the YANG module using
+          the extension statement are assigned to instance document data
+          conforming to the data definition statements within
+          this extension.
+
+          The substatements of this extension MUST follow the
+          'data-def-stmt' rule in the YANG ABNF.
+
+          The XPath document root is the extension statement itself,
+          such that the child nodes of the document root are
+          represented by the data-def-stmt substatements within
+          this extension.  This conceptual document is the context
+          for the following YANG statements:
+
+            - must-stmt
+            - when-stmt
+            - path-stmt
+            - min-elements-stmt
+            - max-elements-stmt
+            - mandatory-stmt
+            - unique-stmt
+            - ordered-by
+            - instance-identifier data type
+
+          The following data-def-stmt substatements are constrained
+          when used within a 'yang-data' extension statement.
+
+            - The list-stmt is not required to have a key-stmt defined.
+            - The if-feature-stmt is ignored if present.
+            - The config-stmt is ignored if present.
+            - The available identity values for any 'identityref'
+              leaf or leaf-list nodes are limited to the module
+              containing this extension statement and the modules
+              imported into that module.
+         ";
+     }
+
+     rc:yang-data yang-errors {
+       uses errors;
+     }
+
+     rc:yang-data yang-api {
+       uses restconf;
+     }
+
+     grouping errors {
+       description
+         "A grouping that contains a YANG container
+          representing the syntax and semantics of a
+          YANG Patch error report within a response message.";
+
+       container errors {
+         description
+           "Represents an error report returned by the server if
+            a request results in an error.";
+
+         list error {
+           description
+             "An entry containing information about one
+              specific error that occurred while processing
+              a RESTCONF request.";
+           reference
+             "RFC 6241, Section 4.3.";
+
+           leaf error-type {
+             type enumeration {
+               enum transport {
+                 description
+                   "The transport layer.";
+               }
+               enum rpc {
+                 description
+                   "The rpc or notification layer.";
+               }
+               enum protocol {
+                 description
+                   "The protocol operation layer.";
+               }
+               enum application {
+                 description
+                   "The server application layer.";
+               }
+             }
+             mandatory true;
+             description
+               "The protocol layer where the error occurred.";
+           }
+
+           leaf error-tag {
+             type string;
+             mandatory true;
+             description
+               "The enumerated error-tag.";
+           }
+
+           leaf error-app-tag {
+             type string;
+             description
+               "The application-specific error-tag.";
+           }
+
+           leaf error-path {
+             type instance-identifier;
+             description
+               "The YANG instance identifier associated
+                with the error node.";
+           }
+
+           leaf error-message {
+             type string;
+             description
+               "A message describing the error.";
+           }
+
+           anydata error-info {
+              description
+                "This anydata value MUST represent a container with
+                 zero or more data nodes representing additional
+                 error information.";
+           }
+         }
+       }
+     }
+
+     grouping restconf {
+       description
+         "Conceptual grouping representing the RESTCONF
+          root resource.";
+
+       container restconf {
+         description
+           "Conceptual container representing the RESTCONF
+            root resource.";
+
+         container data {
+           description
+             "Container representing the datastore resource.
+              Represents the conceptual root of all state data
+              and configuration data supported by the server.
+              The child nodes of this container can be any data
+              resources that are defined as top-level data nodes
+              from the YANG modules advertised by the server in
+              the 'ietf-yang-library' module.";
+         }
+
+         container operations {
+           description
+             "Container for all operation resources.
+
+              Each resource is represented as an empty leaf with the
+              name of the RPC operation from the YANG 'rpc' statement.
+
+              For example, the 'system-restart' RPC operation defined
+              in the 'ietf-system' module would be represented as
+              an empty leaf in the 'ietf-system' namespace.  This is
+              a conceptual leaf and will not actually be found in
+              the module:
+
+                 module ietf-system {
+                   leaf system-reset {
+                     type empty;
+                   }
+                 }
+
+              To invoke the 'system-restart' RPC operation:
+
+                 POST /restconf/operations/ietf-system:system-restart
+
+              To discover the RPC operations supported by the server:
+
+                 GET /restconf/operations
+
+              In XML, the YANG module namespace identifies the module:
+
+                <system-restart
+                   xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/>
+
+              In JSON, the YANG module name identifies the module:
+
+                { 'ietf-system:system-restart' : [null] }
+             ";
+         }
+
+         leaf yang-library-version {
+           type string {
+             pattern '\d{4}-\d{2}-\d{2}';
+           }
+           config false;
+           mandatory true;
+           description
+             "Identifies the revision date of the 'ietf-yang-library'
+              module that is implemented by this RESTCONF server.
+              Indicates the year, month, and day in YYYY-MM-DD
+              numeric format.";
+         }
+       }
+     }
+}