|
|
@@ -3,27 +3,36 @@ package cn.reghao.autodop.dmaster.vm.controller;
|
|
|
import cn.reghao.autodop.common.result.WebResult;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* @author reghao
|
|
|
* @date 2020-10-31 16:04:58
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Api(tags = "宿主机管理接口")
|
|
|
@RestController
|
|
|
@RequestMapping("/api/vm/host")
|
|
|
public class HostController {
|
|
|
@PostMapping
|
|
|
- public String addPhysicalHost() {
|
|
|
+ public String addPhysicalHost(@RequestParam("name") String name) {
|
|
|
+ //public String addPhysicalHost(@RequestParam("name") String name, @RequestBody String json) {
|
|
|
+ log.info("post request...");
|
|
|
+ return WebResult.success("ok");
|
|
|
+ }
|
|
|
+
|
|
|
+ @DeleteMapping
|
|
|
+ public String deletePhysicalHost() {
|
|
|
+ //public String addPhysicalHost(@RequestParam("name") String name, @RequestBody String json) {
|
|
|
+ log.info("delete request...");
|
|
|
return WebResult.success("ok");
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "")
|
|
|
@GetMapping("/list")
|
|
|
- public String nodeList() {
|
|
|
+ public String nodeList(@RequestParam("name") String name) {
|
|
|
+ log.info("name -> {}", name);
|
|
|
return WebResult.success("ok");
|
|
|
}
|
|
|
}
|