squashed test fix
[openflowplugin.git] / openflowplugin / src / main / yang / openflow-plugin-cfg-impl.yang
1 module openflow-provider-impl {
2         yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl";
4     prefix "ofplugin-cfg-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;}
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
12
13     description
14         "openflow-plugin-custom-config-impl";
15
16     revision "2014-03-26" {
17         description
18             "Initial revision";
19     }
20
21     identity openflow-provider-impl {
22         base config:module-type;
23         config:provided-service openflow-provider:openflow-provider;
24         config:java-name-prefix ConfigurableOpenFlowProvider;
25     }
26
27     identity msg-spy-service {
28         description
29             "MessageCountDumperServiceInterface as a MsgSpyService interface identity";
30         base config:service-type;
31         config:java-class "org.opendaylight.openflowplugin.api.statistics.MessageCountDumper";
32     }
33
34     identity msg-spy-service-impl {
35         description
36             "This is the definition of MsgSpyService implementation module identity.";
37         base config:module-type;
38         config:provided-service msg-spy-service;
39         config:java-name-prefix MsgSpyService;
40     }
41
42     augment "/config:modules/config:module/config:configuration" {
43         case openflow-provider-impl {
44             when "/config:modules/config:module/config:type = 'openflow-provider-impl'";
45
46             container binding-aware-broker {
47                 uses config:service-ref {
48                     refine type {
49                         mandatory true;
50                         config:required-identity md-sal-binding:binding-broker-osgi-registry;
51                     }
52                 }
53             }
54             list openflow-switch-connection-provider {
55                 uses config:service-ref {
56                     refine type {
57                         mandatory true;
58                         config:required-identity openflow-switch-connection-provider:openflow-switch-connection-provider;
59                     }
60                 }
61             }
62         }
63
64         case msg-spy-service-impl {
65             when "/config:modules/config:module/config:type = 'msg-spy-service-impl'";
66
67             container openflow-plugin-provider {
68                 uses config:service-ref {
69                     refine type {
70                         mandatory true;
71                         config:required-identity openflow-provider:openflow-provider;
72                     }
73                 }
74             }
75         }
76     }
77
78     augment "/config:modules/config:module/config:state" {
79         case msg-spy-service-impl {
80             when "/config:modules/config:module/config:type = 'msg-spy-service-impl'";
81
82             description
83                 "MXBean designed for Message Statistic providing to JConsole.";
84
85             leaf msgStatistics {
86                 type string;
87             }
88
89             rpcx:rpc-context-instance "make-msg-statistics-rpc";
90         }
91     }
92
93     identity make-msg-statistics-rpc;
94
95     rpc make-msg-statistics {
96
97         description 
98             "Shortcut JMX call to getMsgStatistics.";
99
100         input {
101             uses rpcx:rpc-context-ref {
102                 refine context-instance {
103                     rpcx:rpc-context-instance make-msg-statistics-rpc;
104                 }
105             }
106         }
107
108         output {
109             leaf result {
110                 type string;
111             }
112         }
113     }
114 }