[GH-ISSUE #100] Dot-Notation issue on /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr} #50

Closed
opened 2026-02-27 15:46:11 +03:00 by kerem · 1 comment
Owner

Originally created by @d4fseeker on GitHub (May 14, 2022).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/100

Originally assigned to: @jhollowe on GitHub.

When trying to access the API-Path /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr} in Dot-Notation it seems impossible to execute it as it doesn't have a "verb" before the CIDR-Address in this case.

I would expect the following to work:
proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name,cidr_address).delete()

However Dot-Notation building can be worked-around when using getattr to dynamically create the CIDR part of the API address:
getattr(proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name,cidr_address).delete()

Originally created by @d4fseeker on GitHub (May 14, 2022). Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/100 Originally assigned to: @jhollowe on GitHub. When trying to access the API-Path /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr} in Dot-Notation it seems impossible to execute it as it doesn't have a "verb" before the CIDR-Address in this case. I would expect the following to work: `proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name,cidr_address).delete()` However Dot-Notation building can be worked-around when using getattr to dynamically create the CIDR part of the API address: `getattr(proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name,cidr_address).delete()`
kerem 2026-02-27 15:46:11 +03:00
Author
Owner

@jhollowe commented on GitHub (May 14, 2022):

you can only have one argument (can be an array) inside each parenthesis. Below are ways to do what you are wanting.

  • proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name)(cidr_address).delete()
  • proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset([ipset_name,cidr_address]).delete()
  • proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name).delete(cidr_address)
<!-- gh-comment-id:1126817176 --> @jhollowe commented on GitHub (May 14, 2022): you can only have one argument (can be an array) inside each parenthesis. Below are ways to do what you are wanting. * `proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name)(cidr_address).delete()` * `proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset([ipset_name,cidr_address]).delete()` * `proxmoxer.nodes(node_name).qemu(vm_id).firewall.ipset(ipset_name).delete(cidr_address)`
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#50
No description provided.