Merge "Vpnmanager and fibmanager changes 1. Merge fib and nexthop manager 2. Integrat...
[vpnservice.git] / vpnmanager / vpnmanager-api / src / main / yang / odl-l3vpn.yang
1 module odl-l3vpn {
2     namespace "urn:opendaylight:l3vpn";
3     prefix odl-l3vpn;
4
5     import yang-ext {prefix ext; revision-date "2013-07-09";}
6     import l3vpn { prefix l3vpn; revision-date "2014-08-15"; }
7
8     revision "2013-09-11" {
9         description "L3 VPN Service module";
10     }
11
12     grouping adjacency-list{
13         list adjacency{
14             key "ip_address";
15             leaf nextHopIp { type string; }
16             leaf ip_address {type string;}
17             leaf label { type uint32; config "false"; } /* optional */
18             leaf mac_address {type string;} /* optional */
19         }
20     }
21
22     grouping vpn-route-list{
23         leaf-list route-entry-id{
24             type uint32;
25         }
26     }
27
28     augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
29         ext:augment-identifier "adjacencies";
30         uses adjacency-list;
31     }
32
33     /* Operational DS containers for reverse lookups*/
34     container prefix-to-interface {
35         config false;
36         list vpn-ids {
37            key vpn-id;
38            leaf vpn-id {type uint32;}
39            list prefixes {
40               key ip_address;
41               leaf ip_address {type string;}
42               leaf dpnId {
43                  type uint64;
44               }
45               leaf vpn-interface-name {
46                   type string;
47               }
48            }
49         }
50     }
51
52     /* Data models to adhere to restart requirements */
53     container vpn-instance-to-vpn-id {
54        list vpn-instance {
55           key vpn-instance-name;
56           leaf vpn-instance-name {
57              type string;
58           }
59           leaf vpn-id {
60              type uint32;
61           }
62           leaf vrf-id {
63               description
64                  "The vrf-id command configures a route distinguisher (RD)
65                   for the IPv4 or IPv6 address family of a VPN instance or
66                   vpn instance name for internal vpn case.";
67               type string;
68           }
69        }
70     }
71
72     container vpn-instance-op-data {
73         config false;
74         list vpn-instance-op-data-entry {
75            key vrf-id;
76            leaf vpn-id { type uint32;}
77            leaf vrf-id {
78               description
79                  "The vrf-id command configures a route distinguisher (RD)
80                   for the IPv4 or IPv6 address family of a VPN instance or
81                   vpn instance name for internal vpn case.";
82               type string;
83            }
84
85            uses vpn-route-list;
86            list vpn-to-dpn-list {
87                key dpnId;
88                leaf dpnId {
89                   type uint64;
90                }
91                list vpn-interfaces {
92                   key interface-name;
93                   leaf interface-name {
94                       type string;
95                   }
96                }
97            }
98         }
99     }
100
101 }