Merge "northgound: Make Neutron*Request implements INeutronRequest interface"
[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 Openstack Neutron Metering attributes";
27
28     revision "2015-07-12" {
29         description
30                 "OpenDaylight Beryllium release";
31     }
32
33     grouping metering-label-attributes {
34         description "OpenStack Layer3 Metering label information.";
35         leaf description {
36             type string;
37             description "Description for the metering label.";
38         }
39     }
40
41     grouping metering-rule-attributes {
42         description "OpenStack Layer3 Metering label rules.";
43         leaf id {
44             type yang:uuid;
45             description "Metering Rule ID.";
46         }
47         leaf direction {
48             type identityref {
49                 base "constants:direction-base";
50             }
51             description "The direction in which metering rule is applied.";
52         }
53         leaf metering-label-id {
54             type yang:uuid;
55             description "Metering Label ID to associate with this metering rule.";
56         }
57         leaf remote-ip-prefix {
58             description "The remote IP prefix to be associated with this metering rule. packet.";
59             type inet:ip-prefix;
60         }
61         leaf excluded {
62             type boolean;
63             description "Specify whether the remote_ip_prefix 
64                 will be excluded or not from traffic counters of
65                 the metering label, ie: to not count the traffic
66                 of a specific IP address of a range.";
67             default "false";
68         }
69     }
70
71     grouping metering-labels-attributes {
72         container metering-labels {
73             description "Container for metering labels.";
74             list metering-label {
75                 key "uuid";
76                 uses attrs:base-attributes;
77                 uses metering-label-attributes;
78                 description "List of Metering Labels.";
79             }
80         }
81     }
82
83     grouping metering-rules-attributes {
84         container metering-rules {
85             description " Container for metering rules.";
86             list metering-rule {
87                 key "id";
88                 uses metering-rule-attributes;
89                 description "List of Metering Rules.";
90             }
91         }
92     }
93 }