package com.bocloud.ims.booter.controller.resource.compute;

import com.bocloud.common.model.BocloudResult;
import com.bocloud.ims.interfaces.resource.CloudServerAllocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 一些非常用的后台接口
 *
 * @author sxp
 * @since 2022/11/23
 */
@RestController
@RequestMapping("/v1/other")
public class OtherController {

    @Autowired
    private CloudServerAllocationService cloudServerAllocationService;

    /**
     * 私有云虚拟机自动分配到用户
     *
     * @author sxp
     * @since 2022/11/23
     */
    @GetMapping("/auto/assign")
    public BocloudResult condition() {
        return cloudServerAllocationService.assign();
    }
}
