Upgrade to odlparent 2.0.2
[controller.git] / opendaylight / config / threadpool-config-impl / src / main / yang / threadpool-impl.yang
1 module threadpool-impl {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl";
4     prefix "th-java";
5
6     import threadpool { prefix th; revision-date 2013-04-09; }
7     import config { prefix config; revision-date 2013-04-05; }
8     import rpc-context { prefix rpcx; revision-date 2013-06-17; }
9
10     organization "Cisco Systems, Inc.";
11
12     contact "Robert Varga <rovarga@cisco.com>";
13
14     description
15         "This module contains the base YANG definitions for
16          thread services pure Java implementation.
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 "2013-04-05" {
26         description
27             "Updated to work with new anchors.";
28     }
29
30     revision "2013-04-03" {
31         description
32             "Initial revision by Anton Tkacik, Tomas Olvecky and
33              Robert Varga.";
34     }
35
36     identity eventbus {
37         base config:module-type;
38         config:provided-service th:eventbus;
39         config:java-name-prefix EventBus;
40         status deprecated;
41     }
42
43     augment "/config:modules/config:module/config:configuration" {
44         status deprecated;
45         case eventbus {
46             when "/config:modules/config:module/config:type = 'eventbus'";
47             // No real configuration
48         }
49     }
50
51     augment "/config:modules/config:module/config:state" {
52         status deprecated;
53         case eventbus {
54             when "/config:modules/config:module/config:type = 'eventbus'";
55             rpcx:rpc-context-instance "event-bus-rpc";
56         }
57     }
58
59     identity event-bus-rpc;
60
61     identity async-eventbus {
62         base config:module-type;
63         config:provided-service th:eventbus;
64         config:java-name-prefix AsyncEventBus;
65         status deprecated;
66     }
67
68     augment "/config:modules/config:module/config:configuration" {
69         status deprecated;
70         case async-eventbus {
71             when "/config:modules/config:module/config:type = 'async-eventbus'";
72             container threadpool {
73                 uses config:service-ref {
74                     refine type {
75                         //mandatory true;
76                         config:required-identity th:threadpool;
77                     }
78                 }
79             }
80         }
81     }
82
83     augment "/config:modules/config:module/config:state" {
84         status deprecated;
85         case async-eventbus {
86             when "/config:modules/config:module/config:type = 'async-eventbus'";
87             rpcx:rpc-context-instance "event-bus-rpc";
88         }
89     }
90
91     rpc get-dead-events-count {
92         config:java-name-prefix countDeadEvents;
93         input {
94             uses rpcx:rpc-context-ref {
95                 refine context-instance {
96                     rpcx:rpc-context-instance event-bus-rpc;
97                 }
98             }
99         }
100         output {
101             leaf result {
102                 type uint32;
103             }
104         }
105     }
106
107     identity threadfactory-naming {
108         base config:module-type;
109         config:provided-service th:threadfactory;
110         config:java-name-prefix NamingThreadFactory;
111     }
112
113     augment "/config:modules/config:module/config:configuration" {
114         case threadfactory-naming {
115             when "/config:modules/config:module/config:type = 'threadfactory-naming'";
116             leaf name-prefix {
117                 type string;
118             }
119         }
120     }
121 }
122