Merge "Implementation of ModuleShardStrategy"
[controller.git] / opendaylight / commons / protocol-framework / src / main / yang / odl-protocol-framework-cfg.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module protocol-framework {
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:protocol:framework";
5     prefix "pf";
6
7     import config { prefix config; revision-date 2013-04-05; }
8     import netty { prefix netty; revision-date 2013-11-19; }
9
10     organization "Cisco Systems, Inc.";
11
12     contact "Milos Fabian <milfabia@cisco.com>";
13
14     description
15         "This module contains the base YANG definitions for
16          protocol framework.
17
18         Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
19
20         This program and the accompanying materials are made available
21         under the terms of the Eclipse Public License v1.0 which
22         accompanies this distribution, and is available at
23         http://www.eclipse.org/legal/epl-v10.html";
24
25     revision "2014-03-13" {
26         description
27             "Changed reconnect-strategy to reconnect-strategy-factory - represents ReconnectStrategyFactory.
28             reconnect-strategy-factory modules provides reconnect-strategy-factory service.";
29     }
30
31     revision "2013-11-09" {
32         description
33             "Initial revision";
34     }
35
36     identity reconnect-strategy-factory {
37         description
38             "Service representing a reconnect strategy factory.";
39
40         base "config:service-type";
41         config:java-class "org.opendaylight.protocol.framework.ReconnectStrategyFactory";
42     }
43
44     identity never-reconnect-strategy-factory {
45         base config:module-type;
46         config:provided-service reconnect-strategy-factory;
47         config:java-name-prefix NeverReconnectStrategyFactory;
48     }
49
50     augment "/config:modules/config:module/config:configuration" {
51         case never-reconnect-strategy-factory {
52             when "/config:modules/config:module/config:type = 'never-reconnect-strategy-factory'";
53
54             leaf timeout {
55                 mandatory true;
56                 type int32;
57             }
58
59             container executor {
60                 uses config:service-ref {
61                     refine type {
62                         mandatory true;
63                         config:required-identity netty:netty-event-executor;
64                     }
65                 }
66             }
67         }
68     }
69
70     identity reconnect-immediately-strategy-factory {
71         base config:module-type;
72         config:provided-service reconnect-strategy-factory;
73         config:java-name-prefix ReconnectImmediatelyStrategyFactory;
74     }
75
76     augment "/config:modules/config:module/config:configuration" {
77         case reconnect-immediately-strategy-factory {
78             when "/config:modules/config:module/config:type = 'reconnect-immediately-strategy-factory'";
79
80             leaf reconnect-timeout {
81                 mandatory true;
82                 type int32;
83             }
84
85             container reconnect-executor {
86                 uses config:service-ref {
87                     refine type {
88                         mandatory true;
89                         config:required-identity netty:netty-event-executor;
90                     }
91                 }
92             }
93         }
94     }
95
96     identity timed-reconnect-strategy-factory {
97         base config:module-type;
98         config:provided-service reconnect-strategy-factory;
99         config:java-name-prefix TimedReconnectStrategyFactory;
100     }
101
102     augment "/config:modules/config:module/config:configuration" {
103         case timed-reconnect-strategy-factory {
104             when "/config:modules/config:module/config:type = 'timed-reconnect-strategy-factory'";
105
106             leaf deadline {
107                 type int64;
108                 units "epoch nanoseconds";
109             }
110
111             leaf max-attempts {
112                 mandatory true;
113                 type int64;
114             }
115
116             leaf max-sleep {
117                 mandatory true;
118                 type int64;
119                 units "milliseconds";
120             }
121
122             leaf min-sleep {
123                 mandatory true;
124                 type int64;
125                 units "milliseconds";
126             }
127
128             leaf sleep-factor {
129                 mandatory true;
130                 type decimal64 {
131                     fraction-digits 2;
132                 }
133             }
134
135             leaf connect-time {
136                 mandatory true;
137                 type int32;
138                 units "milliseconds";
139             }
140
141             container timed-reconnect-executor {
142                 uses config:service-ref {
143                     refine type {
144                         mandatory true;
145                         config:required-identity netty:netty-event-executor;
146                     }
147                 }
148             }
149         }
150     }
151 }