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

import com.bocloud.common.annotations.Log;
import com.bocloud.common.enums.BoCloudService;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.RequestContext;
import com.bocloud.common.utils.Common;
import com.bocloud.ims.interfaces.resource.azure.slb.OutboundRuleService;
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.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Company: 博云 www.bocloud.com
 * @ClassName: OutboundRuleController
 * @Description:
 * @author: zhenpingLi/李振平
 * @date: 2021/5/15 16:44
 */
@Api(value = "出站规则", tags = "出站规则管理")
@RestController
@RequestMapping("/v1/outbound/rules")
public class OutboundRuleController {

    @Autowired
    private OutboundRuleService service;

    /**
     * 列表
     *
     * @param id
     * @return
     */
    @ApiOperation(tags = {"CMC", "CSC"}, value = "查询出站规则列表", httpMethod = "GET")
    @Log(module = BoCloudService.IMS, target = "出站规则", operation = "查询出站规则列表")
    @GetMapping("/{id}")
    public BocloudResult list(@PathVariable(value = Common.ID) Long id, @Value(Common.REQ_CONTEXT) RequestContext context) {
        return service.list(id,context);
    }



}