{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/pyvmomi/issues/268","labels_url":"https://api.github.com/repos/vmware/pyvmomi/issues/268/labels{/name}","comments_url":"https://api.github.com/repos/vmware/pyvmomi/issues/268/comments","events_url":"https://api.github.com/repos/vmware/pyvmomi/issues/268/events","html_url":"https://github.com/vmware/pyvmomi/issues/268","id":92695336,"number":268,"title":"QueryEvents in EventsManager unsupported ? ","user":{"login":"srimandaleeka","id":12203533,"avatar_url":"https://avatars.githubusercontent.com/u/12203533?v=3","gravatar_id":"","url":"https://api.github.com/users/srimandaleeka","html_url":"https://github.com/srimandaleeka","followers_url":"https://api.github.com/users/srimandaleeka/followers","following_url":"https://api.github.com/users/srimandaleeka/following{/other_user}","gists_url":"https://api.github.com/users/srimandaleeka/gists{/gist_id}","starred_url":"https://api.github.com/users/srimandaleeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srimandaleeka/subscriptions","organizations_url":"https://api.github.com/users/srimandaleeka/orgs","repos_url":"https://api.github.com/users/srimandaleeka/repos","events_url":"https://api.github.com/users/srimandaleeka/events{/privacy}","received_events_url":"https://api.github.com/users/srimandaleeka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-02T17:51:12Z","updated_at":"2015-11-06T16:37:45Z","closed_at":null,"body":"Hello Team members !\r\n\r\nI want to detect Events  for a particular VM and host , so my python code does the following :  \r\nOnce I have the VM MOREF , I do the following: \r\n#Step1 : Create a EventFilterSpecByEntity \r\n            efespec = vim.event.EventFilterSpec.ByEntity() \r\n            efespec.entity = vm \r\n            efespec.recursion = vim.event.EventFilterSpec.RecursionOption.all \r\n#Step2 :Event Spec Filter \r\n            efspec = vim.event.EventFilterSpec() \r\n            efspec.entity = efespec \r\n#Step3: QueryEvents \r\n           events = si.content.eventManager.QueryEvents(efspec) \r\n\r\nAny ideas if QueryEvents in EventsManager is implemented and supported to start off with ? \r\n\r\nI get the following errors : \r\n print si.content.eventManager.QueryEvents(efspec) \r\nTraceback (most recent call last): \r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/pyVmomi/VmomiSupport.py\", line 542, in <lambda>\r\n  File \"/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/pyVmomi/VmomiSupport.py\", line 351, in _InvokeMethod \r\n  File \"/build/mts/release/bora-1331820/bora/build/esx/release/vmvisor/sys/lib/python2.6/site-packages/pyVmomi/SoapAdapter.py\", line 1231, in InvokeMethod \r\npyVmomi.VmomiSupport.NotImplemented: (vmodl.fault.NotImplemented) { \r\n   dynamicType = <unset>, \r\n   dynamicProperty = (vmodl.DynamicProperty) [], \r\n   msg = 'The requested operation is not implemented by the server.', \r\n   faultCause = <unset>, \r\n   faultMessage = (vmodl.LocalizableMessage) [] \r\n} \r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/vmware/pyvmomi/issues/comments/154463100","html_url":"https://github.com/vmware/pyvmomi/issues/268#issuecomment-154463100","issue_url":"https://api.github.com/repos/vmware/pyvmomi/issues/268","id":154463100,"user":{"login":"rreubenur","id":6652363,"avatar_url":"https://avatars.githubusercontent.com/u/6652363?v=3","gravatar_id":"","url":"https://api.github.com/users/rreubenur","html_url":"https://github.com/rreubenur","followers_url":"https://api.github.com/users/rreubenur/followers","following_url":"https://api.github.com/users/rreubenur/following{/other_user}","gists_url":"https://api.github.com/users/rreubenur/gists{/gist_id}","starred_url":"https://api.github.com/users/rreubenur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rreubenur/subscriptions","organizations_url":"https://api.github.com/users/rreubenur/orgs","repos_url":"https://api.github.com/users/rreubenur/repos","events_url":"https://api.github.com/users/rreubenur/events{/privacy}","received_events_url":"https://api.github.com/users/rreubenur/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T16:37:45Z","updated_at":"2015-11-06T16:37:45Z","body":"This works for me:\r\n```\r\n    event_filter = vim.event.EventFilterSpec()\r\n    filter_spec_entity = vim.event.EventFilterSpec.ByEntity()\r\n    filter_spec_entity.entity = vm\r\n    filter_spec_entity.recursion = vim.event.EventFilterSpec.RecursionOption.self\r\n    event_filter.entity = filter_spec_entity\r\n    print content.eventManager.QueryEvents(filter=event_filter)\r\n```"}}