summaryrefslogtreecommitdiffstats
path: root/server/lib/external-backends/backendhelper.js
diff options
context:
space:
mode:
authorJannik Schönartz2019-07-22 16:32:43 +0200
committerJannik Schönartz2019-07-22 16:32:43 +0200
commite3b59f1edf821c1970657197f38b99cec63d7493 (patch)
tree482a513346c7a7e3c499ea478c444d4f4e6dac54 /server/lib/external-backends/backendhelper.js
parent[documentation] Added ipxe builder module. (diff)
downloadbas-e3b59f1edf821c1970657197f38b99cec63d7493.tar.gz
bas-e3b59f1edf821c1970657197f38b99cec63d7493.tar.xz
bas-e3b59f1edf821c1970657197f38b99cec63d7493.zip
[external-backends/idoit] Add more information in idoit
Add contact assignment (Search by name in the idoit persons and link them) Add OS + version information Add network device speed/type/name Add dhcp active check for adding a client Small bugfixes Add console logs for the idoit add server requests
Diffstat (limited to 'server/lib/external-backends/backendhelper.js')
-rw-r--r--server/lib/external-backends/backendhelper.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/external-backends/backendhelper.js b/server/lib/external-backends/backendhelper.js
index 87b2696..7e682d1 100644
--- a/server/lib/external-backends/backendhelper.js
+++ b/server/lib/external-backends/backendhelper.js
@@ -158,10 +158,14 @@ async function getDhcp () {
const isDHCP = await instance.isDhcp(backend.credentials)
if (isDHCP) {
+ // Check weather the backend is active
+ const checkConnection = await instance.checkConnection(backend.credentials)
+ if (checkConnection.error) continue
+
if (!dhcp) dhcp = { instance: instance, backend: backend }
else {
// Conflict occured!
- const conflict = await db.conflict.create({ description: 'Multiple dhcp backends found' })
+ const conflict = await db.conflict.create({ description: 'Multiple active dhcp backends found' })
// Add both backends to the conflict.
conflict.createObject({ objectType: 'BACKEND', objectId: backend.id })