Commit 3d990ba1 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent fe4fa169
......@@ -79,7 +79,7 @@ cron.schedule('*/10 * * * * *', () => {
});
postRequest()
cronRemover.schedule(' */5 * * * *', () => {
cronRemover.schedule(' */15 * * * *', () => {
init()
});
......@@ -114,7 +114,7 @@ async function checkIps() {
await aruba.RemovedByIp(ips[i].Value)
break
case 1:
await addIPs(ips[i].Value)
// await addIPs(ips[i].Value)
break
}
......@@ -134,6 +134,7 @@ async function initToken() {
async function addNewIp(req, res) {
res.send('Done')
await aruba.createFloatingIp(dc)
checkIps()
}
function postFloatingIps(data) {
......
......@@ -3,7 +3,7 @@ let post = 'post'
let _ = require('lodash')
let auth = {Username: "AWI-236440", Password: "QVMUB653$H"}
let ip
let AvailDc = [1, 2, 3, 4, 5, 6, 7, 8]
let AvailDc = [1, 2, 3, 4, 6, 7, 8]
let foundDc
let masterIp
let networkId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment