Merge "Bug 4789 - model allowed address pairs"
[neutron.git] / model / src / main / yang / neutron-bgpvpns.yang
1 /*
2  * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.
3  * All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 module neutron-bgpvpns {
11
12     yang-version 1;
13
14     namespace "urn:opendaylight:neutron-bgpvpns";
15
16     prefix neutron-bgpvpns;
17
18     import ietf-yang-types { prefix "yang"; }
19     import neutron-attrs { prefix "attrs"; }
20
21     organization "OpenDaylight Neutron Group";
22
23     contact "Vishal Thapar <vishal.thapar@ericsson.com>";
24
25     description "This YANG module defines Openstack Liberty Neutron BGPVPN model";
26
27     revision "2015-09-03" {
28         description
29                 "Initial version of Openstack Neutron Liberty BGPVPN model.";
30     }
31
32     identity bgpvpn-type-base {
33         description
34                 "Base Network type for all Bgpvpn type identifiers.";
35     }
36
37     identity bgpvpn-type-l2 {
38         base bgpvpn-type-base;
39         description
40                 "L2 bgpvpn type identity.";
41     }
42     identity bgpvpn-type-l3 {
43         base bgpvpn-type-base;
44         description
45                 "L3 bgpvpn type identity.";
46     }
47
48     typedef bgpvpn-type {
49         type identityref {
50             base bgpvpn-type-base;
51         }
52         description
53                 "This type is used to refer to a Bgpvpn Type.";
54     }
55
56     grouping bgpvpn-attributes {
57         leaf type {
58             type bgpvpn-type;
59             description "selection of the type of VPN. e.g. l3 or l2";
60         }
61         leaf technique {
62             type string;
63             description "selection of technique used to implement VPN";
64         }
65         leaf-list route-targets {
66             type string;
67             description "route-targets";
68         }
69         leaf-list import-targets {
70             type string;
71             description "import RTs";
72         }
73         leaf-list export-targets {
74             type string;
75             description "export RTs";
76         }
77         leaf-list route-distinguishers {
78             type string;
79             description "list route-distinguishers";
80         }
81         leaf vnid {
82             type uint32;
83             description "globally assigned VxLanId";
84         }
85         leaf auto-aggregate {
86             type boolean;
87             description "auto-aggregate enabled or not";
88             default "false";
89         }
90         leaf-list networks {
91             type yang:uuid;
92             description "list of networks this vpn is associated with.";
93         }
94         leaf-list routers {
95             type yang:uuid;
96             description "list of routers this vpn is associated with.";
97         }
98     }
99
100     grouping bgpvpns-attributes {
101         container bgpvpns {
102             list bgpvpn {
103                 key "uuid";
104                 uses attrs:base-attributes;
105                 uses attrs:admin-attributes;
106                 uses bgpvpn-attributes;
107             }
108         }
109     }
110 }