From: Jakub Toth Date: Mon, 5 Dec 2016 15:22:56 +0000 (+0100) Subject: Bug 5679 - add new module ietf-restconf-monitoring to restconf X-Git-Tag: release/carbon~104 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=c7bf74b9412c50404e9aef5f06b5768b662dcccd;hp=c035008a81fcd71cfa1ebdf5944d9838b33a1389;p=netconf.git Bug 5679 - add new module ietf-restconf-monitoring to restconf Change-Id: I93df11eb73292ccdc3df5bd7668df45dbf3c9a63 Signed-off-by: Jakub Toth --- diff --git a/features/restconf/pom.xml b/features/restconf/pom.xml index c2af176b82..19f30c770e 100644 --- a/features/restconf/pom.xml +++ b/features/restconf/pom.xml @@ -170,6 +170,11 @@ ietf-yang-library ${project.version} + + ${project.groupId} + ietf-restconf-monitoring + ${project.version} + diff --git a/features/restconf/src/main/features/features.xml b/features/restconf/src/main/features/features.xml index b6482f2a41..acdfd28755 100644 --- a/features/restconf/src/main/features/features.xml +++ b/features/restconf/src/main/features/features.xml @@ -31,6 +31,7 @@ odl-netty war mvn:org.opendaylight.netconf/ietf-yang-library/{{VERSION}} + mvn:org.opendaylight.netconf/ietf-restconf-monitoring/{{VERSION}} mvn:org.opendaylight.netconf/sal-rest-connector/{{VERSION}} mvn:com.google.code.gson/gson/{{VERSION}} mvn:org.opendaylight.yangtools/yang-data-codec-gson/{{VERSION}} diff --git a/restconf/models/ietf-restconf-monitoring/pom.xml b/restconf/models/ietf-restconf-monitoring/pom.xml new file mode 100644 index 0000000000..9256d0dd7d --- /dev/null +++ b/restconf/models/ietf-restconf-monitoring/pom.xml @@ -0,0 +1,36 @@ + + + + + 4.0.0 + + + org.opendaylight.mdsal + binding-parent + 0.10.0-SNAPSHOT + ../../../binding/binding-parent + + + org.opendaylight.netconf + ietf-restconf-monitoring + 1.5.0-SNAPSHOT + bundle + ${project.artifactId} + + + + org.opendaylight.mdsal.model + ietf-inet-types-2013-07-15 + + + org.opendaylight.mdsal.model + ietf-yang-types-20130715 + + + 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 index 0000000000..82041414d1 --- /dev/null +++ b/restconf/models/ietf-restconf-monitoring/src/main/yang/ietf-restconf-monitoring@2016-08-15.yang @@ -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: + WG List: + Author: Andy Bierman + + Author: Martin Bjorklund + + Author: Kent Watsen + "; + + 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, 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, element."; + } + + leaf description { + type string; + description "Description of stream content"; + reference + "RFC 5277, Section 3.4, 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, 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, + 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/pom.xml b/restconf/models/pom.xml index 91534e0ca8..c76a3ff596 100644 --- a/restconf/models/pom.xml +++ b/restconf/models/pom.xml @@ -21,5 +21,6 @@ ietf-yang-library + ietf-restconf-monitoring diff --git a/restconf/restconf-artifacts/pom.xml b/restconf/restconf-artifacts/pom.xml index 1fe2c88155..4b1a7efa49 100644 --- a/restconf/restconf-artifacts/pom.xml +++ b/restconf/restconf-artifacts/pom.xml @@ -30,6 +30,11 @@ ${project.groupId} ietf-yang-library ${project.version} + + + ${project.groupId} + ietf-restconf-monitoring + ${project.version} ${project.groupId} diff --git a/restconf/sal-rest-connector/pom.xml b/restconf/sal-rest-connector/pom.xml index 0481ad923e..2afbaf91f7 100644 --- a/restconf/sal-rest-connector/pom.xml +++ b/restconf/sal-rest-connector/pom.xml @@ -128,6 +128,11 @@ ietf-yang-library ${project.version} + + org.opendaylight.netconf + ietf-restconf-monitoring + ${project.version} + net.java.dev.stax-utils stax-utils