Bug 5679 - add new module ietf-restconf-monitoring to restconf 35/51735/2
authorJakub Toth <jatoth@cisco.com>
Mon, 5 Dec 2016 15:22:56 +0000 (16:22 +0100)
committerJakub Toth <jatoth@cisco.com>
Sat, 11 Feb 2017 11:48:11 +0000 (11:48 +0000)
Change-Id: I93df11eb73292ccdc3df5bd7668df45dbf3c9a63
Signed-off-by: Jakub Toth <jatoth@cisco.com>
features/restconf/pom.xml
features/restconf/src/main/features/features.xml
restconf/models/ietf-restconf-monitoring/pom.xml [new file with mode: 0644]
restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2016-08-15.yang [new file with mode: 0644]
restconf/models/pom.xml
restconf/restconf-artifacts/pom.xml
restconf/sal-rest-connector/pom.xml

index 2f9c1ada4efd862e30166ceefb79d0c9fabef2cb..2353cba4575c2e55452046d876424a13e1f6d02b 100644 (file)
       <artifactId>ietf-yang-library</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>ietf-restconf-monitoring</artifactId>
+      <version>${project.version}</version>
+    </dependency>
 
   </dependencies>
   <scm>
index b6482f2a41d69d152f4b139514d8c723dcac05a7..acdfd28755a0139095899694777095d23b729840 100644 (file)
@@ -31,6 +31,7 @@
         <feature version='[4.0.30,4.1.0)'>odl-netty</feature>
         <feature>war</feature>
         <bundle>mvn:org.opendaylight.netconf/ietf-yang-library/{{VERSION}}</bundle>
+        <bundle>mvn:org.opendaylight.netconf/ietf-restconf-monitoring/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.netconf/sal-rest-connector/{{VERSION}}</bundle>
         <bundle>mvn:com.google.code.gson/gson/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.yangtools/yang-data-codec-gson/{{VERSION}}</bundle>
diff --git a/restconf/models/ietf-restconf-monitoring/pom.xml b/restconf/models/ietf-restconf-monitoring/pom.xml
new file mode 100644 (file)
index 0000000..e22d0d8
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+  ~
+  ~ This program and the accompanying materials are made available under the
+  ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+  ~ and is available at http://www.eclipse.org/legal/epl-v10.html
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>binding-parent</artifactId>
+        <version>0.9.3-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.netconf</groupId>
+    <artifactId>ietf-restconf-monitoring</artifactId>
+    <version>1.4.3-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>${project.artifactId}</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>ietf-inet-types-2013-07-15</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>ietf-yang-types-20130715</artifactId>
+        </dependency>
+    </dependencies>
+</project>
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
new file mode 100644 (file)
index 0000000..8204141
--- /dev/null
@@ -0,0 +1,148 @@
+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.";
+          }
+        }
+      }
+    }
+  }
+
+}
index f5b2adc5190f3eb15f35d92e684048a0b3990f95..cc75fe0eebace3d92113b3cbb867bc424f09f625 100644 (file)
@@ -21,5 +21,6 @@
 
   <modules>
     <module>ietf-yang-library</module>
+    <module>ietf-restconf-monitoring</module>
   </modules>
 </project>
index 53779051b06f9f8721d0c46359333ec189ca5724..ab7dcac67027c519422948aa81f37db027fb2266 100644 (file)
                 <groupId>${project.groupId}</groupId>
                 <artifactId>ietf-yang-library</artifactId>
                 <version>${project.version}</version>
+            </dependency>
+             <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>ietf-restconf-monitoring</artifactId>
+                <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
index 5a793d1fcd862158647ffddfdbe7be52f2492191..4e0cf9150e2d832060f25675107ee3d70e491962 100644 (file)
       <artifactId>ietf-yang-library</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>ietf-restconf-monitoring</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <dependency>
       <groupId>net.java.dev.stax-utils</groupId>
       <artifactId>stax-utils</artifactId>