From: Robert Varga Date: Fri, 29 Jun 2018 10:03:35 +0000 (+0200) Subject: Package rfc7952 ietf-yang-metadata X-Git-Tag: release/fluorine~133 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=ef6bb54a6f3fdbf5cad9db5480335e5bbf8528f2;p=mdsal.git Package rfc7952 ietf-yang-metadata This is a base exptension required for NMDA models, package it here. JIRA: MDSAL-358 Change-Id: I567f9d45ffa965b2eb3ea326692128f5af46ae74 Signed-off-by: Robert Varga --- diff --git a/model/artifacts/pom.xml b/model/artifacts/pom.xml index 5ceee8de8e..8c2b588f8a 100644 --- a/model/artifacts/pom.xml +++ b/model/artifacts/pom.xml @@ -90,6 +90,13 @@ 1.0.0-SNAPSHOT + + + org.opendaylight.mdsal.binding.model.ietf + rfc7952 + 1.0.0-SNAPSHOT + + org.opendaylight.mdsal.binding.model.ietf diff --git a/model/features/odl-mdsal-models/pom.xml b/model/features/odl-mdsal-models/pom.xml index fb69579424..18a62d8812 100644 --- a/model/features/odl-mdsal-models/pom.xml +++ b/model/features/odl-mdsal-models/pom.xml @@ -125,6 +125,10 @@ ${project.groupId} rfc7895 + + org.opendaylight.mdsal.binding.model.ietf + rfc7952 + org.opendaylight.mdsal.binding.model.ietf rfc8345 diff --git a/model/ietf/pom.xml b/model/ietf/pom.xml index 4c6e22a1f0..0d3cc48000 100644 --- a/model/ietf/pom.xml +++ b/model/ietf/pom.xml @@ -33,6 +33,9 @@ rfc7895 + + rfc7952 + rfc8345 rfc8345-ietf-network diff --git a/model/ietf/rfc7952/pom.xml b/model/ietf/rfc7952/pom.xml new file mode 100644 index 0000000000..00432393c5 --- /dev/null +++ b/model/ietf/rfc7952/pom.xml @@ -0,0 +1,28 @@ + + + + + 4.0.0 + + org.opendaylight.mdsal + binding-parent + 0.13.0-SNAPSHOT + ../../../binding/binding-parent + + + org.opendaylight.mdsal.binding.model.ietf + rfc7952 + 1.0.0-SNAPSHOT + bundle + + ${project.artifactId} + RFC7952 YANG Metadata + 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 index 0000000000..5939eebeea --- /dev/null +++ b/model/ietf/rfc7952/src/main/yang/ietf-yang-metadata@2016-08-05.yang @@ -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: + + WG List: + + WG Chair: Lou Berger + + + WG Chair: Kent Watsen + + + Editor: Ladislav Lhotka + "; + + 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 + 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."; + } +}