[GH-ISSUE #149] Not displaying containers using example from docs #79

Closed
opened 2026-02-27 15:46:19 +03:00 by kerem · 4 comments
Owner

Originally created by @alessiodam on GitHub (Nov 7, 2023).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/149

Originally assigned to: @jhollowe on GitHub.

I have 5 nodes available with all containers in them but get 0 containers/node outputed.
From Basic Usage:

>>> # get the list of all the nodes available from the connected node
>>> print(proxmox.nodes.get())
[{'type': 'node', 'node': 'example-node', 'ssl_fingerprint': '63:80:22:...:0D:12', 'id': 'node/example-node', 'status': 'unknown'}]
>>> # use the list of nodes to iterate through each and print the containers and their status
>>> for pve_node in proxmox.nodes.get():
...     print("{0}:".format(pve_node['node']))
...     for container in proxmox.nodes(pve_node['node']).lxc.get():
...         print("\t{0}. {1} => {2}".format(container['vmid'], container['name'], container['status']))
... 
example-node:
        100. container-a => running
        101. container-b => running
        105. container-c => running
Originally created by @alessiodam on GitHub (Nov 7, 2023). Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/149 Originally assigned to: @jhollowe on GitHub. I have 5 nodes available with all containers in them but get 0 containers/node outputed. From [Basic Usage](https://proxmoxer.github.io/docs/2.0/basic_usage/): ```py >>> # get the list of all the nodes available from the connected node >>> print(proxmox.nodes.get()) [{'type': 'node', 'node': 'example-node', 'ssl_fingerprint': '63:80:22:...:0D:12', 'id': 'node/example-node', 'status': 'unknown'}] >>> # use the list of nodes to iterate through each and print the containers and their status >>> for pve_node in proxmox.nodes.get(): ... print("{0}:".format(pve_node['node'])) ... for container in proxmox.nodes(pve_node['node']).lxc.get(): ... print("\t{0}. {1} => {2}".format(container['vmid'], container['name'], container['status'])) ... example-node: 100. container-a => running 101. container-b => running 105. container-c => running ```
kerem 2026-02-27 15:46:19 +03:00
Author
Owner

@jhollowe commented on GitHub (Nov 7, 2023):

Can you provide the code you ran?

<!-- gh-comment-id:1800217540 --> @jhollowe commented on GitHub (Nov 7, 2023): Can you provide the code you ran?
Author
Owner

@alessiodam commented on GitHub (Nov 8, 2023):

I literally just gave it xD
Authentication works I got a list of nodes

<!-- gh-comment-id:1802547612 --> @alessiodam commented on GitHub (Nov 8, 2023): I literally just gave it xD Authentication works I got a list of nodes
Author
Owner

@jhollowe commented on GitHub (Nov 10, 2023):

okay, so what does print(proxmox.nodes.get()) show you? Do you have all the needed permissions on the user/token you are authenticating with (I think the Auditor role should give you what you need to do a basic listing out of resources)?

<!-- gh-comment-id:1806544264 --> @jhollowe commented on GitHub (Nov 10, 2023): okay, so what does `print(proxmox.nodes.get())` show you? Do you have all the needed permissions on the user/token you are authenticating with (I think the `Auditor` role should give you what you need to do a basic listing out of resources)?
Author
Owner

@alessiodam commented on GitHub (Nov 14, 2023):

Edit: I've been writing my own implementation of a proxmox API and it seems fine to me for now, I won't need your library even if it looks good at first glance ;)
I'm making my own so it works exactly how I want it to.

<!-- gh-comment-id:1810970660 --> @alessiodam commented on GitHub (Nov 14, 2023): Edit: I've been writing my own implementation of a proxmox API and it seems fine to me for now, I won't need your library even if it looks good at first glance ;) I'm making my own so it works exactly how I want it to.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmoxer#79
No description provided.