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


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.common.model.RequestContext;
import com.bocloud.common.utils.Common;
import com.bocloud.ims.entity.resource.Network;
import com.bocloud.ims.entity.resource.Port;
import com.bocloud.ims.entity.resource.PortGroup;
import com.bocloud.ims.entity.resource.Server;
import com.bocloud.ims.interfaces.resource.sangfor.SangforNetWorkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v1/sangfor/netWork")
@Api(value = "深信服SCP网络管理", tags = "深信服SCP网络管理")
public class SangforNetWorkController {
    @Autowired
    private SangforNetWorkService sangforNetWorkService;

    @ApiOperation(tags = {"CMC",
            "CSC"}, value = "深信服SCP网络列表查询管理",  httpMethod = "GET")
    @Log(module = BoCloudService.IMS, target = "深信服SCP网络列表查询管理", operation = "深信服SCP网络列表查询管理")
    @GetMapping
    public BocloudResult<GridBean<Network>> list(Pager pager, @Value(Common.REQ_CONTEXT) RequestContext context) {
        return sangforNetWorkService.list(pager, context);
    }

    @ApiOperation(tags = {"CMC",
            "CSC"}, value = "深信服SCP物理网口列表查询管理",  httpMethod = "GET")
    @Log(module = BoCloudService.IMS, target = "深信服SCP物理网口列表查询管理", operation = "深信服SCP物理网口列表查询管理")
    @GetMapping("/dvVlanGroup")
    public BocloudResult<GridBean<PortGroup>> dvVlanGroupList(Pager pager, @Value(Common.REQ_CONTEXT) RequestContext context) {
        return sangforNetWorkService.dvVlanGroupList(pager, context);
    }

    @ApiOperation(tags = {"CMC",
            "CSC"}, value = "深信服SCP端口组列表查询管理",  httpMethod = "GET")
    @Log(module = BoCloudService.IMS, target = "深信服SCP端口组列表查询管理", operation = "深信服SCP端口组列表查询管理")
    @GetMapping("/dvphyIf")
    public BocloudResult<GridBean<Port>> dvPhyIfList(Pager pager, @Value(Common.REQ_CONTEXT) RequestContext context) {
        return sangforNetWorkService.dvPhyIfList(pager, context);
    }
}
