Add ietf-netconf-with-defaults model 34/82234/3
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 24 May 2019 14:33:29 +0000 (16:33 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 24 May 2019 14:56:44 +0000 (16:56 +0200)
This model is a dependency of NMDA, add it first, so we can
implement it separately, if need be. Also clean up odl-netconf-api
dependencies, so we specify the bare minimum and pull the rest
as dependencies.

Change-Id: I78a09d11f3e1ae78dabe16de8b30a3b8549cdb9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
features/netconf/odl-netconf-api/pom.xml
netconf/models/ietf-netconf-with-defaults/pom.xml [new file with mode: 0644]
netconf/models/ietf-netconf-with-defaults/src/main/yang/ietf-netconf-with-defaults@2011-06-01.yang [new file with mode: 0644]
netconf/models/pom.xml
netconf/netconf-artifacts/pom.xml

index 9bd9d72cdaa3425d315323d21c93fd6024637bad..4928cd8d21443cc0999a16ae93bb60563766d7f5 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
-            <artifactId>ietf-netconf-monitoring</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.netconf</groupId>
-            <artifactId>ietf-netconf</artifactId>
+            <artifactId>ietf-netconf-monitoring-extension</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
@@ -91,7 +87,7 @@
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
-            <artifactId>ietf-netconf-monitoring-extension</artifactId>
+            <artifactId>ietf-netconf-with-defaults</artifactId>
         </dependency>
     </dependencies>
 </project>
diff --git a/netconf/models/ietf-netconf-with-defaults/pom.xml b/netconf/models/ietf-netconf-with-defaults/pom.xml
new file mode 100644 (file)
index 0000000..5aafd04
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright (c) 2019 PANTHEON.tech, s.r.o. 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.netconf</groupId>
+        <artifactId>netconf-parent</artifactId>
+        <version>1.7.0-SNAPSHOT</version>
+        <relativePath>../../netconf-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.netconf</groupId>
+    <artifactId>ietf-netconf-with-defaults</artifactId>
+    <version>1.7.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>${project.artifactId}</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.netconf</groupId>
+            <artifactId>ietf-netconf</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/netconf/models/ietf-netconf-with-defaults/src/main/yang/ietf-netconf-with-defaults@2011-06-01.yang b/netconf/models/ietf-netconf-with-defaults/src/main/yang/ietf-netconf-with-defaults@2011-06-01.yang
new file mode 100644 (file)
index 0000000..8a7be8c
--- /dev/null
@@ -0,0 +1,138 @@
+module ietf-netconf-with-defaults {
+
+   namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
+
+   prefix ncwd;
+
+   import ietf-netconf { prefix nc; }
+
+   organization
+    "IETF NETCONF (Network Configuration Protocol) Working Group";
+
+   contact
+    "WG Web:   <http://tools.ietf.org/wg/netconf/>
+
+     WG List:  <netconf@ietf.org>
+
+     WG Chair: Bert Wijnen
+               <bertietf@bwijnen.net>
+
+     WG Chair: Mehmet Ersue
+               <mehmet.ersue@nsn.com>
+
+     Editor: Andy Bierman
+             <andy.bierman@brocade.com>
+
+     Editor: Balazs Lengyel
+             <balazs.lengyel@ericsson.com>";
+
+   description
+    "This module defines an extension to the NETCONF protocol
+     that allows the NETCONF client to control how default
+     values are handled by the server in particular NETCONF
+     operations.
+
+     Copyright (c) 2011 IETF Trust and the persons identified as
+     the document authors.  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 6243; see
+     the RFC itself for full legal notices.";
+   revision 2011-06-01 {
+     description
+       "Initial version.";
+     reference
+      "RFC 6243: With-defaults Capability for NETCONF";
+   }
+
+   typedef with-defaults-mode {
+      description
+        "Possible modes to report default data.";
+      reference
+         "RFC 6243; Section 3.";
+      type enumeration {
+         enum report-all {
+             description
+               "All default data is reported.";
+             reference
+               "RFC 6243; Section 3.1";
+         }
+         enum report-all-tagged {
+             description
+               "All default data is reported.
+                Any nodes considered to be default data
+                will contain a 'default' XML attribute,
+                set to 'true' or '1'.";
+             reference
+               "RFC 6243; Section 3.4";
+         }
+         enum trim {
+             description
+               "Values are not reported if they contain the default.";
+             reference
+               "RFC 6243; Section 3.2";
+         }
+         enum explicit {
+             description
+               "Report values that contain the definition of
+                explicitly set data.";
+             reference
+               "RFC 6243; Section 3.3";
+         }
+     }
+   }
+
+   grouping with-defaults-parameters {
+     description
+       "Contains the <with-defaults> parameter for control
+        of defaults in NETCONF retrieval operations.";
+     leaf with-defaults {
+       description
+         "The explicit defaults processing mode requested.";
+       reference
+         "RFC 6243; Section 4.5.1";
+
+       type with-defaults-mode;
+     }
+   }
+
+   // extending the get-config operation
+   augment /nc:get-config/nc:input {
+       description
+         "Adds the <with-defaults> parameter to the
+          input of the NETCONF <get-config> operation.";
+       reference
+         "RFC 6243; Section 4.5.1";
+
+       uses with-defaults-parameters;
+   }
+
+   // extending the get operation
+   augment /nc:get/nc:input {
+       description
+         "Adds the <with-defaults> parameter to
+          the input of the NETCONF <get> operation.";
+       reference
+         "RFC 6243; Section 4.5.1";
+
+       uses with-defaults-parameters;
+   }
+
+   // extending the copy-config operation
+   augment /nc:copy-config/nc:input {
+       description
+         "Adds the <with-defaults> parameter to
+          the input of the NETCONF <copy-config> operation.";
+       reference
+         "RFC 6243; Section 4.5.1";
+
+       uses with-defaults-parameters;
+   }
+
+}
index da808f90872dc8d3d31874b900d537928514e3a9..ac5ab9405860ba73b26423568e5d8c26eaa1d736 100644 (file)
@@ -30,7 +30,8 @@
   <modules>
     <module>ietf-netconf</module>
     <module>ietf-netconf-monitoring</module>
-    <module>ietf-netconf-notifications</module>
     <module>ietf-netconf-monitoring-extension</module>
+    <module>ietf-netconf-notifications</module>
+    <module>ietf-netconf-with-defaults</module>
   </modules>
 </project>
index b62442d4a6c8b3b960e453517f3d67c5d6390181..de64b8c3d6711ded019676cfc923357f8c07f5a9 100644 (file)
                 <version>${project.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>ietf-netconf-with-defaults</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>yanglib</artifactId>