]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
engine : remove unused update states/status
authorSteven Hardy <shardy@redhat.com>
Fri, 17 May 2013 13:20:31 +0000 (14:20 +0100)
committerSteven Hardy <shardy@redhat.com>
Mon, 20 May 2013 08:02:14 +0000 (09:02 +0100)
We have some aws-isms in the update code related to different
update states, which is not actually used anywhere, so may as
well remove it - it's probably easier at least for now to focus
on the three update states of COMPLETE/FAILED/REPLACEMENT

Change-Id: Ieeaf92ab0fec6bbfab3dddf2d8fecb0b38c1b2fc

heat/engine/parser.py
heat/engine/resource.py

index 492491e608250d0ad6783d631ed77baab6a46378..637407d50c0ec8883a36eca0ea3bae8285b97d5e 100644 (file)
@@ -375,16 +375,11 @@ class Stack(object):
                 # based on the parsed template snippet for the resource.
                 # If this  test fails, we call the underlying resource.update
                 #
-                # FIXME : Implement proper update logic for the resources
-                # AWS define three update strategies, applied depending
-                # on the resource and what is being updated within a
-                # resource :
-                # - Update with no interruption
-                # - Update with some interruption
-                # - Update requires replacement
-                #
-                # Currently all resource have a default handle_update method
+                # Currently many resources have a default handle_update method
                 # which returns "requires replacement" (res.UPDATE_REPLACE)
+                # optionally they may implement non-interruptive logic and
+                # return UPDATE_COMPLETE. If resources do not implement the
+                # handle_update method at all, update will fail.
                 for res in newstack:
                     # Compare resolved pre/post update resource snippets,
                     # note the new resource snippet is resolved in the context
index 67f85e8a21312e0717a9639a930884a7c9832a7f..77b096ed0e5162f84939670027ab6a1bf38a038a 100644 (file)
@@ -93,11 +93,8 @@ class Resource(object):
     UPDATE_FAILED = 'UPDATE_FAILED'
     UPDATE_COMPLETE = 'UPDATE_COMPLETE'
 
-    # Status values, returned from subclasses to indicate update method
+    # Status value, returned from subclasses to indicate replacement required
     UPDATE_REPLACE = 'UPDATE_REPLACE'
-    UPDATE_INTERRUPTION = 'UPDATE_INTERRUPTION'
-    UPDATE_NO_INTERRUPTION = 'UPDATE_NO_INTERRUPTION'
-    UPDATE_NOT_IMPLEMENTED = 'UPDATE_NOT_IMPLEMENTED'
 
     # If True, this resource must be created before it can be referenced.
     strict_dependency = True
@@ -373,7 +370,6 @@ class Resource(object):
 
         logger.info('updating %s' % str(self))
 
-        result = self.UPDATE_NOT_IMPLEMENTED
         try:
             self.state_set(self.UPDATE_IN_PROGRESS)
             properties = Properties(self.properties_schema,