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;

import java.util.List;

/**
 * 集群操作接口
 *
 * @author weiwei
 */
public interface ClusterProvider extends SuperProvider {
    /**
     * 创建集群
     *
     * @param model
     * @return
     */
    default BocloudResult create(ClusterOperateModel model) {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 删除集群
     *
     * @param model
     * @return
     */
    default BocloudResult remove(ClusterOperateModel model) {
        return new BocloudResult(false, "need implement");
    }

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

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

    default BocloudResult create(ClusterModel clusterModel) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult modify(ClusterModel clusterModel) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult remove(String aggregateId) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult addHost(String aggregateId, String hostName) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult removeHost(String aggregateId, String hostName) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult summary(String clusterVal) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult queryByName(String name) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult list() {
        return null;
    }

    default BocloudResult listByVdc(String vdcName) {
        return null;
    }
    default BocloudResult<List<ClusterModel>> getClusterByVlanId(String vlanId) {
        return null;
    }

    default  BocloudResult resourceStatistics(String uri) {
        return null;
    }

}
