package com.bocloud.cmp.model.storage;

import com.bocloud.cmp.model.HostModel;
import com.bocloud.cmp.model.VolumeModel;

import java.util.List;

/**
 * 存储主机
 */
public class StorageHostModel {
    public static class ParamVolume {
        private String uuid; // 存储卷的uuid
        private String access; // 存储卷的使用权限  READ_WRITE  READ_ONLY  NO_ACCESS

        public String getUuid() {
            return uuid;
        }

        public void setUuid(String uuid) {
            this.uuid = uuid;
        }

        public String getAccess() {
            return access;
        }

        public void setAccess(String access) {
            this.access = access;
        }
    }

    private String storageUuid; // 所属存储uuid
    private String storageKeyPath; // 所属存储keyPath
    private String hostUuid; // 标识
    private String name; // 主机名
    private String clientType; // 主机类型
    private String status; // 状态
    private String keyPath; // smis用来传参
    private String description;
    private Boolean chap; // 客户端组是否开启双向chap
    private String chapName;  // 客户端组开启双向chap时的发起端名称
    private String chapSecret; // 客户端组开启双向chap时的发起端机密
    private List<StoragePortModel> ports; // 端口列表
    private List<ParamVolume> paramVolumes; // 要映射的存储卷列表，用于调用Driver时传参数
    private List<VolumeModel> attechedVolumes; // 已映射的存储卷列表，用于查询返回Host和Volume的关联关系
    private List<StorageGroupModel> hostGroups; // 所属主机组列表
    private List<String> attechedVolumeNames; // 已映射的存储卷名称列表，格式：poolName/volumeName
    private StorageIScsiPortModel iScsiPortModel; // 该主机所属的iSCSI端口
    private List<HostModel> allGateways; // 所有的网关服务器

    public String getStorageKeyPath() {
        return storageKeyPath;
    }

    public void setStorageKeyPath(String storageKeyPath) {
        this.storageKeyPath = storageKeyPath;
    }

    public String getKeyPath() {
        return keyPath;
    }

    public void setKeyPath(String keyPath) {
        this.keyPath = keyPath;
    }

    public String getStorageUuid() {
        return storageUuid;
    }

    public void setStorageUuid(String storageUuid) {
        this.storageUuid = storageUuid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClientType() {
        return clientType;
    }

    public void setClientType(String clientType) {
        this.clientType = clientType;
    }

    public String getHostUuid() {
        return hostUuid;
    }

    public void setHostUuid(String hostUuid) {
        this.hostUuid = hostUuid;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<ParamVolume> getParamVolumes() {
        return paramVolumes;
    }

    public void setParamVolumes(List<ParamVolume> paramVolumes) {
        this.paramVolumes = paramVolumes;
    }

    public List<StoragePortModel> getPorts() {
        return ports;
    }

    public void setPorts(List<StoragePortModel> ports) {
        this.ports = ports;
    }

    public List<VolumeModel> getAttechedVolumes() {
        return attechedVolumes;
    }

    public void setAttechedVolumes(List<VolumeModel> attechedVolumes) {
        this.attechedVolumes = attechedVolumes;
    }

    public List<StorageGroupModel> getHostGroups() {
        return hostGroups;
    }

    public void setHostGroups(List<StorageGroupModel> hostGroups) {
        this.hostGroups = hostGroups;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getChap() {
        return chap;
    }

    public void setChap(Boolean chap) {
        this.chap = chap;
    }

    public String getChapName() {
        return chapName;
    }

    public void setChapName(String chapName) {
        this.chapName = chapName;
    }

    public String getChapSecret() {
        return chapSecret;
    }

    public void setChapSecret(String chapSecret) {
        this.chapSecret = chapSecret;
    }

    public List<String> getAttechedVolumeNames() {
        return attechedVolumeNames;
    }

    public void setAttechedVolumeNames(List<String> attechedVolumeNames) {
        this.attechedVolumeNames = attechedVolumeNames;
    }

    public StorageIScsiPortModel getiScsiPortModel() {
        return iScsiPortModel;
    }

    public void setiScsiPortModel(StorageIScsiPortModel iScsiPortModel) {
        this.iScsiPortModel = iScsiPortModel;
    }

    public List<HostModel> getAllGateways() {
        return allGateways;
    }

    public void setAllGateways(List<HostModel> allGateways) {
        this.allGateways = allGateways;
    }
}
