[GH-ISSUE #27] JSON Format: disk and network sections #8

Closed
opened 2026-02-28 00:40:09 +03:00 by kerem · 0 comments
Owner

Originally created by @ghost on GitHub (Jun 4, 2019).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/27

The example in the README seems to be in a strange format, certainly not JSON:

  "network": {
    0: {
      "model": "virtio",
      "bridge": "nat"
    },
    1: {
    ...
    },

Shouldn't it look more like an array, the indices could be made implicit, couldn't they?

  "networks":
  [
    { "name": "eth0",
      "bridge": "vmbr0",
      "ip": "dhcp",
      "ip6": "dhcp"
    },
    {
    ...
    },
  ],

Or if the indices of the "disk" and "network" sections cannot be made implicit, they should be strings and not integers?

Also, there is a missing bracket:

"disk": {
    0: {
      "type": "virtio",
      "storage": "local",
      "storage_type": "dir",
      "size": "30G",
      "backup": true
  },
}, <- bracket should be here, to close the "disk" section
      before the "network" section beings
"network": {
...
Originally created by @ghost on GitHub (Jun 4, 2019). Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/27 The example in the README seems to be in a strange format, certainly not JSON: ``` "network": { 0: { "model": "virtio", "bridge": "nat" }, 1: { ... }, ``` Shouldn't it look more like an array, the indices could be made implicit, couldn't they? ``` "networks": [ { "name": "eth0", "bridge": "vmbr0", "ip": "dhcp", "ip6": "dhcp" }, { ... }, ], ``` Or if the indices of the "disk" and "network" sections cannot be made implicit, they should be strings and not integers? Also, there is a missing bracket: ``` "disk": { 0: { "type": "virtio", "storage": "local", "storage_type": "dir", "size": "30G", "backup": true }, }, <- bracket should be here, to close the "disk" section before the "network" section beings "network": { ... ```
kerem closed this issue 2026-02-28 00:40:09 +03:00
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/proxmox-api-go#8
No description provided.