Bug 809: Enhancements to the toaster example
[controller.git] / opendaylight / md-sal / samples / toaster / src / main / yang / toaster.yang
index 15c0ac83edea5e3f0bfd80a4889c859541b23f93..11b746f68170db5084357de7e9c93c81f0456511 100644 (file)
           "This variable indicates the current state of 
                the toaster.";
       }
+      
+      leaf darknessFactor {
+        type uint32;
+        config true;
+        default 1000;
+        description
+          "The darkness factor. Basically, the number of ms to multiple the doneness value by.";
+      }
     }  // container toaster
 
     rpc make-toast {
            if the toaster service is disabled.";
     }  // rpc cancel-toast
 
-    notification toastDone {
-      description
-        "Indicates that the toast in progress has completed.";
-      leaf toastStatus {
-        type enumeration {
-          enum "done" {
-            value 0;
-            description "The toast is done.";
-          }
-          enum "cancelled" {
-            value 1;
-            description
-              "The toast was cancelled.";
-          }
-          enum "error" {
-            value 2;
-            description
-              "The toaster service was disabled or
-                     the toaster is broken.";
-          }
+    rpc restock-toaster {
+        description
+          "Restocks the toaster with the amount of bread specified.";
+          
+        input {
+            leaf amountOfBreadToStock {
+                type uint32;
+                description
+                  "Indicates the amount of bread to re-stock";
+            }
         }
+    }
+    
+    notification toasterOutOfBread {
+      description
+        "Indicates that the toaster has run of out bread.";
+    }  // notification toasterOutOfStock
+    
+    notification toasterRestocked {
+      description
+        "Indicates that the toaster has run of out bread.";
+      leaf amountOfBread {
+        type uint32;
         description
-          "Indicates the final toast status";
+          "Indicates the amount of bread that was re-stocked";
       }
-    }  // notification toastDone
+    }  // notification toasterOutOfStock
+    
   }  // module toaster