|
|
|
@ -9,8 +9,8 @@ import { dbQuery, sub } from '../../accessModule'; |
|
|
|
|
|
|
|
|
|
export const createServer: RequestHandler = ({ body }, response) => { |
|
|
|
|
console.log('Creating server.'); |
|
|
|
|
console.dir(body, { depth: null }); |
|
|
|
|
|
|
|
|
|
if (body) { |
|
|
|
|
const { |
|
|
|
|
serverName, |
|
|
|
|
cpuCores, |
|
|
|
@ -22,9 +22,7 @@ export const createServer: RequestHandler = ({ body }, response) => { |
|
|
|
|
driverISOFileUUID, |
|
|
|
|
anvilUUID, |
|
|
|
|
optimizeForOS, |
|
|
|
|
} = body; |
|
|
|
|
|
|
|
|
|
console.dir(body, { depth: null }); |
|
|
|
|
} = body || {}; |
|
|
|
|
|
|
|
|
|
const dataServerName = String(serverName); |
|
|
|
|
const dataOS = String(optimizeForOS); |
|
|
|
@ -87,7 +85,7 @@ export const createServer: RequestHandler = ({ body }, response) => { |
|
|
|
|
`Failed to assert value when trying to provision a server; CAUSE: ${assertError}.`, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
response.status(500).send(); |
|
|
|
|
response.status(400).send(); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -151,7 +149,6 @@ driver_iso=${dataDriverISO}`; |
|
|
|
|
job_host_uuid: provisionServerJobHostUUID, |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
response.status(202).send(); |
|
|
|
|
}; |
|
|
|
|