f3219a01ca5b496aa9d94b17b70ba85bb247a11c
[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 premises {
34             list addresses {
35                 key "house-number street";
36
37                 leaf house-number {
38                     type uint16;
39                 }
40                 leaf street {
41                     type string;
42                 }
43                 leaf town {
44                     type string;
45                 }
46                 leaf county {
47                     type string;
48                 }
49             }
50         }
51
52         list categories {
53
54             key "code";
55
56             leaf code {
57                 type string;
58             }
59
60             leaf name {
61                 type string;
62             }
63
64             list books {
65                 key title;
66
67                 leaf title {
68                     type string;
69                 }
70                 leaf lang {
71                     type string;
72                 }
73                 leaf-list authors {
74                     type string;
75                 }
76                 leaf-list editions {
77                     type year;
78                 }
79                 leaf price {
80                     type uint64;
81                 }
82             }
83         }
84     }
85 }