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

import com.bocloud.common.annotations.Log;
import com.bocloud.common.enums.BoCloudService;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.ims.interfaces.resource.AlarmThresholdService;
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.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v1/alarmthresholds")
@Api(value = "告警阈值管理", tags = "告警阈值管理")
public class AlarmThresholdController {

    @Autowired
    private AlarmThresholdService alarmThresholdService;

    /**
     * 删除告警阈值
     *
     * @param target
     * @param catalog
     * @return
     */
    @ApiOperation(tags={"CMC","CSC"},value = "删除告警阈值",  httpMethod = "DELETE")
    @Log(module = BoCloudService.IMS, target = "告警阈值", operation = "删除告警阈值")
    @DeleteMapping
    public BocloudResult remove(@RequestParam(value = "target") Long target, @RequestParam(value = "catalog") String catalog) {
        return alarmThresholdService.remove(target, catalog);
    }
}
