Yang Model Changes for Ethernet VPN.
[netvirt.git] / vpnservice / fibmanager / fibmanager-api / src / main / yang / odl-fib.yang
1 module odl-fib {
2     namespace "urn:opendaylight:netvirt:fibmanager";
3     prefix odl-fib;
4
5     import yang-ext {prefix ext; revision-date "2013-07-09";}
6
7     revision "2015-03-30" {
8         description "FIB Manager module";
9     }
10
11     grouping ipv4Entries{
12         list ipv4Entry{
13             key  "destPrefix";
14             leaf destPrefix {type string;}
15             leaf nextHopAddress {type string;}
16         }
17     }
18
19     grouping vrfEntries{
20         list vrfEntry{
21             key  "destPrefix";
22             leaf destPrefix {
23                 type string;
24                 mandatory true;
25             }
26             leaf label {
27                 type uint32;
28             }
29             leaf-list nextHopAddressList {
30                 type string;
31                 min-elements "1";
32             }
33             leaf origin {
34                 type string;
35                 mandatory true;
36             }
37             leaf encap-type {
38                description
39                   "This flag indicates how to interpret the existing label field.
40                    A value of mplsgre indicates that the label will continue to be considered as an MPLS Label.
41                    A value of vxlan indicates that l3vni should be used to advertise to bgp and label will be ignored.";
42
43                type enumeration {
44                   enum mplsgre {
45                      value "0";
46                      description "MPLSOverGRE";
47                   }
48                   enum vxlan {
49                      value "1";
50                      description “VNI";
51                   }
52                }
53                default "mplsgre";
54             }
55
56             leaf l3vni {
57                type uint32;
58             }
59             leaf gateway_mac_address {
60                type string;
61             }
62
63         }
64     }
65
66     augment "/odl-fib:fibEntries/odl-fib:vrfTables/odl-fib:vrfEntry" {
67             ext:augment-identifier "subnetRoute";
68             leaf elantag {type uint32;}
69     }
70
71     augment "/odl-fib:fibEntries/odl-fib:vrfTables/odl-fib:vrfEntry" {
72         ext:augment-identifier "routerInterface";
73         leaf uuid {type string;}
74         leaf mac-address {type string;}
75         leaf ip-address {type string;}
76     }
77
78     container fibEntries {
79         config true;
80         list vrfTables{
81             key "routeDistinguisher";
82             leaf routeDistinguisher {type string;}
83             uses vrfEntries;
84         }
85
86         container ipv4Table{
87             uses ipv4Entries;
88         }
89     }
90
91     container label-route-map {
92          config false;
93          list label-route-info {
94             key label;
95             leaf label { type uint32; }
96             leaf dpn-id { type uint64; }
97             leaf prefix { type string; }
98             leaf-list next-hop-ip-list { type string; }
99             leaf-list vpn-instance-list { type string; }
100             leaf parent-vpnid { type uint32; }
101             leaf vpn-interface-name { type string; }
102             leaf elan-tag { type uint32; }
103             leaf is-subnet-route { type boolean; }
104             leaf parent-vpn-rd { type string; }
105          }
106     }
107 }