Skip to content

Commit

Permalink
Merge pull request #7925 from dannyzaken/danny-fixes
Browse files Browse the repository at this point in the history
Removed the dependency on request npm module
  • Loading branch information
dannyzaken committed Apr 1, 2024
2 parents d8c6ff4 + 568eb29 commit 6b9d4c0
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 1,398 deletions.
318 changes: 3 additions & 315 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
"ping": "0.4.4",
"prom-client": "15.0.0",
"ps-node": "0.1.6",
"request": "2.88.2",
"rimraf": "5.0.5",
"seedrandom": "3.0.5",
"setimmediate": "1.0.5",
Expand Down
17 changes: 1 addition & 16 deletions src/agent/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,21 +369,8 @@ class Agent {
});
}

// refresh the public_ip in background if enough time passed from last time
_refresh_public_ip() {
const now = Date.now();
const GET_PUBLIC_IP_PERIOD = 10 * 60 * 1000; // 10 minutes between retrieve_public_ip
if (this.last_retrieve_public_ip && now < this.last_retrieve_public_ip + GET_PUBLIC_IP_PERIOD) return;
this.last_retrieve_public_ip = now;
net_utils.retrieve_public_ip()
.then(public_ip => {
this.public_ip = public_ip;
})
.catch(err => this.dbg.error('got error in _refresh_public_ip', err));
}

_init_node() {
this._refresh_public_ip();

return P.resolve()
.then(() => {
if (this.storage_path) {
Expand Down Expand Up @@ -822,9 +809,7 @@ class Agent {
cpu_usage: cpu_percent,
location_info: this.location_info,
io_stats: this.block_store && this.block_store.get_and_reset_io_stats(),
public_ip: this.public_ip
};
this._refresh_public_ip();
if (this.cloud_info && this.cloud_info.pool_name) {
reply.pool_name = this.cloud_info.pool_name;
}
Expand Down
202 changes: 0 additions & 202 deletions src/agent/agent_wrap.js

This file was deleted.

44 changes: 0 additions & 44 deletions src/api/cluster_server_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,50 +121,6 @@ module.exports = {
}
},

read_server_config: {
method: 'GET',
params: {
type: 'object',
properties: {
test_ph_connectivity: {
type: 'boolean'
},
}
},
reply: {
type: 'object',
required: ['using_dhcp'],
properties: {
timezone: {
type: 'string'
},
dns_servers: {
type: 'array',
items: {
type: 'string'
},
},
using_dhcp: {
type: 'boolean'
},
owner: {
type: 'object',
required: ['email', 'activation_code'],
properties: {
email: { $ref: 'common_api#/definitions/email' },
activation_code: {
type: 'string'
}
}
}
}
},
auth: {
account: false,
system: false,
anonymous: true,
}
},

update_server_conf: {
method: 'POST',
Expand Down
36 changes: 0 additions & 36 deletions src/api/system_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,42 +311,6 @@ module.exports = {
}
},

attempt_server_resolve: {
doc: 'Attempt to resolve a server name + ping',
method: 'POST',
params: {
type: 'object',
required: ['server_name'],
properties: {
server_name: {
type: 'string'
},
ping: {
type: 'boolean'
},
version_check: {
type: 'boolean'
}
},
},
reply: {
type: 'object',
required: ['valid'],
properties: {
valid: {
type: 'boolean'
},
reason: {
type: 'string'
}
}
},
auth: {
account: false,
system: false,
}
},

log_client_console: {
method: 'POST',
params: {
Expand Down
58 changes: 0 additions & 58 deletions src/deploy/NVA_build/prepare_aws_platform.js

This file was deleted.

Loading

0 comments on commit 6b9d4c0

Please sign in to comment.