package com.bocloud.ims.interfaces.resource;

import com.bocloud.cmp.model.LbTargetGroupOperationParam;
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.ims.entity.resource.LbTargetGroup;

import java.util.HashSet;
import java.util.Map;

/**
 * 负载均衡器目标群组service接口
 */
public interface LbTargetGroupService {

	/**
	 * 查询目标群组列表
	 *
	 * @return
	 */
	public BocloudResult<GridBean<LbTargetGroup>> list(Pager pager, RequestContext context);

	public BocloudResult<LbTargetGroup> create(LbTargetGroup lbTargetGroup, RequestContext context);

	public BocloudResult remove(Long id, RequestContext context);

	/**
	 * 查询目标群组信息
	 *
	 * @param id
	 * @return
	 */
	public BocloudResult<LbTargetGroup> detail(Long id);

	public BocloudResult operations(Long id, LbTargetGroupOperationParam lbTargetGroupOperationParam, RequestContext context);

	public BocloudResult registerTargets(Long id, Map<String, Integer> targetIdPorts, HashSet<Integer> ids,
			String action, RequestContext context);

}
