Merge "Remove Metering ConcurrentHashMaps"
[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     // 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     import neutron-constants { prefix "constants"; }
21
22     organization "OpenDaylight Neutron Group";
23
24     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
25
26     description "This YANG module defines metering attributes that are used by Openstack
27         Juno House Neutron YANG modules.";
28
29     revision "2014-10-02" {
30         description
31                 "Initial version of metering attributes used by OpenStack Ice House Neutron
32                 models";
33     }
34
35     grouping metering-label-attributes {
36         description "OpenStack Layer3 Metering label information.";
37         leaf description {
38             type string;
39             description "Description for the metering label.";
40         }
41     }
42
43     grouping metering-rule-attributes {
44         description "OpenStack Layer3 Metering label rules.";
45         leaf id {
46             type yang:uuid;
47             description "Metering Rule ID.";
48         }
49         leaf direction {
50             type identityref {
51                 base "constants:direction-base";
52             }
53             description "The direction in which metering rule is applied.";
54         }
55         leaf metering-label-id {
56             type yang:uuid;
57             description "Metering Label ID to associate with this metering rule.";
58         }
59         leaf remote-ip-prefix {
60             description "The remote IP prefix to be associated with this metering rule. packet.";
61             type string;
62         }
63         leaf excluded {
64             type boolean;
65             description "Specify whether the remote_ip_prefix 
66                 will be excluded or not from traffic counters of
67                 the metering label, ie: to not count the traffic
68                 of a specific IP address of a range.";
69             default "false";
70         }
71     }
72
73     grouping metering-labels-attributes {
74         container metering-labels {
75             description "Container for metering labels.";
76             list metering-label {
77                 key "uuid";
78                 uses attrs:base-attributes;
79                 uses metering-label-attributes;
80                 description "List of Metering Labels.";
81             }
82         }
83     }
84
85     grouping metering-rules-attributes {
86         container metering-rules {
87             description " Container for metering rules.";
88             list metering-rule {
89                 key "id";
90                 uses metering-rule-attributes;
91                 description "List of Metering Rules.";
92             }
93         }
94     }
95 }