Add YANG Module Tags models 54/100254/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 25 Mar 2022 09:25:08 +0000 (10:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 25 Mar 2022 09:44:06 +0000 (10:44 +0100)
Add modules from RFC8819.

JIRA: MDSAL-684
Change-Id: Idb8a1e925a6062598dcd5b1ef06e6a6e39ed808e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
artifacts/pom.xml
features/features-mdsal/pom.xml
features/odl-mdsal-model-rfc8819-non-nmda/pom.xml [new file with mode: 0644]
features/odl-mdsal-model-rfc8819/pom.xml [new file with mode: 0644]
features/pom.xml
model/ietf/pom.xml
model/ietf/rfc8819-ietf-module-tags-state/pom.xml [new file with mode: 0644]
model/ietf/rfc8819-ietf-module-tags-state/src/main/yang/ietf-module-tags-state@2021-01-04.yang [new file with mode: 0644]
model/ietf/rfc8819-ietf-module-tags/pom.xml [new file with mode: 0644]
model/ietf/rfc8819-ietf-module-tags/src/main/yang/ietf-module-tags@2021-01-04.yang [new file with mode: 0644]

index cedfa48298e0a419737db26e1e0423242129c0ea..905514636a1574a424f633d53301514f1ce837da 100644 (file)
                 <version>9.0.1-SNAPSHOT</version>
             </dependency>
 
+            <!-- RFC8819 -->
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8819-ietf-module-tags</artifactId>
+                <version>9.0.1-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8819-ietf-module-tags-state</artifactId>
+                <version>9.0.1-SNAPSHOT</version>
+            </dependency>
+
             <!-- draft-clemm-netmod-yang-network-topo-01 -->
             <dependency>
                 <groupId>org.opendaylight.mdsal.model</groupId>
                 <classifier>features</classifier>
                 <type>xml</type>
             </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>odl-mdsal-model-rfc8819</artifactId>
+                <version>9.0.1-SNAPSHOT</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>odl-mdsal-model-rfc8819-non-nmda</artifactId>
+                <version>9.0.1-SNAPSHOT</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+            </dependency>
 
             <dependency>
                 <groupId>org.opendaylight.mdsal.model</groupId>
index 150d78058328c5a07a0e6d70b8800901e724dee3..da8ce01bafbf38f4eb5ad08c5993b9e53a295043 100644 (file)
             <classifier>features</classifier>
             <type>xml</type>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8819</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8819-non-nmda</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
 
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
diff --git a/features/odl-mdsal-model-rfc8819-non-nmda/pom.xml b/features/odl-mdsal-model-rfc8819-non-nmda/pom.xml
new file mode 100644 (file)
index 0000000..16a5b0d
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2020 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.mdsal</groupId>
+        <artifactId>feature-parent</artifactId>
+        <version>9.0.1-SNAPSHOT</version>
+        <relativePath>../feature-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.model</groupId>
+    <artifactId>odl-mdsal-model-rfc8819-non-nmda</artifactId>
+    <packaging>feature</packaging>
+    <name>OpenDaylight :: MD-SAL :: Model :: RFC8819 :: NON-NMDA</name>
+    <description>Non-NMDA models from RFC8819</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8819</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8819-ietf-module-tags-state</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/features/odl-mdsal-model-rfc8819/pom.xml b/features/odl-mdsal-model-rfc8819/pom.xml
new file mode 100644 (file)
index 0000000..5b07853
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2022 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.mdsal</groupId>
+        <artifactId>feature-parent</artifactId>
+        <version>9.0.1-SNAPSHOT</version>
+        <relativePath>../feature-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.model</groupId>
+    <artifactId>odl-mdsal-model-rfc8819</artifactId>
+    <version>9.0.1-SNAPSHOT</version>
+    <packaging>feature</packaging>
+    <name>OpenDaylight :: MD-SAL :: Model :: RFC8819</name>
+    <description>Models from RFC8819</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc6991</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8819-ietf-module-tags</artifactId>
+        </dependency>
+    </dependencies>
+</project>
index 1d6997a121b1bd1089006e6fb40970698814b639..98d637cc319d118fe7effcfc770f64bd9d1538cd 100644 (file)
@@ -95,6 +95,8 @@
         <module>odl-mdsal-model-rfc8776</module>
         <module>odl-mdsal-model-rfc8795</module>
         <module>odl-mdsal-model-rfc8795-non-nmda</module>
+        <module>odl-mdsal-model-rfc8819</module>
+        <module>odl-mdsal-model-rfc8819-non-nmda</module>
 
         <!-- IETF drafts -->
         <module>odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal</module>
index d69ec84255c60eae05cbaa8051f88eff543e3b0a..bcd4e2d0216bce2c467ba143b7c22e81437841b5 100644 (file)
         <module>rfc8795-ietf-te-topology</module>
         <module>rfc8795-ietf-te-topology-state</module>
 
+        <!-- RFC8819 YANG Module Tags -->
+        <module>rfc8819-ietf-module-tags</module>
+        <module>rfc8819-ietf-module-tags-state</module>
+
         <!-- Legacy IETF topology models -->
         <module>ietf-topology</module>
     </modules>
diff --git a/model/ietf/rfc8819-ietf-module-tags-state/pom.xml b/model/ietf/rfc8819-ietf-module-tags-state/pom.xml
new file mode 100644 (file)
index 0000000..ba3eaec
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2022 PANTHEON.tech, 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>9.0.1-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8819-ietf-module-tags-state</artifactId>
+    <version>9.0.1-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8819 ietf-module-tags-state</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc6991-ietf-yang-types</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8819-ietf-module-tags</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8819-ietf-module-tags-state/src/main/yang/ietf-module-tags-state@2021-01-04.yang b/model/ietf/rfc8819-ietf-module-tags-state/src/main/yang/ietf-module-tags-state@2021-01-04.yang
new file mode 100644 (file)
index 0000000..f05de10
--- /dev/null
@@ -0,0 +1,94 @@
+module ietf-module-tags-state {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags-state";
+  prefix tags-s;
+
+  import ietf-yang-types {
+    prefix yang;
+  }
+  import ietf-module-tags {
+    prefix tags;
+  }
+
+  organization
+    "IETF NetMod Working Group (NetMod)";
+  contact
+    "WG Web:  <https://datatracker.ietf.org/wg/netmod/>
+     WG List: <mailto:netmod@ietf.org>
+
+     Author: Christian Hopps
+             <mailto:chopps@chopps.org>
+
+     Author: Lou Berger
+             <mailto:lberger@labn.net>
+
+     Author: Dean Bogdanovic
+             <mailto:ivandean@gmail.com>";
+
+  description
+    "This module describes a mechanism associating tags with YANG
+     modules.  Tags may be IANA assigned or privately defined.
+
+     This is a temporary non-NMDA module that is for use by
+     implementations that don't yet support NMDA.
+
+     Copyright (c) 2021 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
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8819
+     (https://www.rfc-editor.org/info/rfc8819); see the RFC itself
+     for full legal notices.";
+
+  revision 2021-01-04 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8819: YANG Module Tags";
+  }
+
+  container module-tags-state {
+    config false;
+    status deprecated;
+    description
+      "Contains the list of modules and their associated tags.";
+    list module {
+      key "name";
+      status deprecated;
+      description
+        "A list of modules and their associated tags.";
+      leaf name {
+        type yang:yang-identifier;
+        mandatory true;
+        status deprecated;
+        description
+          "The YANG module name.";
+      }
+      leaf-list tag {
+        type tags:tag;
+        status deprecated;
+        description
+          "Tags associated with the module.  See the IANA 'YANG
+           Module Tag Prefixes' registry for reserved prefixes and
+           the IANA 'IETF YANG Module Tags' registry for IETF tags.
+
+           The contents of this list is constructed using the
+           following steps:
+
+           1) System tags (i.e., tags of added by the system) are
+           added.
+           2) User-configured tags (i.e., tags added by
+           configuration) are added.
+           3) Any tag that is equal to a masked-tag present in the
+           corresponding ietf-module-tags:module-tags:module-tag leaf
+           list for this module is removed.";
+      }
+    }
+  }
+}
diff --git a/model/ietf/rfc8819-ietf-module-tags/pom.xml b/model/ietf/rfc8819-ietf-module-tags/pom.xml
new file mode 100644 (file)
index 0000000..975fb63
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2022 PANTHEON.tech, 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>9.0.1-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8819-ietf-module-tags</artifactId>
+    <version>9.0.1-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8819 ietf-module-tags</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc6991-ietf-yang-types</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8819-ietf-module-tags/src/main/yang/ietf-module-tags@2021-01-04.yang b/model/ietf/rfc8819-ietf-module-tags/src/main/yang/ietf-module-tags@2021-01-04.yang
new file mode 100644 (file)
index 0000000..b4e9656
--- /dev/null
@@ -0,0 +1,118 @@
+module ietf-module-tags {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags";
+  prefix tags;
+
+  import ietf-yang-types {
+    prefix yang;
+  }
+
+  organization
+    "IETF NetMod Working Group (NetMod)";
+  contact
+    "WG Web:  <https://datatracker.ietf.org/wg/netmod/>
+     WG List: <mailto:netmod@ietf.org>
+
+     Author: Christian Hopps
+             <mailto:chopps@chopps.org>
+
+     Author: Lou Berger
+             <mailto:lberger@labn.net>
+
+     Author: Dean Bogdanovic
+             <mailto:ivandean@gmail.com>";
+
+  description
+    "This module describes a mechanism associating tags with YANG
+     modules.  Tags may be IANA assigned or privately defined.
+
+     Copyright (c) 2021 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
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8819
+     (https://www.rfc-editor.org/info/rfc8819); see the RFC itself
+     for full legal notices.
+
+     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
+     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
+     'MAY', and 'OPTIONAL' in this document are to be interpreted as
+     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
+     they appear in all capitals, as shown here.";
+
+  revision 2021-01-04 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8819: YANG Module Tags";
+  }
+
+  typedef tag {
+    type string {
+      length "1..max";
+      pattern '[\S ]+';
+    }
+    description
+      "A tag is a type of 'string' value that does not include
+       carriage return, newline, or tab characters.  It SHOULD begin
+       with a registered prefix; however, tags without a registered
+       prefix SHOULD NOT be treated as invalid.";
+  }
+
+  extension module-tag {
+    argument tag;
+    description
+      "The argument 'tag' is of type 'tag'.  This extension statement
+       is used by module authors to indicate the tags that SHOULD be
+       added automatically by the system.  As such, the origin of the
+       value for the predefined tags should be set to 'system'
+       [RFC8342].";
+  }
+
+  container module-tags {
+    description
+      "Contains the list of modules and their associated tags.";
+    list module {
+      key "name";
+      description
+        "A list of modules and their associated tags.";
+      leaf name {
+        type yang:yang-identifier;
+        mandatory true;
+        description
+          "The YANG module name.";
+      }
+      leaf-list tag {
+        type tag;
+        description
+          "Tags associated with the module.  See the IANA 'YANG
+           Module Tag Prefixes' registry for reserved prefixes and
+           the IANA 'IETF YANG Module Tags' registry for IETF tags.
+
+           The 'operational' state [RFC8342] view of this list is
+           constructed using the following steps:
+
+           1) System tags (i.e., tags of 'system' origin) are added.
+           2) User-configured tags (i.e., tags of 'intended' origin)
+           are added.
+           3) Any tag that is equal to a masked-tag is removed.";
+      }
+      leaf-list masked-tag {
+        type tag;
+        description
+          "The list of tags that should not be associated with this
+           module.  The user can remove (mask) tags from the
+           operational state datastore [RFC8342] by adding them to
+           this list.  It is not an error to add tags to this list
+           that are not associated with the module, but they have no
+           operational effect.";
+      }
+    }
+  }
+}