package com.bocloud.cmp.provider.storage;

import com.bocloud.cmp.model.HostModel;
import com.bocloud.cmp.model.VolumeModel;
import com.bocloud.cmp.model.storage.StorageIScsiPortModel;
import com.bocloud.cmp.provider.SuperProvider;
import com.bocloud.common.model.BocloudResult;

/**
 * iSCSI端口
 */
public interface IScsiPortProvider extends SuperProvider {
    /**
     * 查询所有iSCSI端口
     *
     * @return BocloudResult
     */
    default public BocloudResult list() {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 创建
     *
     * @param model iSCSI端口
     * @return BocloudResult
     */
    default public BocloudResult create(StorageIScsiPortModel model) {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 删除
     *
     * @param model iSCSI端口
     * @return BocloudResult
     */
    default public BocloudResult remove(StorageIScsiPortModel model) {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 为iSCSI端口设定是否开启ACL
     *
     * @param model iSCSI端口
     * @param acl   是否开启acl
     * @return BocloudResult
     */
    default public BocloudResult setACL(StorageIScsiPortModel model, boolean acl) {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 为iSCSI端口添加网关服务器
     *
     * @param model   iSCSI端口
     * @param gateway 网关服务器
     * @return BocloudResult
     */
    default public BocloudResult addGateway(StorageIScsiPortModel model, HostModel gateway) {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 为iSCSI端口移除网关服务器
     *
     * @param model   iSCSI端口
     * @param gateway 网关服务器
     * @return BocloudResult
     */
    default public BocloudResult removeGateway(StorageIScsiPortModel model, HostModel gateway) {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 为iSCSI端口添加存储卷
     *
     * @param model  iSCSI端口
     * @param volume 存储卷
     * @return BocloudResult
     */
    default public BocloudResult addVolume(StorageIScsiPortModel model, VolumeModel volume) {
        return new BocloudResult(false, "need implement");
    }

    /**
     * 为iSCSI端口移除存储卷
     *
     * @param model  iSCSI端口
     * @param volume 存储卷
     * @return BocloudResult
     */
    default public BocloudResult removeVolume(StorageIScsiPortModel model, VolumeModel volume) {
        return new BocloudResult(false, "need implement");
    }
}
