use of com.orion.ops.consts.machine.MachineAuthType in project orion-ops by lijiahangmax.
the class MachineInfoController method add.
/**
* 添加
*/
@RequestMapping("/add")
@EventLog(EventType.ADD_MACHINE)
public Long add(@RequestBody MachineInfoRequest request) {
this.check(request);
MachineAuthType machineAuthTypeEnum = Valid.notNull(MachineAuthType.of(request.getAuthType()));
if (MachineAuthType.PASSWORD.equals(machineAuthTypeEnum)) {
Valid.notBlank(request.getPassword());
}
return machineInfoService.addMachine(request);
}
Aggregations