The libtoaster source code is available in yumapro-dev and yumapro-source packages.

The SIL library for the toaster.yang will be loaded dynamically by the server (--module=test or load test)


   mydir> netconfd-pro --module=toaster   OR
   yangcli-pro> load toaster 

If you want to Receive RESTCONF Notifications subscribe to event stream by GET request via curl or any web browser:


> curl http://restconf-dev/restconf/stream -H "Accept:text/event-stream"
data:   <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
data:     <eventTime>2016-04-21T21:04:51Z</eventTime>
data:     <netconf-config-change xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
data:       <changed-by>
data:         <username>yumaworks</username>
data:         <session-id>4</session-id>
data:         <source-host></source-host>
data:       </changed-by>
data:       <datastore>running</datastore>
data:       <edit>
data:         <target
data:           xmlns:t="">/toast:toaster</target>
data:         <operation>create</operation>
data:       </edit>
data:     </netconf-config-change>
data:   </notification>


Now, you can utilize toaster SIL library. In order to enable a toaster service create a new toaster:

	yangcli> create /toaster

The toaster will be initialized with the following parameters:


	yangcli> sget /toaster

	yuma-netconf:rpc-reply {
	  data {
	    toaster:toaster {
	      toasterManufacturer 'Acme, Inc.'
	      toasterModelNumber 'Super Toastamatic 2000'
	      toasterStatus up


Now, you can run RPC 'make-toast':


By default make-toast timer is set to 60 seconds. To change it:


	yangcli>make-toast toasterDoneness=8


To stop making toasts, run the following RPC  'cancel-toast':




To disable the toaster:


	yangcli> delete /toaster