package com.bocloud.ims.interfaces.resource;

import com.alibaba.fastjson.JSONObject;
import com.bocloud.cmp.model.ClusterBean;
import com.bocloud.cmp.model.ClusterOperateModel;
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.params.ServerPerformanceParam;
import com.bocloud.ims.entity.resource.AlarmThreshold;
import com.bocloud.ims.entity.resource.Cluster;

import java.util.List;
import java.util.Map;

/**
 * 集群服务接口
 *
 * @author weiwei
 * @version 1.0
 * @since 2016.12.28
 */
public interface ClusterService {

    BocloudResult<GridBean<Cluster>> list(Pager pager);

    BocloudResult<Cluster> create(ClusterOperateModel model, RequestContext context);

    BocloudResult<Cluster> modify(ClusterBean bean, RequestContext context);

    BocloudResult remove(Long id, RequestContext context);

    BocloudResult<Cluster> detail(Long id);

    BocloudResult moveHost(JSONObject object, RequestContext context);

    BocloudResult<AlarmThreshold> createAlarm(AlarmThreshold alarmThreshold);

    BocloudResult<AlarmThreshold> getAlarm(Long target);

    BocloudResult addHost(String params, RequestContext context);

    BocloudResult removeHost(String params, RequestContext context);

    BocloudResult performance(String params);

    BocloudResult<Map<String, Object>> getTrend(Long id, String params);

    BocloudResult batchRemove(List<Long> idArray, RequestContext context);

    BocloudResult syncHostByCluster(Long id, RequestContext context);

}
