Skip to content

Commit

Permalink
Merge pull request #32 from agrare/bz_1538996_add_vm_uuid_to_event_pa…
Browse files Browse the repository at this point in the history
…yload

Add VM UUID to event payload
  • Loading branch information
roliveri authored Jan 31, 2018
2 parents 81f2a40 + e4d3d56 commit edc9edc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/VMwareWebService/MiqVimEventMonitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ def fixupEvent(event)
next unless (eventVmObj = event[vmStr])
addVirtualMachine(eventVmObj['vm']) if ADD_VM_EVENTS.include?(event['eventType'])
next unless (vmObj = virtualMachinesByMor_locked[eventVmObj['vm']])

eventVmObj['path'] = vmObj['summary']['config']['vmPathName']
eventVmObj['uuid'] = vmObj['summary']['config']['uuid']

removeVirtualMachine(eventVmObj['vm']) if event['eventType'] == 'VmRemovedEvent'
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/VMwareWebService/VimPropMaps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ module VimPropMaps
:baseName => "@virtualMachines",
:keyPath => ['summary', 'config', 'vmPathName'],
:props => [
"summary.config.uuid",
"summary.config.vmPathName",
"summary.runtime.host"
]
Expand Down

0 comments on commit edc9edc

Please sign in to comment.