package com.bocloud.ims.interfaces.resource;

import com.bocloud.cmp.entity.enums.SyncType;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.CloudVendor;

/**
 * 同步云平台service接口
 *
 * @author weiwei
 * @since 2017.02.27
 */
public interface SyncService {

    /**
     * 通过平台ID同步
     *
     * @param id
     * @param context
     * @param isAuto
     * @return
     */
    BocloudResult sync(Long id, RequestContext context, boolean isAuto);

    /**
     * 同步云平台告警
     *
     * @param vendor
     * @param userId
     */
    void syncAlarm(CloudVendor vendor, Long userId);

    /**
     * 同步vcenter网络
     *
     * @param vendor
     * @param userId
     * @return
     */
    BocloudResult syncVcenterNetwork(CloudVendor vendor, Long userId);

    BocloudResult syncSecurityGroups(Long vendorId, Long userId);

    BocloudResult sync(Long id, RequestContext context, SyncType syncType);

    default BocloudResult syncContentLibraries(Long vendorId, RequestContext context) {
        return null;
    }
}
