1979db9e16fdf43d2225ab915cf2d70cf3564034
[honeycomb.git] / routing / routing-api / src / main / yang / vpp-routing.yang
1 module vpp-routing{
2
3     namespace "urn:ietf:params:xml:ns:yang:vpp-routing";
4     prefix "vpp-routing";
5     description "General extensions for routes to be able to use VPP route defining apis";
6
7     revision 2016-10-18 {
8         description "Initial revision.";
9     }
10
11     import yang-ext {
12         prefix "ext";
13     }
14
15     import vpp-classifier {
16         prefix "classifier";
17     }
18
19     typedef vni-reference{
20         type uint32;
21         description "Vrf index reference";
22     }
23
24     grouping vpp-routing-attributes{
25         //vrf_id
26         leaf primary-vrf{
27             type vni-reference;
28             mandatory true;
29             description "Main vrf associated to route";
30         }
31
32         leaf auto-create-vrf{
33             type boolean;
34             default false;
35             description "If referenced primary vrf not exists,create while creating route";
36         }
37
38         //lookup_in_vrf
39         leaf secondary-vrf{
40             type vni-reference;
41             description "Optional secondary vrf used to lookup in";
42         }
43
44         leaf classify-table{
45             // classify_table_index + is_classify flag
46             type classifier:classify-table-ref;
47             description "Optional reference to classify table";
48         }
49     }
50
51      grouping vpp-routing-state-attributes{
52             //vrf_id
53             leaf primary-vrf{
54                 type vni-reference;
55                 mandatory true;
56                 description "Main vrf associated to route";
57             }
58      }
59 }