Package rfc7952 ietf-yang-metadata 01/73601/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Jun 2018 10:03:35 +0000 (12:03 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 2 Jul 2018 13:30:34 +0000 (15:30 +0200)
This is a base exptension required for NMDA models, package it here.

JIRA: MDSAL-358
Change-Id: I567f9d45ffa965b2eb3ea326692128f5af46ae74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/artifacts/pom.xml
model/features/odl-mdsal-models/pom.xml
model/ietf/pom.xml
model/ietf/rfc7952/pom.xml [new file with mode: 0644]
model/ietf/rfc7952/src/main/yang/ietf-yang-metadata@2016-08-05.yang [new file with mode: 0644]

index 5ceee8de8e053f868964a759ad228a0cfbe98d12..8c2b588f8a86ac85f6121e9bb7aa7acef5b3eb4e 100644 (file)
                 <version>1.0.0-SNAPSHOT</version>
             </dependency>
 
+            <!-- RFC7952 -->
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc7952</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+
             <!-- RFC8345 -->
             <dependency>
                 <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
index fb69579424eb6ac507226a32d775352ef3426e6b..18a62d88128a44262c06354c8c1a3a1b4b591f71 100644 (file)
             <groupId>${project.groupId}</groupId>
             <artifactId>rfc7895</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc7952</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
             <artifactId>rfc8345</artifactId>
index 4c6e22a1f04d8743d1185456a070a8a54f7fca3e..0d3cc48000730ed61badc6aa9984a1ca090b4d0e 100644 (file)
@@ -33,6 +33,9 @@
         <!-- RFC7895 YANG Module Library -->
         <module>rfc7895</module>
 
+        <!-- RFC7895 YANG Metadata -->
+        <module>rfc7952</module>
+
         <!-- RFC8345 Network Topologies -->
         <module>rfc8345</module>
         <module>rfc8345-ietf-network</module>
diff --git a/model/ietf/rfc7952/pom.xml b/model/ietf/rfc7952/pom.xml
new file mode 100644 (file)
index 0000000..0043239
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2018 Pantheon Technologies, s.ro. 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.13.0-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc7952</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC7952 YANG Metadata</description>
+</project>
diff --git a/model/ietf/rfc7952/src/main/yang/ietf-yang-metadata@2016-08-05.yang b/model/ietf/rfc7952/src/main/yang/ietf-yang-metadata@2016-08-05.yang
new file mode 100644 (file)
index 0000000..5939eeb
--- /dev/null
@@ -0,0 +1,84 @@
+module ietf-yang-metadata {
+
+  namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata";
+
+  prefix "md";
+
+  organization
+    "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+  contact
+    "WG Web:   <https://datatracker.ietf.org/wg/netmod/>
+
+     WG List:  <mailto:netmod@ietf.org>
+
+     WG Chair: Lou Berger
+               <mailto:lberger@labn.net>
+
+     WG Chair: Kent Watsen
+               <mailto:kwatsen@juniper.net>
+
+     Editor:   Ladislav Lhotka
+               <mailto:lhotka@nic.cz>";
+
+  description
+    "This YANG module defines an 'extension' statement that allows
+     for defining metadata annotations.
+
+     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 7952
+     (http://www.rfc-editor.org/info/rfc7952); see the RFC itself
+     for full legal notices.";
+
+  revision 2016-08-05 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 7952: Defining and Using Metadata with YANG";
+  }
+
+  extension annotation {
+    argument name;
+    description
+      "This extension allows for defining metadata annotations in
+       YANG modules.  The 'md:annotation' statement can appear only
+       at the top level of a YANG module or submodule, i.e., it
+       becomes a new alternative in the ABNF production rule for
+       'body-stmts' (Section 14 in RFC 7950).
+
+       The argument of the 'md:annotation' statement defines the name
+       of the annotation.  Syntactically, it is a YANG identifier as
+       defined in Section 6.2 of RFC 7950.
+
+       An annotation defined with this 'extension' statement inherits
+       the namespace and other context from the YANG module in which
+       it is defined.
+
+       The data type of the annotation value is specified in the same
+       way as for a leaf data node using the 'type' statement.
+
+       The semantics of the annotation and other documentation can be
+       specified using the following standard YANG substatements (all
+       are optional): 'description', 'if-feature', 'reference',
+       'status', and 'units'.
+
+       A server announces support for a particular annotation by
+       including the module in which the annotation is defined among
+       the advertised YANG modules, e.g., in a NETCONF <hello>
+       message or in the YANG library (RFC 7950).  The annotation can
+       then be attached to any instance of a data node defined in any
+       YANG module that is advertised by the server.
+
+       XML encoding and JSON encoding of annotations are defined in
+       RFC 7952.";
+  }
+}