Example #1
0
def destroy(caller_id, farm_id):
    """
    Destroys caller's farms with ids listed in data.

    @decoratedby{src.cm.utils.decorators.user_log}
    @parameter{data,list} list of destroyed farm's \c id's

    @response @asreturned{src.cm.manager.farm.utils.destroy()}
    """

    return Farm.destroy([Farm.get(caller_id, farm_id)])
Example #2
0
def destroy(caller_id, farm_id):
    """
    Destroys specified caller's farm.

    @cmview_user
    @param_post{farm_id,int} destroyed farm's id

    @response @asreturned{src.cm.manager.farm.utils.destroy()}
    """

    return Farm.destroy([Farm.get(caller_id, farm_id)])
Example #3
0
def destroy(caller_id, farm_id):
    """
    Destroys specified caller's farm.

    @cmview_user
    @param_post{farm_id,int} destroyed farm's id

    @response @asreturned{src.cm.manager.farm.utils.destroy()}
    """

    return Farm.destroy([Farm.get(caller_id, farm_id)])
Example #4
0
def destroy(caller_id, farm_ids):
    """
    @decoratedby{src.cm.utils.decorators.admin_cm_log}
    Admin method to destroy farms with ids listed in \c data.

    @parameter{data,list} list of destroyed farm's \c id's

    @response @asreturned{src.cm.manager.farm.utils.destroy()}
    """
    farms = []
    for farm_id in farm_ids:
        farms.append(Farm.admin_get(farm_id))
    return Farm.destroy(farms)
Example #5
0
def destroy(caller_id, farm_ids):
    """
    Destroyes specified Farms. Neither Farm's head nor worker nodes are saved.
    Destroyed Farm cannot be recovered.

    @cmview_admin_cm
    @param_post{farm_ids,list(int)} ids of the Farms to destroy

    @response{list{HTTPResponse}} list of responses for each VM destruction
    """
    farms = []
    for farm_id in farm_ids:
        farms.append(Farm.admin_get(farm_id))
    return Farm.destroy(farms)
Example #6
0
def destroy(caller_id, farm_ids):
    """
    Destroyes specified Farms. Neither Farm's head nor worker nodes are saved.
    Destroyed Farm cannot be recovered.

    @cmview_admin_cm
    @param_post{farm_ids,list(int)} ids of the Farms to destroy

    @response{list{HTTPResponse}} list of responses for each VM destruction
    """
    farms = []
    for farm_id in farm_ids:
        farms.append(Farm.admin_get(farm_id))
    return Farm.destroy(farms)