mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #36] PROXMOX API::command agent implementation #15
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anujitbhu on GitHub (Oct 1, 2020).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/36
Hi,
I am new to proxmoxer and now wisht to implement the agent command to get the Network interfaces IP .
On the server , it works fine through the browser .
https://172.16.15.31:8006/api2/json/nodes/pve31/qemu/116/agent/network-get-interfaces
But if i am applying it thorugh object then the code is giving an error .
Please suggest .
Rg
Anuj
@jhollowe commented on GitHub (Oct 1, 2020):
Can you show what code you are trying to use?
@anujitbhu commented on GitHub (Oct 1, 2020):
@maxlxl commented on GitHub (Oct 1, 2020):
@anujitbhu Hi, you posted login credentials. Please change them ASAP. Kind regards
@jhollowe commented on GitHub (Oct 1, 2020):
@anujitbhu Can you also show what error you are getting? Is it "No QEMU guest agent configured"?
@anujitbhu commented on GitHub (Oct 1, 2020):
HI,
@morph027 commented on GitHub (Oct 1, 2020):
Can you please use code tags for your output and code? ;)
Is the output all you get from your code? For example, i get traceback like this:
@morph027 commented on GitHub (Oct 1, 2020):
Example:
@jhollowe commented on GitHub (Oct 1, 2020):
It looks like this could be a python 2 issue, or it might just be the lack of a qemu guest agent.
@anujitbhu commented on GitHub (Oct 2, 2020):
Hi John,
please find our code below
this gives no error -->with the output
But when I inset the parameter in the same command
ista=proxmox.nodes(node['node']).qemu(vm['vmid']).agent.get('network-get-interfaces')It gives the error
Where as when i put the same url on browser it gives me a result
https://172.16.15.10:8006/api2/json/nodes/pve1/qemu/221/agent/network-get-interfaces{"data":{"result":[{"ip-addresses":[{"ip-address-type":"ipv4","ip-address":"127.0.0.1","prefix":8},{"ip-address-type":"ipv6","prefix":128,"ip-address":"::1"}],"name":"lo","hardware-address":"00:00:00:00:00:00"},{"name":"ens18","hardware-address":"c2:96:5d:76:75:94"},{"hardware-address":"02:42:3e:47:5a:ec","name":"br-c56cfb43fced","ip-addresses":[{"ip-address-type":"ipv4","ip-address":"172.20.0.1","prefix":16}]},{"name":"docker0","hardware-address":"02:42:8d:43:f0:c1","ip-addresses":[{"ip-address-type":"ipv4","ip-address":"172.17.0.1","prefix":16}]},{"ip-addresses":[{"ip-address-type":"ipv4","ip-address":"172.18.0.1","prefix":16}],"name":"br-f944b1ebaa9b","hardware-address":"02:42:ca:48:66:b4"}]}}Please suggest .
@morph027 commented on GitHub (Oct 2, 2020):
Which version of proxmoxer are you using?
Can you try using python3 instead of EOL'd python2?
@anujitbhu commented on GitHub (Oct 2, 2020):
proxmoxer 1.1.1
@anujitbhu commented on GitHub (Oct 2, 2020):
we are using the proxmox default debian image which comes with the default python 2.7.16 version . Thereby we prefer to use the dafault package only
@anujitbhu commented on GitHub (Oct 3, 2020):
We have resolved the issue by using Try Catch as this API throws exception if the data is NULL .