Compare commits

..

No commits in common. "90a9a4b3a85f3ea99ac51f3e687545a4ddb7f860" and "406424e1abc97220face748c942f63ab69337e12" have entirely different histories.

5 changed files with 2859 additions and 52 deletions

0
README.md Executable file → Normal file
View File

36
index.js Executable file → Normal file
View File

@ -1,22 +1,30 @@
/*const apiKey = { /*const apiKey = {
tokenID: 'ajones@pam!fixparsec', tokenID: 'ajones@pam!fixparsec',
secret: 'a25f93b4-6160-4513-9b5e-9dda06ebc787' secret: '887ec723-b31a-43ca-be50-82ace6697536'
} }
HTTP: POST /api2/json/nodes/{node}/qemu/{vmid}/status/reboot HTTP: POST /api2/json/nodes/{node}/qemu/{vmid}/status/reboot
curl -H "Authorization: ajones@pam!dev=229fe029-caa5-4a35-9c5d-d74a5d0f4233" https://stor.asura.vm42.us/api2/json/nodes/pve1/qemu/109/status/reboot*/ curl -H "Authorization: ajones@pam!fixparsec=887ec723-b31a-43ca-be50-82ace6697536" https://192.168.1.32:8006/api2/json/nodes/pve1/qemu/109/status/reboot*/
//const https = require('https') var request = require('request');
//const httpsAgent = new https.Agent({ rejectUnauthorized: false });
const axios = require('axios');
var headers = {
'Authorization': 'ajones@pam!fixparsec=887ec723-b31a-43ca-be50-82ace6697536'
};
axios.post('https://stor.asura.vm42.us/api2/json/nodes/stor/qemu/110/status/reboot',{}, { var options = {
headers:{ url: 'https://192.168.1.32:8006/api2/json/nodes/pve1/qemu/109/status/reboot',
"Authorization": 'PVEAPIToken=ajones@pam!dev=229fe029-caa5-4a35-9c5d-d74a5d0f4233' headers: headers
}}) };
.then(function (response) {
console.log(response); function callback(error, response, body) {
}) if (!error && response.statusCode == 200) {
.catch(function (error) { console.log(body);
}
console.log(body);
console.log(response)
console.log(error); console.log(error);
});
}
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
request(options, callback);

1169
log.txt Normal file

File diff suppressed because it is too large Load Diff

1693
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,19 @@
{ {
"name": "fixparsec", "name": "fixparsec",
"version": "1.0.0", "version": "1.0.0",
"description": "small app to reset vms used by parsec", "description": "small apt to resst parsec virtual machines",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "", "repository": {
"type": "git",
"url": "https://git.theta42.com/ajones/fixparsec.git"
},
"author": "amos jones",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"axios": "^1.5.1" "express": "^4.18.2",
"request": "^2.88.2"
} }
} }