Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bug 809: Enhancements to the toaster example
[controller.git]
/
opendaylight
/
md-sal
/
samples
/
toaster-provider
/
src
/
main
/
yang
/
toaster-provider-impl.yang
diff --git
a/opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang
b/opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang
index 0be8874245d602e88f00359d0c95d9750e41ff15..d6de5cfd17136d625a205b0b77122b2143c803fc 100644
(file)
--- a/
opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang
+++ b/
opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang
@@
-6,7
+6,7
@@
module toaster-provider-impl {
prefix "toaster-provider-impl";
import config { prefix config; revision-date 2013-04-05; }
prefix "toaster-provider-impl";
import config { prefix config; revision-date 2013-04-05; }
- import
toaster-provider { prefix toaster-provider; revision-date 2014-01-31
; }
+ import
rpc-context { prefix rpcx; revision-date 2013-06-17
; }
import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
description
import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
description
@@
-18,13
+18,15
@@
module toaster-provider-impl {
"Initial revision.";
}
"Initial revision.";
}
- // This is the definition of
a service implementation
+ // This is the definition of
the service implementation as a module identity.
identity toaster-provider-impl {
base config:module-type;
identity toaster-provider-impl {
base config:module-type;
- config:provided-service toaster-provider:toaster-provider;
+
+ // Specifies the prefix for generated java classes.
config:java-name-prefix ToasterProvider;
}
config:java-name-prefix ToasterProvider;
}
+ // Augments the 'configuration' choice node under modules/module.
augment "/config:modules/config:module/config:configuration" {
case toaster-provider-impl {
when "/config:modules/config:module/config:type = 'toaster-provider-impl'";
augment "/config:modules/config:module/config:configuration" {
case toaster-provider-impl {
when "/config:modules/config:module/config:type = 'toaster-provider-impl'";
@@
-47,17
+49,41
@@
module toaster-provider-impl {
}
}
}
}
+ container data-broker {
+ uses config:service-ref {
+ refine type {
+ mandatory false;
+ config:required-identity mdsal:binding-data-broker;
+ }
+ }
+ }
}
}
augment "/config:modules/config:module/config:state" {
case toaster-provider-impl {
when "/config:modules/config:module/config:type = 'toaster-provider-impl'";
}
}
augment "/config:modules/config:module/config:state" {
case toaster-provider-impl {
when "/config:modules/config:module/config:type = 'toaster-provider-impl'";
-
+
leaf toasts-made {
type uint32;
}
leaf toasts-made {
type uint32;
}
+
+ rpcx:rpc-context-instance "clear-toasts-made-rpc";
+ }
+ }
+
+ identity clear-toasts-made-rpc;
+ rpc clear-toasts-made {
+ description
+ "JMX call to clear the toasts-made counter.";
+
+ input {
+ uses rpcx:rpc-context-ref {
+ refine context-instance {
+ rpcx:rpc-context-instance clear-toasts-made-rpc;
+ }
+ }
}
}
}
}
-}
\ No newline at end of file
+}