Add feature identity for qos rule types
[neutron.git] / model / src / main / yang / neutron-extensions.yang
1 /*
2  * Copyright (c) 2016 Intel 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
9 module neutron-extensions {
10     yang-version 1;
11
12     namespace "urn:opendaylight:neutron-extensions";
13
14     prefix neutron-extensions;
15
16     organization "OpenDaylight Neutron Group";
17
18     contact "Isaku Yamahata <isaku.yamahata@gmail.com>";
19
20     description "This YANG module defines neutron extensions attributes that are used
21         by OpenDaylight Neutron YANG modules.
22         http://developer.openstack.org/api-ref-networking-v2-ext.html#neutron_extensions";
23
24     revision "2016-06-17" {
25         description
26                 "OpenDaylight Boron release";
27     }
28
29     grouping extension-attributes {
30         leaf name {
31             type string;
32             description "The name of the extension";
33         }
34         leaf alias {
35             type string;
36             description "The alias for the extension";
37         }
38         leaf configuration {
39             type string;
40             description "The configuration of this extension";
41         }
42     }
43
44     grouping extensions-attributes {
45         container extensions {
46             config false;
47             list extension {
48                 key "alias";
49                 uses extension-attributes;
50             }
51         }
52     }
53
54     identity service-provider-feature-type-base {
55         description "Base identity for Feature that openstack service provider
56                     supports.";
57     }
58
59     // The list of openstack service provider features.
60     // Maintain the list of features as they are introduced
61     // identity extension-report {
62     //     description "extensions-attributes is populated";
63     //     base service-provider-feature-type-base;
64     // }
65     // identity port-status {
66     //     description "port status is updated";
67     //     base service-provider-feature-type-base;
68     // }
69     identity operational-port-status {
70         description "port status update when port created";
71         base service-provider-feature-type-base;
72     }
73
74     identity qos-rules {
75         description "The qos rules supported. The configuration leaf should
76         contain a json string such that models the supported_rules
77         parameter of neutron_lib.services.qos.DriverBase";
78
79         base service-provider-feature-type-base;
80     }
81
82     grouping service-provider-feature-attributes {
83         leaf service-provider-feature {
84             type identityref {
85                 base service-provider-feature-type-base;
86             }
87             description "supported features by openstack service provider";
88         }
89         leaf configuration {
90             type string;
91             description "The configuration of this feature";
92         }
93     }
94
95     grouping service-provider-features-attributes {
96         description "List of features that openstack service provider supports.
97                     networking-odl will retrieve this list and configures itself
98                     to use what features.
99                     This is for networking-odl to support multiple versions
100                     ODL and multiple openstack service providers";
101         container features {
102             config false;
103             list feature {
104                 key "service-provider-feature";
105                 uses service-provider-feature-attributes;
106             }
107         }
108     }
109 }