package com.bocloud.cmp.provider.storage;

import java.util.List;

import com.bocloud.cmp.model.*;
import com.bocloud.cmp.model.h3c.H3cVolumeModel;
import com.bocloud.cmp.model.storage.StorageGroupModel;
import com.bocloud.cmp.provider.SuperProvider;
import com.bocloud.common.model.BocloudResult;

public interface VolumeProvider extends SuperProvider {
    @Override
    public boolean accessable();

    public BocloudResult list();

    public BocloudResult create(VolumeModel volume);

    default BocloudResult getVolumeSamples(Long volumeId) {
        return null;
    }

    default BocloudResult list(String hostId, String storagePoolName) {
        return null;
    }

    default BocloudResult remove(H3cVolumeModel volume) {
        return null;
    }

    default BocloudResult createVolumeType(VolumeTypeModel model) {
        return null;
    }

    default BocloudResult deleteVolumeType(String volumeTypeUuid) {
        return null;
    }

    public BocloudResult modify(VolumeModel volume);

    default BocloudResult migrateVolume(VolumeModel volume) {
        return null;
    }

    default BocloudResult copyVolume(VolumeModel volume) {
        return null;
    }

    public BocloudResult remove(String volumeId);

    default public BocloudResult detail(String volumeId) {
        return null;
    }

    default public BocloudResult snapshot(SnapshotModel snapshotModel) {
        return null;
    }

    default public BocloudResult attach(String serverId, String volumeId) {
        return null;
    }

    default public BocloudResult attach(String serverId, String mountpoint, String volumeId) {
        return null;
    }

    default public BocloudResult detach(String serverId, String volumeId) {
        return null;
    }

    default public BocloudResult resetStatus(String volumeId, String status) {
        return null;
    }

    default public BocloudResult uploadToImage(String volumeId, ImageModel imageModel) {
        return null;
    }

    default public BocloudResult extend(String volumeId, Integer newSize) {
        return null;
    }

    default BocloudResult list(String zone) {
        return null;
    }

    default BocloudResult extend(String volumeId, Integer newSize, String type) {
        return null;
    }

    /**
     * 删除云硬盘
     *
     * @param volume
     * @return
     */
    default public BocloudResult remove(VolumeModel volume) {
        return null;
    }

    default BocloudResult onboard(String storageName, List<String> volumeIds) {
        return null;
    }

    default BocloudResult unmanage(String storageName, List<String> volumeIds) {
        return null;
    }

    default BocloudResult allVolumes(String storageName) {
        return null;
    }

    default BocloudResult setMetadata(String volumeUuid, VolumeMetadataModel metadataModel) {
        return null;
    }

    default BocloudResult listMirrors(String volumeUuid) {
        return null;
    }

    default BocloudResult addGroups(String volumeKeyPath, List<StorageGroupModel> model) {
        return null;
    }

    default BocloudResult removeGroups(String volumeKeyPath, List<StorageGroupModel> model) {
        return null;
    }

    default BocloudResult getMetadata(String volumeUuid) {
        return null;
    }

    default BocloudResult attach(VolumeModel model) {
        return null;
    }

    /**
     * 查询支持的磁盘类型
     *
     * @return
     */
    default public BocloudResult listVolumeTypes() {
        return null;
    }

    default BocloudResult createTag(VolumeModel model) {
        return null;
    }

    default BocloudResult removeTag(VolumeModel model) {
        return null;
    }

    // 恢复云硬盘
    default BocloudResult restore(VolumeModel model) {
        return null;
    }
}
