package com.bocloud.ims.interfaces.resource;

import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.GridBean;
import com.bocloud.common.model.Pager;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.SchedulerPolicy;

import java.util.List;

/**
 * 资源调度service接口
 *
 * @author wangyu
 * @version 4.1.0-SNAPSHOT
 * @since 2018/12/24
 */
public interface SchedulerPolicyService {

	/**
	 * 分页查询
	 *
	 * @param page
	 * @param rows
	 * @param params
	 * @param sorter
	 * @param simple
	 * @return
	 */
	public BocloudResult<GridBean<SchedulerPolicy>> list(Pager pager);

	/**
	 * 创建调度策略
	 *
	 * @param schedulerPolicy
	 * @param user
	 * @return
	 */
	public BocloudResult<SchedulerPolicy> create(SchedulerPolicy schedulerPolicy, RequestContext context);

	/**
	 * 修改调度策略
	 *
	 * @param schedulerPolicy
	 * @param user
	 * @return
	 */
	public BocloudResult<SchedulerPolicy> modify(SchedulerPolicy schedulerPolicy, RequestContext context);

	/**
	 * 删除调度策略
	 *
	 * @param id
	 * @param user
	 * @return
	 */
	public BocloudResult<String> remove(Long id, RequestContext context);

	/**
	 * 查询详细
	 *
	 * @param id
	 * @return
	 */
	public BocloudResult<SchedulerPolicy> detail(Long id);

	/**
	 * @param id
	 * @param clusterIds
	 * @param user
	 * @return
	 */
	public BocloudResult<SchedulerPolicy> clusterBind(Long id, List<Long> clusterIds, RequestContext context);

}
