Beispiel #1
0
 def _retrigger_replaced(self, is_update, rsrc, stack, check_resource):
     graph = stack.convergence_dependencies.graph()
     key = parser.ConvergenceNode(rsrc.id, is_update)
     if key not in graph and rsrc.replaces is not None:
         # This resource replaces old one and is not needed in
         # current traversal. You need to mark the resource as
         # DELETED so that it gets cleaned up in purge_db.
         values = {'action': rsrc.DELETE}
         db_api.resource_update_and_save(stack.context, rsrc.id, values)
         # The old resource might be in the graph (a rollback case);
         # just re-trigger it.
         check_resource.retrigger_check_resource(stack.context,
                                                 rsrc.replaces, stack)
Beispiel #2
0
 def _retrigger_replaced(self, is_update, rsrc, stack, check_resource):
     graph = stack.convergence_dependencies.graph()
     key = parser.ConvergenceNode(rsrc.id, is_update)
     if key not in graph and rsrc.replaces is not None:
         # This resource replaces old one and is not needed in
         # current traversal. You need to mark the resource as
         # DELETED so that it gets cleaned up in purge_db.
         values = {'action': rsrc.DELETE}
         db_api.resource_update_and_save(stack.context, rsrc.id, values)
         # The old resource might be in the graph (a rollback case);
         # just re-trigger it.
         key = parser.ConvergenceNode(rsrc.replaces, is_update)
         check_resource.retrigger_check_resource(stack.context, is_update,
                                                 key.rsrc_id, stack)
Beispiel #3
0
 def _retrigger_replaced(self, is_update, rsrc, stack, msg_queue):
     graph = stack.convergence_dependencies.graph()
     key = (rsrc.id, is_update)
     if key not in graph and rsrc.replaces is not None:
         # This resource replaces old one and is not needed in
         # current traversal. You need to mark the resource as
         # DELETED so that it gets cleaned up in purge_db.
         values = {'action': rsrc.DELETE}
         db_api.resource_update_and_save(stack.context, rsrc.id, values)
         # The old resource might be in the graph (a rollback case);
         # just re-trigger it.
         key = (rsrc.replaces, is_update)
         cr = check_resource.CheckResource(self.engine_id, self._rpc_client,
                                           self.thread_group_mgr, msg_queue)
         cr.retrigger_check_resource(stack.context, is_update, key[0],
                                     stack)
Beispiel #4
0
 def _retrigger_replaced(self, is_update, rsrc, stack, msg_queue):
     graph = stack.convergence_dependencies.graph()
     key = (rsrc.id, is_update)
     if key not in graph and rsrc.replaces is not None:
         # This resource replaces old one and is not needed in
         # current traversal. You need to mark the resource as
         # DELETED so that it gets cleaned up in purge_db.
         values = {'action': rsrc.DELETE}
         db_api.resource_update_and_save(stack.context, rsrc.id, values)
         # The old resource might be in the graph (a rollback case);
         # just re-trigger it.
         key = (rsrc.replaces, is_update)
         cr = check_resource.CheckResource(self.engine_id, self._rpc_client,
                                           self.thread_group_mgr, msg_queue)
         cr.retrigger_check_resource(stack.context, is_update, key[0],
                                     stack)
Beispiel #5
0
 def update_and_save(self, values):
     db_api.resource_update_and_save(self._context, self.id, values)
Beispiel #6
0
 def update_by_id(cls, context, resource_id, values):
     db_api.resource_update_and_save(context, resource_id, values)
Beispiel #7
0
 def update_and_save(self, values):
     db_api.resource_update_and_save(self._context, self.id, values)
Beispiel #8
0
 def update_by_id(cls, context, resource_id, values):
     db_api.resource_update_and_save(context, resource_id, values)