package com.bocloud.ims.interfaces.resource;

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.Port;

import java.util.List;

public interface PortService {

    /**
     * 列表展示
     *
     * @param page
     * @param rows
     * @param params
     * @param sorter
     * @param simple
     * @return
     */
    public BocloudResult<GridBean<Port>> list(Pager pager);

    /**
     * 创建
     *
     * @param params
     * @param user
     * @return
     */
    public BocloudResult create(Port port, RequestContext context);

    /**
     * 修改
     *
     * @param params
     * @param user
     * @return
     */
    public BocloudResult modify(String params, RequestContext context);

    /**
     * 删除
     *
     * @param id
     * @param user
     * @return
     */
    public BocloudResult remove(Long id, RequestContext context);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    public BocloudResult<Port> detail(Long id);

    /**
     * 查询与虚拟机绑定的连接外网的端口
     *
     * @param params
     * @return
     */
    public BocloudResult<List<Port>> listExtranetByVmId(String params);

    /**
     * 查询与虚拟机绑定的连接外网的端口
     *
     * @param params
     * @return
     */
    public BocloudResult<List<Port>> listByNetworkId(String params);

    /**
     * 批量删除
     *
     * @param params
     * @param user
     * @return
     */
    public BocloudResult batchRemove(List<Long> ids, RequestContext context);

    /**
     * 查询与虚拟机绑定的端口
     * @param params
     * @return
     */
    public BocloudResult<List<Port>> listByVmId(String params);
}
