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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
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 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.Switcher;
import com.bocloud.ims.interfaces.h3c.H3cNetworkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(value = "H3c网络", tags = "H3c网络")
@RestController
@RequestMapping("/v1/h3c/networks")
public class H3cNetworkController {

	@Autowired
	private H3cNetworkService h3cSwitcherService;

	/**
	 * 查询交换机列表
	 *
	 * @param pager
	 * @param condition
	 * @param context
	 * @return
	 */
	@ApiOperation(tags = { "CMC",
			"CSC" }, value = "交换机列表查询",  httpMethod = "GET")
	@Log(module = BoCloudService.IMS, target = "交换机管理", operation = "查询交换机列表")
	@GetMapping("/switches")
	public BocloudResult<GridBean<Switcher>> list(Pager pager, @Value(Common.REQ_CONTEXT) RequestContext context) {
		return h3cSwitcherService.list(pager, context);
	}

}
