Revision 5480daec

b/snf-cyclades-app/synnefo/logic/backend.py
221 221
        back_network.operstate = state_for_success
222 222

  
223 223
    if status in ('canceled', 'error') and opcode == 'OP_NETWORK_ADD':
224
        utils.update_state(back_network, 'ERROR')
224
        back_network.operstate = 'ERROR'
225 225
        back_network.backendtime = etime
226 226

  
227 227
    if opcode == 'OP_NETWORK_REMOVE':
b/snf-cyclades-app/synnefo/logic/utils.py
106 106
    return r
107 107

  
108 108

  
109
def update_state(vm, new_operstate):
110
    """Wrapper around updates of the VirtualMachine.operstate field"""
111

  
112
    vm.operstate = new_operstate
113

  
114

  
115 109
def hide_pass(kw):
116 110
    if 'osparams' in kw and 'img_passwd' in kw['osparams']:
117 111
        kw1 = deepcopy(kw)

Also available in: Unified diff