package com.bocloud.ims.interfaces.resource.hmc;

import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.hmc.*;
import com.bocloud.ims.entity.resource.hmc.params.*;

import java.util.List;

/**
 * Volume Group Service
 *
 * @author lkx007
 *
 */
public interface HmcVolumeGroupService {
    /**
     * 列表volume group
     *
     * @return
     */
    public BocloudResult<List<HmcVolumeGroup>> list(Long serverId, Long vendorId, Long viosId);

    /**
     * 列表物理卷信息
     *
     * @return
     */
    public BocloudResult<List<HmcPhysicalDisk>> listPd(Long serverId, Long vendorId, Long viosId);

    /**
     * 列表物理光纤通道
     *
     * @return
     */
    public BocloudResult<List<HmcPhysicalFibreChannel>> listFc(Long partitionId);

    /**
     * 列表虚拟光纤通道映射
     *
     * @return
     */
    public BocloudResult<List<HmcVirtualFibreChannelMapping>> listFcMapping(Long partitionId, Long uniqueDeviceId);

    /**
     * 创建虚拟磁盘
     *
     * @param params
     * @param context
     * @return
     */
    public BocloudResult createVd(HmcVolumeGroupParams params, RequestContext context);

    /**
     * 查询虚拟磁盘
     *
     * @return
     */
    public BocloudResult<List<HmcVirtualDisk>> listVd(Long serverId, Long vendorId, Long lparId);

    /**
     * 删除虚拟磁盘
     *
     * @param params
     * @param context
     * @return
     */
    public BocloudResult deleteVd(HmcVolumeGroupParams params, RequestContext context);

    /**
     * 列表虚拟插槽
     *
     * @return
     */
    public BocloudResult<List<Object>> virtualSlotList(Long viosId, Long partitionId);

    /**
     * 分配虚拟磁盘
     *
     * @param params
     * @param context
     * @return
     */
    public BocloudResult assignVd(HmcVolumeGroupAssignParams params, RequestContext context);

    /**
     * 取消分配虚拟磁盘
     *
     * @param params
     * @param context
     * @return
     */
    BocloudResult unAssignVd(HmcStorageUnassign params, RequestContext context);

    /**
     * 分配物理磁盘
     *
     * @param params
     * @param context
     * @return
     */
    public BocloudResult assignPd(HmcVolumeGroupAssignParams params, RequestContext context);

    /**
     * 取消分配物理磁盘
     *
     * @param params
     * @param context
     * @return
     */
    public BocloudResult unAssignPd(HmcStorageUnassign params, RequestContext context);

    /**
     * 虚拟磁盘的扩容
     *
     * @param params
     * @param context
     * @return
     */
    public BocloudResult update(HmcVolumeGroupUpdateParams params, RequestContext context);

    /**
     * 创建存储池
     * @param params 参数
     * @param context 用户
     * @return BocloudResult
     */
    public BocloudResult createVG(HmcVolumeGroupCreateParams params, RequestContext context);

    /**
     * 删除存储池
     * @param params 参数
     * @param context 用户
     * @return BocloudResult
     */
    public BocloudResult removeVG(Long vgId, RequestContext context);
}
