Merge "pyang: missing key in neutron port attribute"
[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 Juno House Neutron VPNaaS model";
26     
27     revision "2014-10-02" {
28         description
29                 "Initial version";
30     }
31
32     grouping firewall-attrs {
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 firewallpolicy-attrs {
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 firewallrule-attrs {
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 fwaas-attributes {
122         container firewalls {
123             list firewall {
124                 key "uuid";
125                 uses attrs:base-attrs;
126                 uses attrs:admin-attrs;
127                 uses firewall-attrs;
128             }
129         }
130         container firewall-policies {
131             list firewall-policy {
132                 key "uuid";
133                 uses attrs:base-attrs;
134                 uses firewallpolicy-attrs;
135             }
136         }
137         container firewall-rules {
138             list firewall-rule {
139                 key "uuid";
140                 uses attrs:base-attrs;
141                 uses firewallrule-attrs;
142             }
143         }
144     }
145 }