yang model revise: neutron-portsecurity.yang
[neutron.git] / model / src / main / yang / neutron-fwaas.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-fwaas {
9
10     yang-version 1;
11
12     namespace "urn:opendaylight:neutron-fwaas";
13
14     prefix neutron-fwaas;
15
16     import ietf-yang-types { prefix "yang"; }
17     // It requires rfc6991 (revision 2013-07-15), but odl don't have it, so this patch verify build will fail.
18     import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
19     import neutron-attrs { prefix "attrs"; }
20
21     organization "OpenDaylight Neutron Group";
22
23     contact "R. Moats <rmoats@us.ibm.com>";
24
25     description "This YANG module defines Openstack Neutron VPNaaS model";
26
27     revision "2015-07-12" {
28         description
29                 "OpenDaylight Beryllium release";    
30     }
31
32     grouping firewall-attributes {
33         leaf descr {
34             type string;
35             description "Detailed description of the firewall.";
36         }
37         leaf shared {
38             description "whether the firewall is shared or not";
39             type boolean;
40         }
41         leaf firewall-policy-id {
42             description "the firewall policy UUID for this firewall";
43             type yang:uuid;
44         }
45     }
46
47     grouping firewall-policy-attributes {
48         leaf descr {
49             type string;
50             description "Detailed description of the firewall policy.";
51         }
52         leaf shared {
53             description "whether the firewall policy is shared or not";
54             type boolean;
55         }
56         leaf audited {
57             description "whether the firewall policy is audited or not";
58             type boolean;
59         }
60         leaf-list firewall-rules {
61             description "whether the firewall policy is audited or not";
62             type yang:uuid;
63         }
64     }
65
66     grouping firewall-rule-attributes {
67         leaf descr {
68             type string;
69             description "Detailed description of the firewall rule.";
70         }
71         leaf status {
72             type string;
73             description "Status of the firewall rule.";
74         }
75         leaf shared {
76             description "whether the firewall rule is shared or not";
77             type boolean;
78         }
79         leaf enabled {
80             description "whether the firewall rule is enabled or not";
81             type boolean;
82         }
83         leaf firewall-policy-id {
84             description "the firewall policy UUID for this firewall rule";
85             type yang:uuid;
86         }
87         leaf protocol {
88             description "the protocol this rule applies to";
89             type string;
90         }
91         leaf ip-version {
92             description "the ip version this rule applies to";
93             type int16;
94         }
95         leaf source-ip-addr {
96             type inet:ip-address;
97             description "the source ip address for this rule";
98         }
99         leaf destination-ip-addr {
100             type inet:ip-address;
101             description "the destination ip address for this rule";
102         }
103         leaf source-port {
104             description "the source port for this rule";
105             type int16;
106         }
107         leaf destination-port {
108             description "the destination port for this rule";
109             type int16;
110         }
111         leaf position {
112             description "the priority position this rule occupies";
113             type int16;
114         }
115         leaf action {
116             description "the action fot this rule";
117             type string;
118         }
119     }
120
121     grouping firewalls-attributes {
122         container firewalls {
123             list firewall {
124                 key "uuid";
125                 uses attrs:base-attributes;
126                 uses attrs:admin-attributes;
127                 uses firewall-attributes;
128             }
129         }
130     }
131     grouping policies-attributes {
132         container firewall-policies {
133             list firewall-policy {
134                 key "uuid";
135                 uses attrs:base-attributes;
136                 uses firewall-policy-attributes;
137             }
138         }
139     }
140     grouping rules-attributes {
141         container firewall-rules {
142             list firewall-rule {
143                 key "uuid";
144                 uses attrs:base-attributes;
145                 uses firewall-rule-attributes;
146             }
147         }
148     }
149 }