4611809073dfd5de7220b6addc8059df3c39fb8b
[vpnservice.git] / model-bgp / src / main / yang / ebgp.yang
1 module ebgp {
2
3   yang-version "1";
4
5   // namespace
6   namespace "urn:ericsson:params:xml:ns:yang:ebgp";
7
8   prefix "ericsson-bgp";
9
10   // import some basic inet types
11   import ietf-inet-types { prefix inet; }
12
13   // meta
14   organization
15     "Ericsson Bangalore";
16
17   contact
18     "Ericsson Bangalore"; 
19
20   description
21     "BGP configuration model for Ericsson's implementation of
22     Opendaylight L3VPN";
23
24   revision "2015-09-01" {
25   }
26
27  container bgp {
28   config "true"; 
29   container config-server {
30     leaf host {
31       type inet:ipv4-address;
32       mandatory "true";
33     }
34     leaf port {
35       type uint32;
36       mandatory "true"; 
37     } 
38   }
39
40   container as-id {
41     leaf local-as {
42       type uint32;
43       mandatory "true";
44     }
45     leaf router-id {
46       type inet:ipv4-address;
47     }
48     leaf stalepath-time {
49       type uint32;
50       default 360;
51     }
52     leaf announce-fbit {
53       type boolean;
54     }
55   }
56
57   container graceful-restart {
58     leaf stalepath-time {
59       type uint32;
60       mandatory "true";
61     }
62   }
63
64   container logging {
65     leaf file {
66       type string;
67     }
68     leaf level {
69       type string;
70     }
71   }
72
73   list neighbors { 
74     key "address";
75     leaf address {
76       type inet:ipv4-address;
77       mandatory "true";
78     }
79     leaf remote-as {
80       type uint32;
81       mandatory "true";
82     }
83     container ebgp-multihop {
84       leaf nhops {
85         type uint32;
86         mandatory "true";
87       }
88       leaf peer-ip {
89         type leafref {
90           path "/ericsson-bgp:bgp/neighbors/address";
91         }
92       }
93     }
94     container update-source {
95       leaf source-ip {
96         type inet:ipv4-address;
97       }
98       leaf peer-ip {
99         type leafref {
100           path "/ericsson-bgp:bgp/neighbors/address";
101         }
102       }
103     }
104     list address-families {
105       key "afi safi";
106       leaf afi {
107         type uint32;
108         mandatory "true";
109       }
110       leaf safi {
111         type uint32;
112         mandatory "true";
113       }
114       leaf peer-ip {
115         type leafref {
116           path "/ericsson-bgp:bgp/neighbors/address";
117         }
118       }
119     } //addr-families
120   } // neighbhors
121
122   list networks {
123     key "rd prefix-len";
124     leaf rd {
125       type string;
126     }
127     leaf prefix-len {
128           type string;
129     }
130     leaf nexthop {
131       type inet:ipv4-address;
132       mandatory "false";
133     }
134     leaf label {
135       type uint32;
136       mandatory "false";
137     }
138   } // networks
139
140   list vrfs {
141     key "rd";
142     leaf rd {
143       type string;
144     }
145     leaf-list import-rts {
146       type string;
147     }
148     leaf-list export-rts {
149       type string;
150     }
151   }
152  } // bgp
153 }