{"action":"opened","issue":{"url":"https://api.github.com/repos/swayf/proxmoxer/issues/7","labels_url":"https://api.github.com/repos/swayf/proxmoxer/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/swayf/proxmoxer/issues/7/comments","events_url":"https://api.github.com/repos/swayf/proxmoxer/issues/7/events","html_url":"https://github.com/swayf/proxmoxer/issues/7","id":59767061,"number":7,"title":"proxmox.nodes(node['node']).openvz.get() gets 0 VMs on Proxmox 3.3-5","user":{"login":"wdoekes","id":1225014,"avatar_url":"https://avatars.githubusercontent.com/u/1225014?v=3","gravatar_id":"","url":"https://api.github.com/users/wdoekes","html_url":"https://github.com/wdoekes","followers_url":"https://api.github.com/users/wdoekes/followers","following_url":"https://api.github.com/users/wdoekes/following{/other_user}","gists_url":"https://api.github.com/users/wdoekes/gists{/gist_id}","starred_url":"https://api.github.com/users/wdoekes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdoekes/subscriptions","organizations_url":"https://api.github.com/users/wdoekes/orgs","repos_url":"https://api.github.com/users/wdoekes/repos","events_url":"https://api.github.com/users/wdoekes/events{/privacy}","received_events_url":"https://api.github.com/users/wdoekes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-04T08:49:02Z","updated_at":"2015-03-04T08:49:02Z","closed_at":null,"body":"Hi there,\r\n\r\nwhen writing proxtop [1] I noticed that your example -- from the README.rst -- to get all VMs did not work:\r\n\r\n    print(\"your example\")\r\n    for node in proxmox.nodes.get():\r\n        for vm in proxmox.nodes(node['node']).openvz.get():\r\n            print(\"{0}. {1} => {2}\" .format(vm['vmid'], vm['name'], vm['status']))\r\n        print(\"--\")\r\n\r\nYields:\r\n\r\n    your example\r\n    --\r\n    --\r\n    --\r\n\r\nInstead, I used this:\r\n\r\n    print(\"my example\")\r\n    for vm in proxmox.cluster.resources.get(type='vm'):\r\n        print(\"{0}. {1} => {2}\" .format(vm['vmid'], vm['name'], vm['status']))\r\n\r\nWhich yields:\r\n\r\n    127. private-herman => running\r\n    276. acme-bugs-bunny => stopped\r\n    443. acme-elmer-fudd => running\r\n\r\nThanks for the API B.T.W.! When comparing it, I favored it over the pyproxmox competition [2].\r\n\r\n[1] https://github.com/ossobv/proxtop\r\n[2] http://wjd.nu/notes/2015#proxmox-api-python-module"}}