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