e592a9c5cefe823756a26be62911f6431d52e2d2
[cps.git] / integration-test / src / test / resources / data / bookstore / bookstore.yang
1 module stores {
2     yang-version 1.1;
3     namespace "org:onap:ccsdk:sample";
4
5     prefix book-store;
6
7     revision "2020-09-15" {
8         description
9         "Sample Model";
10     }
11
12     typedef year {
13         type uint16 {
14             range "1000..9999";
15         }
16     }
17
18     container bookstore {
19
20         leaf bookstore-name {
21             type string;
22         }
23
24         container webinfo {
25             leaf domain-name {
26                 type string;
27             }
28             leaf contact-email {
29                 type string;
30             }
31         }
32
33         container container-without-leaves { }
34
35         container premises {
36             list addresses {
37                 key "house-number street";
38
39                 leaf house-number {
40                     type uint16;
41                 }
42                 leaf street {
43                     type string;
44                 }
45                 leaf town {
46                     type string;
47                 }
48                 leaf county {
49                     type string;
50                 }
51             }
52         }
53
54         list categories {
55
56             key "code";
57
58             leaf code {
59                 type string;
60             }
61
62             leaf name {
63                 type string;
64             }
65
66             list books {
67                 key title;
68
69                 leaf title {
70                     type string;
71                 }
72                 leaf lang {
73                     type string;
74                 }
75                 leaf-list authors {
76                     type string;
77                 }
78                 leaf-list editions {
79                     type year;
80                 }
81                 leaf price {
82                     type uint64;
83                 }
84             }
85         }
86     }
87 }