Revision f66d8b04 snf-cyclades-app/synnefo/api/management/commands/_common.py

b/snf-cyclades-app/synnefo/api/management/commands/_common.py
48 48
        return timesince(d) + ' ago'
49 49
    else:
50 50
        return 'in ' + timeuntil(d)
51

  
52

  
53
def format_vm_state(vm):
54
    if vm.operstate == "BUILD":
55
        return "BUILD(" + str(vm.buildpercentage) + "%)"
56
    else:
57
        return vm.operstate

Also available in: Unified diff