---
 docs/framework.mdown |   28 +++++++++++-----------------
 1 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/docs/framework.mdown b/docs/framework.mdown
index 429ed8a..7f6ee03 100644
--- a/docs/framework.mdown
+++ b/docs/framework.mdown
@@ -202,26 +202,20 @@ The `destroy_instance(...)` method should remove the 
instance from the
 cloud provider, stopping it if necessary first.
 
 
-#### `instance_states()`
-
-The `instance_states()` method should return an complex array/hash
-structure representing the finite-state-machine for instances.
-Each state an instance may be in should be an element in the returned array.
-Each state itself is also an array with 2 member.  The first member is the
-name of the state, and the second member is a hash indicating valid 
transitions.
+#### `define_instance_states()`

+The `define_instance_states` method should representing the 
finite-state-machine 
+for instances.
 The general format for the entire FSM structure is

-    [
-      [ :origin_state1, {
-        :destination_state1=>:action1, 
-        :destination_state2=>:action2, 
-      } ],
-      [ :origin_state2, {
-        :destination_state3=>:action3, 
-        :destination_state4=>:action4, 
-      } ],
-    ]
+  define_instance_states do
+    start.to( :pending )       .on( :create )
+    pending.to( :running )     .automatically
+    running.to( :running )     .on( :reboot )
+    running.to( :stopped )     .on( :stop )
+    stopped.to( :running )     .on( :start )
+    stopped.to( :finish )      .on( :destroy )
+  end

 Valid states are

-- 
1.6.6.2

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to