Adds Minimum Bandwidth Rule to the Qos Policy
[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 direction {
44             type identityref {
45                 base "constants:direction-base";
46             }
47             description "The direction in which metering rule is applied.";
48         }
49         leaf metering-label-id {
50             type yang:uuid;
51             description "Metering Label ID to associate with this metering rule.";
52         }
53         leaf remote-ip-prefix {
54             description "The remote IP prefix to be associated with this metering rule. packet.";
55             type inet:ip-prefix;
56         }
57         leaf excluded {
58             type boolean;
59             description "Specify whether the remote_ip_prefix
60                 will be excluded or not from traffic counters of
61                 the metering label, ie: to not count the traffic
62                 of a specific IP address of a range.";
63             default "false";
64         }
65     }
66
67     grouping metering-labels-attributes {
68         container metering-labels {
69             description "Container for metering labels.";
70             list metering-label {
71                 key "uuid";
72                 uses attrs:base-attributes;
73                 uses metering-label-attributes;
74                 description "List of Metering Labels.";
75             }
76         }
77     }
78
79     grouping metering-rules-attributes {
80         container metering-rules {
81             description " Container for metering rules.";
82             list metering-rule {
83                 key "uuid";
84                 uses attrs:id-attributes;
85                 uses metering-rule-attributes;
86                 description "List of Metering Rules.";
87             }
88         }
89     }
90 }