implement unimgr api to netvirt dhcp allocation pool service
[unimgr.git] / legato-api / src / main / yang / unimgr-dhcp.yang
1 module unimgr-dhcp {
2     namespace "urn:opendaylight:unimgr:unimgr-dhcp";
3     prefix "unimgr-dhcp";
4
5     import ietf-inet-types { prefix inet; revision-date "2013-07-15"; }
6     import ietf-yang-types { prefix yang; }
7     import mef-types { prefix mef-types; }
8
9     revision "2016-12-14" {
10         description "It provides required datastore containers to handle DHCP requests
11             coming from access or external tunnel ports";
12     }
13     container unimgr-dhcp {
14         config true;
15         description "contains non-neutron DHCP allocation";
16         list unimgr-services {
17             key "svc-id";
18             leaf svc-id {
19                 description "unimgr service id";
20                 type mef-types:retail-svc-id-type;
21             }
22
23             list network {
24                 key "network-id";
25                 leaf network-id {
26                     description "unimgr network id";
27                     type string;
28                 }
29
30                 list unimgr-allocations {
31                     key "subnet";
32                     leaf subnet {
33                         description "subnet for the dhcp to allocate ip addresses";
34                         type inet:ip-prefix;
35                     }
36
37                     list unimgr-allocation-instance {
38                         key "mac";
39                         leaf mac {
40                             description "requesting mac";
41                             type yang:phys-address;
42                         }
43                         leaf allocated-ip {
44                             description "allocated ip address";
45                             type inet:ip-address;
46                         }
47                     }
48                 }
49
50                 list unimgr-allocation-pool {
51                     key "subnet";
52                     leaf subnet {
53                         description "subnet for the dhcp to allocate ip addresses";
54                         type inet:ip-prefix;
55                     }
56                     leaf allocate-from {
57                         description "low allocation limit";
58                         type inet:ip-address;
59                     }
60                     leaf allocate-to {
61                         description "high allocation limit";
62                         type inet:ip-address;
63                     }
64                     leaf gateway {
65                         description "default gateway for dhcp allocation";
66                         type inet:ip-address;
67                     }
68                     leaf-list dns-servers {
69                         description "dns server list";
70                         type inet:ip-address;
71                     }
72                 }
73             }
74         }
75     }
76 }
77
78