package com.bocloud.ims.interfaces.resource.kubernetes;

import java.util.List;
import java.util.Map;

import com.bocloud.cmp.model.kubernetes.KubeDeploymentParam;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.Pager;
import com.bocloud.common.model.Param;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.kubernetes.KubeDeployment;

/**
 * 
 * @ClassName: KubeDeploymentService.java
 * @Description: KubeDeployment
 *
 * @author: ymh
 * @date: 2021年4月21日 下午2:10:01
 */
public interface KubeDeploymentService {

	/**
	 * 列表
	 * 
	 * @param page   当前页
	 * @param rows   页码
	 * @param params 查询参数
	 * @param sorter 拍寻参数
	 * @param user
	 * @return 满足条件的列表
	 */
	public BocloudResult list(Pager pager, RequestContext context);

	/**
	 * 添加
	 * 
	 * @param deployment
	 * @param userId
	 * @return
	 */
	public BocloudResult create(KubeDeployment deployment, RequestContext context);

	/**
	 * 更新
	 * 
	 * @param deployment
	 * @param userId
	 * @return 操作结果
	 */
	public BocloudResult modify(KubeDeployment deployment, RequestContext context);

	/**
	 * 移除
	 * 
	 * @param id     ID
	 * @param userId 操作者ID
	 * @return 操作结果
	 */
	public BocloudResult remove(Long id, RequestContext context);

	/**
	 * 详细信息
	 * 
	 * @param id ID
	 * @return 详细信息
	 */
	public BocloudResult detail(Long id);

	/**
	 * 部署申请
	 * 
	 * @param jsonString
	 * @param requestUser
	 * @return
	 */
	public BocloudResult apply(String jsonString, RequestContext context);

	/**
	 * deployment增加pod
	 * 
	 * @param params
	 * @param user
	 * @return
	 */
	public BocloudResult extendReplicas(KubeDeploymentParam kubeDeploymentParam, RequestContext context);

}
