{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/34662","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/34662/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/34662/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/34662/events","html_url":"https://github.com/saltstack/salt/issues/34662","id":165542024,"number":34662,"title":"salt-cloud vmware list_hosts_by_datacenter doesn't take folders into account","user":{"login":"sebw","id":2285094,"avatar_url":"https://avatars.githubusercontent.com/u/2285094?v=3","gravatar_id":"","url":"https://api.github.com/users/sebw","html_url":"https://github.com/sebw","followers_url":"https://api.github.com/users/sebw/followers","following_url":"https://api.github.com/users/sebw/following{/other_user}","gists_url":"https://api.github.com/users/sebw/gists{/gist_id}","starred_url":"https://api.github.com/users/sebw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebw/subscriptions","organizations_url":"https://api.github.com/users/sebw/orgs","repos_url":"https://api.github.com/users/sebw/repos","events_url":"https://api.github.com/users/sebw/events{/privacy}","received_events_url":"https://api.github.com/users/sebw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Info%20Needed","name":"Info Needed","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":477,"closed_issues":939,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2016-07-15T20:53:28Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-07-14T11:42:55Z","updated_at":"2016-07-15T21:19:04Z","closed_at":null,"body":"In the following vCenter hierarchy function ```list_hosts_by_datacenter``` fails to return the hosts in the datacenter:\r\n\r\n- Datacenter    \r\n  - Folder  \r\n    - Cluster\r\n\r\n\r\n```\r\n    [root@salt-master02.intranet.example.org vcenter]# salt-cloud -f list_hosts_by_datacenter vmware --out=json \r\n    {\r\n        \"vmware\": {\r\n            \"vmware\": {\r\n                \"Hosts by Datacenter\": {\r\n                    \"NRB\": [], \r\n                    \"LEO2\": [\r\n                        \"sesx64.intranet.example.org\", \r\n                        \"sesx63.intranet.example.org\", \r\n                        \"sesx65.intranet.example.org\", \r\n                        \"sesx66.intranet.example.org\"\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    }\r\n```\r\n\r\nIf I move the cluster right under its datacenter, function works:\r\n\r\n- Datacenter  \r\n  - Cluster\r\n\r\n\r\n```\r\n    [root@salt-master02.intranet.example.org vcenter]# salt-cloud -f list_hosts_by_datacenter vmware --out=json \r\n    {\r\n        \"vmware\": {\r\n            \"vmware\": {\r\n                \"Hosts by Datacenter\": {\r\n                    \"NRB\": [\r\n                        \"sesx09.intranet.example.org\", \r\n                        \"sesx10.intranet.example.org\", \r\n                        \"sesx11.intranet.example.org\", \r\n                        \"sesx12.intranet.example.org\", \r\n                        \"sesx13.intranet.example.org\", \r\n                        \"sesx14.intranet.example.org\", \r\n                        \"sesx15.intranet.example.org\", \r\n                        \"sesx16.intranet.example.org\"\r\n                    ], \r\n                    \"LEO2\": [\r\n                        \"sesx64.intranet.example.org\", \r\n                        \"sesx63.intranet.example.org\", \r\n                        \"sesx65.intranet.example.org\", \r\n                        \"sesx66.intranet.example.org\"\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    }\r\n```\r\n\r\nFolders are visibly not taken into account."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/233072450","html_url":"https://github.com/saltstack/salt/issues/34662#issuecomment-233072450","issue_url":"https://api.github.com/repos/saltstack/salt/issues/34662","id":233072450,"user":{"login":"nmadhok","id":3374962,"avatar_url":"https://avatars.githubusercontent.com/u/3374962?v=3","gravatar_id":"","url":"https://api.github.com/users/nmadhok","html_url":"https://github.com/nmadhok","followers_url":"https://api.github.com/users/nmadhok/followers","following_url":"https://api.github.com/users/nmadhok/following{/other_user}","gists_url":"https://api.github.com/users/nmadhok/gists{/gist_id}","starred_url":"https://api.github.com/users/nmadhok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmadhok/subscriptions","organizations_url":"https://api.github.com/users/nmadhok/orgs","repos_url":"https://api.github.com/users/nmadhok/repos","events_url":"https://api.github.com/users/nmadhok/events{/privacy}","received_events_url":"https://api.github.com/users/nmadhok/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T21:19:04Z","updated_at":"2016-07-15T21:19:04Z","body":"@sebw Good catch. Thanks for filing the bug!\r\n@rallytime Will look into fixing this one soon! Thanks for pinging ;)"}}
{"actor":{"display_login":"nmadhok"}}