Saleh7/ProxmoxVE_PHP_API

In conformance with the new version

emresaracoglu opened this issue · 1 comments

Hello,

Unable to retrieve data about the status of the machine, unfortunately no longer. The reason for this is that Proxmox version change.

For example:

(new Proxmox\Nodes())->lxcCurrent('prox', '101')->data->status;

I getting this error:

Fatal error: Uncaught Error: Call to a member function get() on null in /home/username/public_html/vendor/saleh7/proxmox-ve_php_api/src/Request.php:79 Stack trace: #0 /home/username/public_html/vendor/saleh7/proxmox-ve_php_api/src/Nodes.php(832): Proxmox\Request::Request('/nodes/prox/lxc...') #1 /home/username/public_html/test5.php(4): Proxmox\Nodes->lxcCurrent('prox', '101') #2 {main} thrown in /home/username/public_html/vendor/saleh7/proxmox-ve_php_api/src/Request.php on line 79

Getting status with command (new version, current):

root@prox:~# pvesh get /nodes/prox/lxc/101/status/current
┌─────────┬─────────────────────┐
│ key     │ value               │
├─────────┼─────────────────────┤
│ cpus    │ 1                   │
├─────────┼─────────────────────┤
│ ha      │ {"managed":0}       │
├─────────┼─────────────────────┤
│ maxdisk │ 24.48 GiB           │
├─────────┼─────────────────────┤
│ maxmem  │ 1.00 GiB            │
├─────────┼─────────────────────┤
│ maxswap │ 512.00 MiB          │
├─────────┼─────────────────────┤
│ name    │ test-9.example.com │
├─────────┼─────────────────────┤
│ status  │ running             │
├─────────┼─────────────────────┤
│ uptime  │ 14m 24s             │
├─────────┼─────────────────────┤
│ vmid    │ 101                 │
└─────────┴─────────────────────┘
root@prox:~# 

Because of these changes, you are not able to use the commands in your project.

I wonder when you publish updates?