All Downloads are FREE. Search and download functionalities are using the official Maven repository.

[email protected] Maven / Gradle / Ivy

The newest version!
module yang-ext {
    yang-version 1;
    namespace "urn:opendaylight:yang:extension:yang-ext";
    prefix "ext";

    contact "Anton Tkacik ";

    description
            "Copyright (c) 2013 Cisco Systems, Inc. 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";

    revision "2013-07-09" {
        description "";
    }

    // Augmentation name

    extension "augment-identifier" {
        description
           "YANG language extension which assigns an identifier to
            augmentation. Augment identifier is used to identify
            specific augment statement by name.

            The identifier syntax is defined formally defined by the rule
            'identifier' in Section 12 of RFC 6020.

            All augment identifiers defined in a namespace MUST be unique.
            The namespace of augment identifiers is shared by module and
            its submodules.";

            /*
                Discussion:
                This extension allows for ease of development / debug
                of YANG modules and it is suitable for code generation,
                where each augment statement is nicely identified by
                unique name instead of combination of augment target
                and when condition.
            */
        argument "identifier";
    }

    // Mount point marker

    extension mount {
        description
           "YANG language extension which marks a place where a semantic mount
            point can be present. This extension can only be used in a container or
            a list statement, for example:

              module foo {
                container foo {
                  leaf bar {
                    type string;
                  }

                  ext:mount;
                }
              }

            In this example, container foo can contain a local leaf bar and some
            mounted data. From addressing perspective, the extension use acts as
            a container with yang-ext's namespace, i.e. it looks as though as this
            (yang-ext) module contained the following construct:

              import foo { prefix foo; }

              augment /foo:foo {
                container mount;
              }

            From data lifecycle perspective, this container should never be
            automatically included in the datastore content for 'container foo', unless
            specifically explicitly requested.";
    }

    // Context-aware RPCs

    grouping rpc-context-ref {
        description
           "A reference to RPC context.";
        leaf context-instance {
            type instance-identifier;
            description "Pointer to the context. ";
            mandatory true;
        }
    }

    extension "rpc-context-instance" {
        description
           "YANG language extension which defines enclosing (parent)
            schema node as referencable context for RPCs.

            The argument is identity which is used to identify RPC context
            type.";

        argument "context-type";
    }

    extension "context-reference" {
        argument "context-type";
    }

    extension "context-instance" {
        argument "context-type";
    }

    extension "instance-target" {
        argument "path";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy