Added case with Choice-case to instance identifier building
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / resources / full-versions / yangs / simple-nodes.yang
1 module simple-nodes {
2     yang-version 1;
3     namespace "urn:opendaylight:simple-nodes";
4     prefix "sn";
5
6     description
7         "test file containing yang data nodes";   
8
9     revision "2013-07-30" {
10         description
11             "Initial revision.";
12         reference "will be defined";
13     }
14     
15     container users {
16         leaf user {
17             type string;
18         }
19         
20         leaf group {
21             type string;
22         }
23     }
24
25     list user {
26          key "name class";
27          leaf name {
28              type string;
29          }
30          leaf full-name {
31              type string;
32          }
33          leaf class {
34              type string;
35          }
36     }
37     
38     list userWithoutClass {
39         key "name";
40         leaf name {
41             type string;
42         }
43         leaf full-name {
44             type string;
45         }
46     }
47     
48      container food {
49        choice snack {
50            case sports-arena {
51                leaf pretzel {
52                    type string;
53                }
54                leaf beer {
55                    type string;
56                }
57            }
58            case late-night {
59                leaf chocolate {
60                    type enumeration {
61                        enum dark;
62                        enum milk;
63                        enum first-available;
64                    }
65                }
66            }
67        }
68     }
69     
70 }