Revision 0827883e snf-cyclades-app/synnefo/logic/backend.py

b/snf-cyclades-app/synnefo/logic/backend.py
207 207

  
208 208

  
209 209
@transaction.commit_on_success
210
def process_create_progress(vm, etime, rprogress, wprogress):
210
def process_create_progress(vm, etime, progress):
211 211

  
212
    # XXX: This only uses the read progress for now.
213
    #      Explore whether it would make sense to use the value of wprogress
214
    #      somewhere.
215
    percentage = int(rprogress)
212
    percentage = int(progress)
216 213

  
217 214
    # The percentage may exceed 100%, due to the way
218
    # snf-progress-monitor tracks bytes read by image handling processes
215
    # snf-image:copy-progress tracks bytes read by image handling processes
219 216
    percentage = 100 if percentage > 100 else percentage
220 217
    if percentage < 0:
221 218
        raise ValueError("Percentage cannot be negative")
......
374 371

  
375 372
def reboot_instance(vm, reboot_type):
376 373
    assert reboot_type in ('soft', 'hard')
377
    vm.client.RebootInstance(vm.backend_vm_id, reboot_type, dry_run=settings.TEST)
374
    vm.client.RebootInstance(vm.backend_vm_id, reboot_type,
375
                             dry_run=settings.TEST)
378 376
    log.info('Rebooting instance %s', vm.backend_vm_id)
379 377

  
380 378

  

Also available in: Unified diff