package com.bocloud.ims.interfaces.installation;

import com.bocloud.cmp.model.ServerCpu;
import com.bocloud.cmp.model.installation.DriveId;
import com.bocloud.cmp.model.installation.catalog.Controller;
import com.bocloud.cmp.model.installation.catalog.Hardware;
import com.bocloud.cmp.model.installation.catalog.NodeDetail;
import com.bocloud.ims.entity.resource.NetworkCard;

import java.util.List;

/**
 * 物理机catalog服务接口
 *
 * @author 007
 */
public interface CatalogService {

    /**
     * 获取catalog信息
     *
     * @param rackhdNodeId
     * @return
     */
    NodeDetail getCatalog(String rackhdNodeId);

    /**
     * 获取raid信息
     *
     * @param rackhdNodeId
     * @return
     */
    List<Controller> getRaid(String rackhdNodeId);

    /**
     * get install disk from RackHD catalog driveid
     *
     * @param rackhdNodeId
     * @return
     */
    DriveId driveId(String rackhdNodeId);

    /**
     * get dhcp ip address from RackHD lookups
     *
     * @param identifier identifier is macAddress
     * @param slient
     * @return
     */
    String dhcpIp(String identifier, boolean slient);

    /**
     * 获取物理机硬件pci信息
     *
     * @param rackhdNodeId
     * @return
     */
    Hardware hardWard(String rackhdNodeId);

    /**
     * get interfaces from RackHD catalog ohai
     *
     * @param rackhdNodeId
     * @return
     */
    List<NetworkCard> interfaces(String rackhdNodeId);

    /**
     * get bmc info from RackHD catalog bmc, bmc-1, bmc-2, ..., bmc-15
     *
     * @param rackhdNodeId
     * @return
     */
    List<String> bmc(String rackhdNodeId);

    /**
     * get ipmi user info from RackHD catalog ipmi-user-list-1, ipmi-user-list-2, ipmi-user-list-3, ..., ipmi-user-list-15
     *
     * @param rackhdNodeId
     * @return
     */
    List<String> ipmiUsers(String rackhdNodeId);

    /**
     * get cpu info from RackHD catalog ohai
     *
     * @param rackhdNodeId
     * @return
     */
    ServerCpu cpus(String rackhdNodeId);
}
