Compare commits

..

2 Commits

Author SHA1 Message Date
90a9a4b3a8 #1 complete 2023-10-09 09:26:51 -06:00
4c1380f9e7 #1 complete 2023-10-09 09:26:22 -06:00
5 changed files with 51 additions and 2858 deletions

0
README.md Normal file → Executable file
View File

36
index.js Normal file → Executable file
View File

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

File diff suppressed because it is too large Load Diff

1689
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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