make neutron.yang consistent
[neutron.git] / model / src / main / yang / neutron-metering.yang
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  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-metering {
9
10     yang-version 1;
11
12     namespace "urn:opendaylight:neutron-metering";
13
14     prefix neutron-metering;
15
16     import ietf-yang-types { prefix "yang"; }
17     import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; }
18     import neutron-attrs { prefix "attrs"; }
19     import neutron-constants { prefix "constants"; }
20
21     organization "OpenDaylight Neutron Group";
22
23     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
24
25     description "This YANG module defines Openstack Neutron Metering attributes";
26
27     revision "2015-07-12" {
28         description
29                 "OpenDaylight Beryllium release";
30     }
31
32     grouping metering-label-attributes {
33         description "OpenStack Layer3 Metering label information.";
34         leaf shared {
35             type boolean;
36             description "Indicates whether this metering label is shared across all tenants.";
37             default "false";
38         }
39     }
40
41     grouping metering-rule-attributes {
42         description "OpenStack Layer3 Metering label rules.";
43         leaf uuid {
44             type yang:uuid;
45             description "Metering Rule ID.";
46         }
47         leaf tenant-id {
48             type yang:uuid;
49             description "The UUID of the tenant that will own the object.";
50         }
51         leaf direction {
52             type identityref {
53                 base "constants:direction-base";
54             }
55             description "The direction in which metering rule is applied.";
56         }
57         leaf metering-label-id {
58             type yang:uuid;
59             description "Metering Label ID to associate with this metering rule.";
60         }
61         leaf remote-ip-prefix {
62             description "The remote IP prefix to be associated with this metering rule. packet.";
63             type inet:ip-prefix;
64         }
65         leaf excluded {
66             type boolean;
67             description "Specify whether the remote_ip_prefix
68                 will be excluded or not from traffic counters of
69                 the metering label, ie: to not count the traffic
70                 of a specific IP address of a range.";
71             default "false";
72         }
73     }
74
75     grouping metering-labels-attributes {
76         container metering-labels {
77             description "Container for metering labels.";
78             list metering-label {
79                 key "uuid";
80                 uses attrs:base-attributes;
81                 uses metering-label-attributes;
82                 description "List of Metering Labels.";
83             }
84         }
85     }
86
87     grouping metering-rules-attributes {
88         container metering-rules {
89             description " Container for metering rules.";
90             list metering-rule {
91                 key "uuid";
92                 uses metering-rule-attributes;
93                 description "List of Metering Rules.";
94             }
95         }
96     }
97 }