package com.bocloud.cmp.provider.compute;

import com.bocloud.cmp.model.ClusterModel;
import com.bocloud.cmp.model.ClusterOperateModel;
import com.bocloud.cmp.provider.SuperProvider;
import com.bocloud.common.model.BocloudResult;

/**
 * 集群操作接口
 *
 * @author weiwei
 */
public interface ClusterProvider extends SuperProvider {
    /**
     * 创建集群
     *
     * @param model
     * @return
     */
    public BocloudResult create(ClusterOperateModel model);

    /**
     * 删除集群
     *
     * @param model
     * @return
     */
    public BocloudResult remove(ClusterOperateModel model);

    /**
     * 获取集群信息
     * <p>
     * 用于vCenter云平台，只查询cpu、内存、磁盘的总量和使用信息
     * </p>
     *
     * @param clusterVal 集群的标识
     * @return 集群信息
     * @author sxp
     * @since Apr 26, 2018
     */
    public BocloudResult detail(String clusterVal);

    default BocloudResult detailCluster(String clusterVal) {
        return null;
    }

    public BocloudResult create(ClusterModel clusterModel);

    public BocloudResult modify(ClusterModel clusterModel);

    public BocloudResult remove(String aggregateId);

    public BocloudResult addHost(String aggregateId, String hostName);

    public BocloudResult removeHost(String aggregateId, String hostName);

    public BocloudResult summary(String clusterVal);

    public BocloudResult queryByName(String name);

    default BocloudResult list() {
        return null;
    }

    default BocloudResult listByVdc(String vdcName) {
        return null;
    }
}
