2aa1ac116a279aa51348828c0558e7aaa26fac44
[neutron.git] / model / src / main / yang / neutron-vpnaas.yang
1 /*
2  * Copyright (c) 2015 IBM Corporation.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 module neutron-vpnaas {
9
10     yang-version 1;
11
12     namespace "urn:opendaylight:neutron-vpnaas";
13
14     prefix neutron-vpnaas;
15
16     import ietf-yang-types { prefix "yang"; }
17     import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
18     import neutron-attrs { prefix "attrs"; }
19
20     organization "OpenDaylight Neutron Group";
21
22     contact "R. Moats <rmoats@us.ibm.com>";
23
24     description "This YANG module defines Openstack Neutron VPNaaS model";
25
26     revision "2015-07-12" {
27         description
28                 "OpenDaylight Beryllium release";
29     }
30
31     grouping vpnservice-attributes {
32         leaf descr {
33             type string;
34             description "Detailed description of the vpn service.";
35         }
36         leaf router-id {
37             description "Contains the Router ID for the vpn service.";
38             type yang:uuid;
39         }
40         leaf subnet-id {
41             description "Contains the Subnet ID for the vpn service.";
42             type yang:uuid;
43         }
44     }
45
46     grouping ikepolicy-attributes {
47         leaf descr {
48             type string;
49             description "Detailed description of the ike policy.";
50         }
51         leaf auth-algorithm {
52             type string;
53             description "Authentication hash algorithm.";
54         }
55         leaf encryption-algorithm {
56             description "Encryption algorithm";
57             type string;
58         }
59         leaf phase-negotiation-mode {
60             description "IKE mode";
61             type string;
62         }
63         leaf pfs {
64             description "Perfect Forward Secrecy";
65             type string;
66         }
67         leaf ike-version {
68             description "IKE Version";
69             type string;
70         }
71         container lifetime {
72             description "Security Association Lifetime";
73             leaf units {
74                 description "Units for lifetime of the security association";
75                 type string;
76             }
77             leaf value {
78                 description "Lifetime value, as a positive integer";
79                 type int32;
80             }
81         }
82     }
83
84     grouping ipsecpolicy-attributes {
85         leaf descr {
86             type string;
87             description "Detailed description of the ipsec policy.";
88         }
89         leaf transform-protocol {
90             type string;
91             description "Transform protocol.";
92         }
93         leaf encapsulation-mode {
94             description "Encapsulation mode";
95             type string;
96         }
97         leaf auth-algorithm {
98             type string;
99             description "Authentication hash algorithm.";
100         }
101         leaf encryption-algorithm {
102             description "Encryption algorithm";
103             type string;
104         }
105         leaf pfs {
106             description "Perfect Forward Secrecy";
107             type string;
108         }
109         container lifetime {
110             description "Security Association Lifetime";
111             leaf units {
112                 description "Units for lifetime of the security association";
113                 type string;
114             }
115             leaf value {
116                 description "Lifetime value, as a positive integer";
117                 type int32;
118             }
119         }
120     }
121
122     grouping ipsecconnection-attributes {
123         leaf descr {
124             type string;
125             description "Detailed description of the ipsec policy.";
126         }
127         leaf peer_address {
128             type string;
129             description "Peer gateway public IPv4/IPv6 address or FQDN";
130         }
131         leaf peer_id {
132             type string;
133             description "Peer router identity for authentication";
134         }
135         leaf-list peer_cidrs {
136             type string;
137             description "Unique list of valid peer private CIDRs in the form <net_address>/<prefix>";
138         }
139         leaf route_mode {
140             type string;
141             description "Route mode";
142         }
143         leaf mtu {
144             type int16;
145             description "Maximum Transmission Unit to address fragmentation";
146         }
147         leaf auth_mode {
148             type string;
149             description "Authentication mode";
150         }
151         leaf psk {
152             type string;
153             description "Pre Shared Key";
154         }
155         leaf initiator {
156             type string;
157             description "Whether this VPN can only respond to connections, response-only, or can initiate as well, bi-directional(default).";
158         }
159         leaf ikepolicy-id {
160             description "Unique identifier of IKE policy.";
161             type yang:uuid;
162         }
163         leaf ipsecpolicy-id {
164             description "Unique identifier of IPSec policy.";
165             type yang:uuid;
166         }
167         leaf vpnservice-id {
168             description "Unique identifier of VPN service.";
169             type yang:uuid;
170         }
171         container dpd {
172             description "Dead Peer Detection protocol controls";
173             leaf action {
174                 description "DPD action";
175                 type string;
176             }
177             leaf interval {
178                 description "DPD interval in seconds";
179                 type int32;
180             }
181             leaf timeout {
182                 description "DPD timeout in seconds";
183                 type int32;
184             }
185         }
186     }
187
188     grouping vpnservices-attributes {
189         container vpn-services {
190             list vpnservice {
191                 key "uuid";
192                 uses attrs:base-attributes;
193                 uses attrs:admin-attributes;
194                 uses vpnservice-attributes;
195             }
196         }
197     }
198     grouping ikepolicies-attributes {
199         container ike-policies {
200             list ikepolicy {
201                 key "uuid";
202                 uses attrs:base-attributes;
203                 uses ikepolicy-attributes;
204             }
205         }
206     }
207     grouping ipsecpolicies-attributes {
208         container ipsec-policies {
209             list ipsecpolicy {
210                 key "uuid";
211                 uses attrs:base-attributes;
212                 uses ipsecpolicy-attributes;
213             }
214         }
215     }
216     grouping ipsecconnections-attributes {
217         container ipsec-site-connections {
218             list ipsecsiteconnection {
219                 key "uuid";
220                 uses attrs:base-attributes;
221                 uses attrs:admin-attributes;
222                 uses ipsecconnection-attributes;
223             }
224         }
225     }
226 }