Revision c4e45b57 snf-cyclades-app/synnefo/logic/utils.py

b/snf-cyclades-app/synnefo/logic/utils.py
102 102
    if vm.deleted:
103 103
        return "DELETED"
104 104
    # A machine is in REBOOT if an OP_INSTANCE_REBOOT request is in progress
105
    if r == 'ACTIVE' and vm.backendopcode == 'OP_INSTANCE_REBOOT' and \
106
        vm.backendjobstatus in ('queued', 'waiting', 'running'):
105
    in_reboot = (r == 'ACTIVE') and\
106
                (vm.backendopcode == "OP_INSTANCE_REBOOT") and\
107
                (vm.backendjobstatus in ('queued', 'waiting', 'running'))
108
    if in_reboot:
107 109
        return "REBOOT"
108 110
    return r
109 111

  

Also available in: Unified diff