def update(server_id, action_id, data={}): log_debug(3, server_id, action_id) action_status = rhnFlags.get('action_status') if action_status == 3: # Action failed kickstart_state = 'failed' next_action_type = None else: kickstart_state = 'deployed' #This is horrendous, but in order to fix it I would have to change almost all of the #actions code, which we don't have time to do for the 500 beta. --wregglej try: ks_session_type = server_kickstart.get_kickstart_session_type(server_id, action_id) except rhnException, re: ks_session_type = None if ks_session_type is None: next_action_type = "None" elif ks_session_type == 'para_guest': next_action_type = 'kickstart_guest.initiate' else: next_action_type = 'kickstart.initiate'
def update(server_id, action_id, data={}): log_debug(3, server_id, action_id) action_status = rhnFlags.get('action_status') if action_status == 3: # Action failed kickstart_state = 'failed' next_action_type = None else: kickstart_state = 'deployed' #This is horrendous, but in order to fix it I would have to change almost all of the #actions code, which we don't have time to do for the 500 beta. --wregglej try: ks_session_type = server_kickstart.get_kickstart_session_type(server_id, action_id) except rhnException, re: ks_session_type = None if ks_session_type is None: next_action_type = "None" elif ks_session_type == 'para_guest': next_action_type = 'kickstart_guest.initiate' else: next_action_type = 'kickstart.initiate'
def update(server_id, action_id, data={}): log_debug(3, server_id, action_id) action_status = rhnFlags.get('action_status') if action_status == 3: # Action failed kickstart_state = 'failed' next_action_type = None else: kickstart_state = 'deployed' # This is horrendous, but in order to fix it I would have to change almost all of the # actions code, which we don't have time to do for the 500 beta. --wregglej try: ks_session_type = server_kickstart.get_kickstart_session_type( server_id, action_id) except rhnException: re = sys.exc_info()[1] ks_session_type = None if ks_session_type is None: next_action_type = "None" elif ks_session_type == 'para_guest': next_action_type = 'kickstart_guest.initiate' else: next_action_type = 'kickstart.initiate' log_debug(4, "next_action_type: %s" % next_action_type) # More hideous hacked together code to get around our inflexible actions "framework". # If next_action_type is "None", we're assuming that we're *not* in a kickstart session # at this point, so we don't want to update a non-existant kickstart session. # I feel so dirty. --wregglej if next_action_type != "None": server_kickstart.update_kickstart_session( server_id, action_id, action_status, kickstart_state=kickstart_state, next_action_type=next_action_type) _mark_dep_failures(server_id, action_id, data)
def update(server_id, action_id, data={}): log_debug(3, server_id, action_id) action_status = rhnFlags.get('action_status') if action_status == 3: # Action failed kickstart_state = 'failed' next_action_type = None else: kickstart_state = 'deployed' # This is horrendous, but in order to fix it I would have to change almost all of the # actions code, which we don't have time to do for the 500 beta. --wregglej try: ks_session_type = server_kickstart.get_kickstart_session_type(server_id, action_id) except rhnException: re = sys.exc_info()[1] ks_session_type = None if ks_session_type is None: next_action_type = "None" elif ks_session_type == 'para_guest': next_action_type = 'kickstart_guest.initiate' else: next_action_type = 'kickstart.initiate' log_debug(4, "next_action_type: %s" % next_action_type) # More hideous hacked together code to get around our inflexible actions "framework". # If next_action_type is "None", we're assuming that we're *not* in a kickstart session # at this point, so we don't want to update a non-existant kickstart session. # I feel so dirty. --wregglej if next_action_type != "None": server_kickstart.update_kickstart_session(server_id, action_id, action_status, kickstart_state=kickstart_state, next_action_type=next_action_type) _mark_dep_failures(server_id, action_id, data)