Beispiel #1
0
def erase(caller_id, vm_id_list):
    """
    Cleans up after each of the specified VMs. Erase should be called for
    failed machines after the inspection of the failure.

    @cmview_admin_cm
    @param_post{vm_id_list,list} list of VM id's
    """

    for vm_id in vm_id_list:
        vm = VM.admin_get(vm_id)
        VM.erase(vm)
Beispiel #2
0
def erase(caller_id, vm_id_list):
    """
    Cleans up after each of the specified VMs. Erase should be called for
    failed machines after the inspection of the failure.

    @cmview_admin_cm
    @param_post{vm_id_list,list} list of VM id's
    """

    for vm_id in vm_id_list:
        vm = VM.admin_get(vm_id)
        VM.erase(vm)
Beispiel #3
0
def erase(caller_id, vm_id_list):
    """
    Method cleans up after each of VM, which id is in \c vm_ids. Should be
    called for failed machines.
    @cmview_admin_cm

    @parameter{vm_id_list,list} list of vm id's

    @noresponse
    """

    for vm_id in vm_id_list:
        vm = VM.admin_get(vm_id)
        VM.erase(vm)
Beispiel #4
0
def erase(caller_id, farm_ids):
    """
    Cleanes up after failed Farm. Only admin may erase Farm so that he
    previously may perform some analytics.

    @cmview_admin_cm
    @param_post{farm_ids,list(int)} ids of the Farms to erase
    """
    for fid in farm_ids:
        farm = Farm.admin_get(fid)
        for vm in farm.vms.all():
            VM.erase(vm)

            farm.state = farm_states['closed']
            try:
                farm.save()
            except Exception:
                log.exception('Cannot commit changes.')
Beispiel #5
0
def erase(caller_id, farm_ids):
    """
    Cleanes up after failed Farm. Only admin may erase Farm so that he
    previously may perform some analytics.

    @cmview_admin_cm
    @param_post{farm_ids,list(int)} ids of the Farms to erase
    """
    for fid in farm_ids:
        farm = Farm.admin_get(fid)
        for vm in farm.vms.all():
            VM.erase(vm)

            farm.state = farm_states['closed']
            try:
                farm.save()
            except Exception:
                log.exception('Cannot commit changes.')
Beispiel #6
0
def erase(caller_id, farm_ids):
    """
    Method erases (removes from database) details
    about VMs that haven't ran properly.
    @decoratedby{src.cm.utils.decorators.admin_cm_log}

    @parameter{farm_ids,list(int)} ids of the farms to erase
    """
    for fid in farm_ids:
        farm = Farm.admin_get(fid)
        for vm in farm.vms.all():
            VM.erase(vm)

            farm.state = farm_states['closed']
            try:
                farm.save()
            except Exception:
                log.exception('Cannot commit changes.')