6c54e4deefae5a59b9356452632a9391a3c19183
[openflowplugin.git] / openflowplugin-impl / src / main / yang / openflow-plugin-impl.yang
1 module openflow-plugin-provider-impl {
2         yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:config:openflow:plugin:impl";
4     prefix "openflow-plugin-provider-impl";
5
6     import config {prefix config; revision-date 2013-04-05;}
7     import rpc-context { prefix rpcx; revision-date 2013-06-17; }
8     import openflow-provider {prefix openflow-provider; revision-date 2015-03-31;}
9     import openflow-switch-connection-provider {prefix openflow-switch-connection-provider;revision-date 2014-03-28;}
10     import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
11     import opendaylight-sal-binding-broker-impl { prefix sal-broker; revision-date 2013-10-28;}
12     import openflowplugin-extension-registry {prefix ofp-ext-reg; revision-date 2015-04-25;}
13     import opendaylight-entity-ownership-service { prefix ownership-service; revision-date 2015-08-10;}
14
15     description
16         "openflow-plugin-impl";
17
18     revision "2015-03-27" {
19         description
20             "Second openflow plugin implementation.";
21     }
22
23     typedef non-zero-uint32-type {
24         type uint32 {
25             range "1..max";
26         }
27     }
28
29     typedef non-zero-uint16-type {
30         type uint16 {
31             range "1..max";
32         }
33      }
34
35     identity openflow-plugin-provider-impl {
36         base config:module-type;
37         config:provided-service openflow-provider:openflow-provider;
38         config:provided-service ofp-ext-reg:openflow-extension-registry-provider;
39         config:java-name-prefix OpenFlowProvider;
40     }
41
42     augment "/config:modules/config:module/config:configuration" {
43         case openflow-plugin-provider-impl {
44             when "/config:modules/config:module/config:type = 'openflow-plugin-provider-impl'";
45
46             container data-broker {
47                 uses config:service-ref {
48                     refine type {
49                         mandatory true;
50                         config:required-identity md-sal-binding:binding-async-data-broker;
51                     }
52                 }
53             }
54             container rpc-registry {
55                 uses config:service-ref {
56                     refine type {
57                         mandatory true;
58                         config:required-identity md-sal-binding:binding-rpc-registry;
59                     }
60                 }
61             }
62             container notification-adapter {
63                 uses config:service-ref {
64                     refine type {
65                         mandatory true;
66                         config:required-identity sal-broker:binding-new-notification-service;
67                     }
68                 }
69             }
70             container notification-publish-adapter {
71                 uses config:service-ref {
72                     refine type {
73                         mandatory true;
74                         config:required-identity sal-broker:binding-new-notification-publish-service;
75                     }
76                 }
77             }
78             container entity-ownership-service {
79                 uses config:service-ref {
80                     refine type {
81                         mandatory true;
82                         config:required-identity ownership-service:entity-ownership-service;
83                     }
84                 }
85             }
86             list openflow-switch-connection-provider {
87                 uses config:service-ref {
88                     refine type {
89                         mandatory true;
90                         config:required-identity openflow-switch-connection-provider:openflow-switch-connection-provider;
91                     }
92                 }
93             }
94             leaf rpc-requests-quota {
95                 type uint32;
96                 default 500;
97             }
98             leaf switch-features-mandatory {
99                 type boolean;
100                 default false;
101             }
102             leaf global-notification-quota {
103                 type uint32;
104                 default 131072;
105             }
106             leaf is-statistics-polling-on {
107                 type boolean;
108                 default "true";
109             }
110             leaf is-statistics-rpc-enabled {
111                 status deprecated;
112                 description "Exposing backward compatible statistics rpcs providing result in form of async notification";
113                 type boolean;
114                 default "false";
115             }
116             leaf barrier-interval-timeout-limit {
117                 type non-zero-uint32-type;
118                 default 500;
119             }
120             leaf barrier-count-limit {
121                 type non-zero-uint16-type;
122                 default 25600;
123             }
124             leaf echo-reply-timeout {
125                 type non-zero-uint32-type;
126                 default 2000;
127             }
128         }
129
130     }
131 }