From 98f4b4eceace82dfd5136aebed32e2d16c7f8bf7 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 25 Mar 2022 10:25:08 +0100 Subject: [PATCH] Add YANG Module Tags models Add modules from RFC8819. JIRA: MDSAL-684 Change-Id: Idb8a1e925a6062598dcd5b1ef06e6a6e39ed808e Signed-off-by: Robert Varga --- artifacts/pom.xml | 26 ++++ features/features-mdsal/pom.xml | 12 ++ .../odl-mdsal-model-rfc8819-non-nmda/pom.xml | 36 ++++++ features/odl-mdsal-model-rfc8819/pom.xml | 37 ++++++ features/pom.xml | 2 + model/ietf/pom.xml | 4 + .../rfc8819-ietf-module-tags-state/pom.xml | 39 ++++++ .../ietf-module-tags-state@2021-01-04.yang | 94 ++++++++++++++ model/ietf/rfc8819-ietf-module-tags/pom.xml | 35 ++++++ .../yang/ietf-module-tags@2021-01-04.yang | 118 ++++++++++++++++++ 10 files changed, 403 insertions(+) create mode 100644 features/odl-mdsal-model-rfc8819-non-nmda/pom.xml create mode 100644 features/odl-mdsal-model-rfc8819/pom.xml create mode 100644 model/ietf/rfc8819-ietf-module-tags-state/pom.xml create mode 100644 model/ietf/rfc8819-ietf-module-tags-state/src/main/yang/ietf-module-tags-state@2021-01-04.yang create mode 100644 model/ietf/rfc8819-ietf-module-tags/pom.xml create mode 100644 model/ietf/rfc8819-ietf-module-tags/src/main/yang/ietf-module-tags@2021-01-04.yang diff --git a/artifacts/pom.xml b/artifacts/pom.xml index cedfa48298..905514636a 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -755,6 +755,18 @@ 9.0.1-SNAPSHOT + + + org.opendaylight.mdsal.binding.model.ietf + rfc8819-ietf-module-tags + 9.0.1-SNAPSHOT + + + org.opendaylight.mdsal.binding.model.ietf + rfc8819-ietf-module-tags-state + 9.0.1-SNAPSHOT + + org.opendaylight.mdsal.model @@ -945,6 +957,20 @@ features xml + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8819 + 9.0.1-SNAPSHOT + features + xml + + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8819-non-nmda + 9.0.1-SNAPSHOT + features + xml + org.opendaylight.mdsal.model diff --git a/features/features-mdsal/pom.xml b/features/features-mdsal/pom.xml index 150d780583..da8ce01baf 100644 --- a/features/features-mdsal/pom.xml +++ b/features/features-mdsal/pom.xml @@ -323,6 +323,18 @@ features xml + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8819 + features + xml + + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8819-non-nmda + features + xml + org.opendaylight.mdsal.model 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 index 0000000000..16a5b0d64e --- /dev/null +++ b/features/odl-mdsal-model-rfc8819-non-nmda/pom.xml @@ -0,0 +1,36 @@ + + + + 4.0.0 + + org.opendaylight.mdsal + feature-parent + 9.0.1-SNAPSHOT + ../feature-parent + + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8819-non-nmda + feature + OpenDaylight :: MD-SAL :: Model :: RFC8819 :: NON-NMDA + Non-NMDA models from RFC8819 + + + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8819 + features + xml + + + org.opendaylight.mdsal.binding.model.ietf + rfc8819-ietf-module-tags-state + + + diff --git a/features/odl-mdsal-model-rfc8819/pom.xml b/features/odl-mdsal-model-rfc8819/pom.xml new file mode 100644 index 0000000000..5b07853322 --- /dev/null +++ b/features/odl-mdsal-model-rfc8819/pom.xml @@ -0,0 +1,37 @@ + + + + 4.0.0 + + org.opendaylight.mdsal + feature-parent + 9.0.1-SNAPSHOT + ../feature-parent + + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8819 + 9.0.1-SNAPSHOT + feature + OpenDaylight :: MD-SAL :: Model :: RFC8819 + Models from RFC8819 + + + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc6991 + features + xml + + + org.opendaylight.mdsal.binding.model.ietf + rfc8819-ietf-module-tags + + + diff --git a/features/pom.xml b/features/pom.xml index 1d6997a121..98d637cc31 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -95,6 +95,8 @@ odl-mdsal-model-rfc8776 odl-mdsal-model-rfc8795 odl-mdsal-model-rfc8795-non-nmda + odl-mdsal-model-rfc8819 + odl-mdsal-model-rfc8819-non-nmda odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal diff --git a/model/ietf/pom.xml b/model/ietf/pom.xml index d69ec84255..bcd4e2d021 100644 --- a/model/ietf/pom.xml +++ b/model/ietf/pom.xml @@ -116,6 +116,10 @@ rfc8795-ietf-te-topology rfc8795-ietf-te-topology-state + + rfc8819-ietf-module-tags + rfc8819-ietf-module-tags-state + ietf-topology 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 index 0000000000..ba3eaec3a1 --- /dev/null +++ b/model/ietf/rfc8819-ietf-module-tags-state/pom.xml @@ -0,0 +1,39 @@ + + + + + 4.0.0 + + org.opendaylight.mdsal + binding-parent + 9.0.1-SNAPSHOT + ../../../binding/binding-parent + + + org.opendaylight.mdsal.binding.model.ietf + rfc8819-ietf-module-tags-state + 9.0.1-SNAPSHOT + bundle + + ${project.artifactId} + RFC8819 ietf-module-tags-state + + + + org.opendaylight.mdsal.binding.model.ietf + rfc6991-ietf-yang-types + + + org.opendaylight.mdsal.binding.model.ietf + rfc8819-ietf-module-tags + + + 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 index 0000000000..f05de10bd5 --- /dev/null +++ b/model/ietf/rfc8819-ietf-module-tags-state/src/main/yang/ietf-module-tags-state@2021-01-04.yang @@ -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: + WG List: + + Author: Christian Hopps + + + Author: Lou Berger + + + Author: Dean Bogdanovic + "; + + 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 index 0000000000..975fb631db --- /dev/null +++ b/model/ietf/rfc8819-ietf-module-tags/pom.xml @@ -0,0 +1,35 @@ + + + + + 4.0.0 + + org.opendaylight.mdsal + binding-parent + 9.0.1-SNAPSHOT + ../../../binding/binding-parent + + + org.opendaylight.mdsal.binding.model.ietf + rfc8819-ietf-module-tags + 9.0.1-SNAPSHOT + bundle + + ${project.artifactId} + RFC8819 ietf-module-tags + + + + org.opendaylight.mdsal.binding.model.ietf + rfc6991-ietf-yang-types + + + 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 index 0000000000..b4e9656740 --- /dev/null +++ b/model/ietf/rfc8819-ietf-module-tags/src/main/yang/ietf-module-tags@2021-01-04.yang @@ -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: + WG List: + + Author: Christian Hopps + + + Author: Lou Berger + + + Author: Dean Bogdanovic + "; + + 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."; + } + } + } +} -- 2.36.6