package com.bocloud.ims.interfaces.resource;

import com.alibaba.fastjson.JSONObject;
import com.bocloud.cmp.entity.enums.ResourceCategory;
import com.bocloud.cmp.vm.model.ResourceAssignParam;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.RequestContext;

/**
 * 资源分配给项目service接口
 *
 * @author wangyu
 * @version 4.1.0-SNAPSHOT
 * @since 2019/2/28
 */
public interface ResourceAllocateService {

    /**
     * 分配资源
     *
     * @param object
     * @param category
     * @param context
     * @return
     */
    BocloudResult assign(JSONObject object, ResourceCategory category, RequestContext context);

    /**
     * 回收资源
     *
     * @param object
     * @param category
     * @param context
     * @return
     */
    BocloudResult reclaim(ResourceAssignParam vmAssignParam, ResourceCategory category, RequestContext context);
}
