Bump versions by 0.1.0 for next dev cycle
[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; revision-date "2013-07-15"; }
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       }
87       leaf peer-ip {
88         type leafref {
89           path "/ericsson-bgp:bgp/neighbors/address";
90         }
91       }
92     }
93     container update-source {
94       leaf source-ip {
95         type inet:ipv4-address;
96       }
97       leaf peer-ip {
98         type leafref {
99           path "/ericsson-bgp:bgp/neighbors/address";
100         }
101       }
102     }
103     list address-families {
104       key "afi safi";
105       leaf afi {
106         type uint32;
107         mandatory "true";
108       }
109       leaf safi {
110         type uint32;
111         mandatory "true";
112       }
113       leaf peer-ip {
114         type leafref {
115           path "/ericsson-bgp:bgp/neighbors/address";
116         }
117       }
118     } //addr-families
119   } // neighbhors
120
121   list networks {
122     key "rd prefix-len";
123     leaf rd {
124       type string;
125     }
126     leaf prefix-len {
127           type string;
128     }
129     leaf nexthop {
130       type inet:ipv4-address;
131       mandatory "false";
132     }
133     leaf label {
134       type uint32;
135       mandatory "false";
136     }
137   } // networks
138
139   list vrfs {
140     key "rd";
141     leaf rd {
142       type string;
143     }
144     leaf-list import-rts {
145       type string;
146     }
147     leaf-list export-rts {
148       type string;
149     }
150   }
151  } // bgp
152 }