+++ /dev/null
-module baz {
- yang-version 1;
- namespace "urn:opendaylight.baz";
- prefix "baz";
-
- import bar { prefix "br"; revision-date 2013-07-03; }
-
- organization "opendaylight";
- contact "http://www.opendaylight.org/";
-
- revision "2013-02-27" {
- reference " WILL BE DEFINED LATER";
- }
-
- typedef union1 {
- type union2;
- }
-
- typedef union2 {
- type union {
- type int32;
- type br:nested-union2;
- }
- }
-
- augment "/br:interfaces/br:ifEntry" {
- when "br:ifType='ds0'";
- container augment-holder {
- description "Description for augment holder";
- }
- }
-
- augment "/br:interfaces/br:ifEntry" {
- when "br:ifType='ds2'";
- container augment-holder2 {
- description "Description for augment holder";
- }
- }
-
- container network {
- baz:c-define point {
- }
-
- description "network-description";
- reference "network-reference";
- status obsolete;
- config true;
- presence "some presence text";
- }
-
- feature local-storage {
- description
- "This feature means the device supports local storage (memory,
- flash or disk) that can be used to store syslog messages.";
- }
-
- feature candidate;
- feature startup;
-
- extension c-define {
- description "Takes as argument a name string. Makes the code generator use
- the given name in the #define.";
- argument "name" {
- yin-element "true";
- }
- }
-
- notification event {
- leaf event-class {
- type string;
- }
- anyxml reporting-entity;
- leaf severity {
- type string;
- }
- }
-
- rpc get-config {
- description "Retrieve all or part of a specified configuration.";
- reference "RFC 6241, Section 7.1";
-
- input {
- container source {
- description
- "Particular configuration to retrieve.";
-
- choice config-source {
- mandatory true;
- description
- "The configuration to retrieve.";
- case a {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config source.";
- }
- }
- case b {
- leaf running {
- type empty;
- description
- "The running configuration is the config source.";
- }
- }
- case c {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config source. This is optional-to-implement
- on the server because not all servers will support filtering for
- this datastore.";
- }
- }
- }
- }
-
- anyxml filter {
- description "Subtree or XPath filter to use.";
- baz:c-define element-attributes;
- }
- }
-
- output {
- anyxml data {
- description
- "Copy of the source datastore subset that matched the filter criteria
- (if any). An empty data container indicates that the request did
- not produce any results.";
- }
- }
- }
-
- grouping target {
- anyxml data {
- config true;
- description "Copy of the source datastore subset.";
- mandatory false;
- must "test-condition-text";
- reference "test-no-reference";
- status "obsolete";
- when "test-when-text";
- }
- choice how {
- description "test choice description";
- default interval;
- case interval {
- leaf interval {
- type uint16;
- default 30;
- units minutes;
- }
- }
- case daily {
- leaf daily {
- type empty;
- }
- leaf time-of-day {
- type string;
- units 24-hour-clock;
- default 1am;
- }
- }
- }
- leaf address {
- type string;
- description "Target IP address";
- mandatory true;
- }
- container port {
- description "Target port container";
- }
- list addresses {
- key "id";
- leaf id {
- type int8;
- }
- }
- grouping target-inner {
- description "target-inner default description";
- leaf inner-grouping-id {
- type int8;
- }
- }
- typedef group-type {
- type br:my-decimal-type;
- }
-
- br:opendaylight awesome;
- }
-}