--- /dev/null
+// vi: set smarttab et sw=4 tabstop=4:
+module toaster-consumer-impl {
+
+ yang-version 1;
+ namespace "urn:opendaylight:params:xml:ns:yang:controller:config:toaster-consumer:impl";
+ prefix "toaster-consumer-impl";
+
+ import config { prefix config; revision-date 2013-04-05; }
+ import rpc-context { prefix rpcx; revision-date 2013-06-17; }
+
+ import toaster-consumer { prefix toaster-consumer; revision-date 2014-01-31; }
+ import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
+
+ description
+ "This module contains the base YANG definitions for
+ toaster-consumer impl implementation.";
+
+ revision "2014-01-31" {
+ description
+ "Initial revision.";
+ }
+
+ // This is the definition of a service implementation
+ identity toaster-consumer-impl {
+ base config:module-type;
+ config:provided-service toaster-consumer:toaster-consumer;
+ config:java-name-prefix ToasterConsumer;
+ }
+
+ augment "/config:modules/config:module/config:configuration" {
+ case toaster-consumer-impl {
+ when "/config:modules/config:module/config:type = 'toaster-consumer-impl'";
+
+ container rpc-registry {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity mdsal:binding-rpc-registry;
+ }
+ }
+ }
+
+ container notification-service {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity mdsal:binding-notification-service;
+ }
+ }
+ }
+
+ }
+ }
+
+ augment "/config:modules/config:module/config:state" {
+ case toaster-consumer-impl {
+ when "/config:modules/config:module/config:type = 'toaster-consumer-impl'";
+ rpcx:rpc-context-instance "make-hash-brown-toast-rpc";
+ }
+ }
+
+ identity make-hash-brown-toast-rpc;
+
+ rpc make-hash-brown-toast {
+ input {
+ uses rpcx:rpc-context-ref {
+ refine context-instance {
+ rpcx:rpc-context-instance make-hash-brown-toast-rpc;
+ }
+ }
+ leaf doneness {
+ type uint16;
+ }
+ }
+ output {
+ leaf result {
+ type boolean;
+ }
+ }
+ }
+}
\ No newline at end of file