Revision 90858bda

b/snf-cyclades-app/synnefo/logic/backend.py
140 140
    if status == "success":
141 141
        if state_for_success is not None:
142 142
            vm.operstate = state_for_success
143
        if nics is not None:
144
            # Update the NICs of the VM
145
            _process_net_status(vm, etime, nics)
146 143
        if beparams:
147 144
            # Change the flavor of the VM
148 145
            _process_resize(vm, beparams)
......
153 150
        # in reversed order.
154 151
        vm.backendtime = etime
155 152

  
153
    if status in ["success", "error", "canceled"] and nics is not None:
154
        # Update the NICs of the VM
155
        _process_net_status(vm, etime, nics)
156

  
156 157
    # Special case: if OP_INSTANCE_CREATE fails --> ERROR
157 158
    if opcode == 'OP_INSTANCE_CREATE' and status in ('canceled', 'error'):
158 159
        vm.operstate = 'ERROR'
b/snf-cyclades-gtools/synnefo/ganeti/eventd.py
247 247
            if op.status == "success":
248 248
                msg["result"] = op.result
249 249

  
250
            if op_id in ["OP_INSTANCE_CREATE", "OP_INSTANCE_SET_PARAMS",
251
                         "OP_INSTANCE_STARTUP"]:
252
                if op.status == "success":
250
            if ((op_id in ["OP_INSTANCE_CREATE", "OP_INSTANCE_STARTUP"] and
251
                 op.status == "success") or
252
                (op_id == "OP_INSTANCE_SET_PARAMS" and
253
                 op.status in ["success", "error", "cancelled"])):
253 254
                    nics = get_instance_nics(msg["instance"], self.logger)
254 255
                    msg["nics"] = nics
255 256

  

Also available in: Unified diff