package com.bocloud.ims.booter.controller.resource;

import com.bocloud.common.annotations.Log;
import com.bocloud.common.enums.BoCloudService;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.GridBean;
import com.bocloud.common.model.Pager;
import com.bocloud.ims.entity.resource.ScsiLun;
import com.bocloud.ims.interfaces.resource.ScsiLunService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/scsi/lun")
@Api(value = "存储设备", tags = "存储设备")
public class ScsiLunController {

    @Autowired
    private ScsiLunService scsiLunService;

    /**
     * 获取存储设备列表
     *
     * @param pager
     * @return
     */
    @ApiOperation(tags = {"CMC", "CSC"}, value = "获取存储设备列表",  httpMethod = "GET")
    @Log(module = BoCloudService.IMS, target = "存储设备", operation = "获取存储设备列表")
    @GetMapping
    public BocloudResult<GridBean<ScsiLun>> list(Pager pager) {
        return scsiLunService.list(pager);
    }

}
