Bug 7801 - Implement agent RPCs for transaction writer testing
[controller.git] / opendaylight / md-sal / samples / clustering-test-app / model / src / main / yang / people.yang
1 module people {
2
3     yang-version 1;
4
5     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:people";
6
7     prefix people;
8
9           import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; }
10         
11     organization "Netconf Central";
12
13     contact
14       "Harman Singh <harmasin@cisco.com>";
15
16     description
17       "YANG model for person for test application";
18
19     revision "2014-08-18" {
20       description
21         "Clustering sample app";
22     }
23     
24     typedef person-id {
25       type inet:uri;
26       description "An identifier for person.";
27     }
28
29     typedef person-ref {
30       type instance-identifier;
31       description "A reference that points to an people:people/person in the data tree.";
32     }
33     identity person-context {
34         description "A person-context is a classifier for person elements which allows an RPC to provide a service on behalf of a particular element in the data tree.";
35     }
36
37     grouping person {
38       description "Describes the details of the person";
39
40       leaf id {
41         type person-id;
42         description "identifier of single list of entries.";
43       }
44
45       leaf gender {
46         type string;
47       }
48
49       leaf age {
50         type uint32;
51       }
52
53       leaf address {
54         type string;
55       }
56
57       leaf contactNo {
58         type string;
59       }
60     }
61     
62     container people {
63       description
64         "Top-level container for all people";
65
66       list person {
67         key "id";
68         description "A list of people (as defined by the 'grouping person').";
69         uses person;
70       }
71     }
72
73     rpc add-person {
74       description
75         "Add a person entry into database";
76       input {
77         uses person;
78       }
79     }
80 }