def vm_reconfigured_update(vmware_vm_1):
    event = Mock(spec=vim.event.VmReconfiguredEvent())
    event.vm.vm = vmware_vm_1
    port = Mock(spec=vim.dvs.PortConnection())
    port.portgroupKey = 'dvportgroup-2'
    device = Mock(spec=vim.vm.device.VirtualVmxnet3())
    device.backing.port = port
    device.macAddress = 'mac-address'
    device_spec = Mock(spec=vim.vm.device.VirtualDeviceSpec(), device=device)
    event.configSpec.deviceChange = [device_spec]
    return wrap_into_update_set(event=event)
def vmware_tools_running_update(vmware_vm_1):
    change = Mock(spec=vmodl.query.PropertyCollector.Change())
    change.name = 'guest.toolsRunningStatus'
    change.val = 'guestToolsRunning'
    return wrap_into_update_set(change=change, obj=vmware_vm_1)
def vm_power_on_state_update(vmware_vm_1):
    change = Mock(spec=vmodl.query.PropertyCollector.Change())
    change.name = 'runtime.powerState'
    change.val = 'poweredOn'
    return wrap_into_update_set(change=change, obj=vmware_vm_1)
def nic_info_update(nic_info):
    change = Mock(spec=vmodl.query.PropertyCollector.Change())
    change.name = 'guest.net'
    change.val = [nic_info]
    return wrap_into_update_set(change=change)
def vm_renamed_update():
    event = Mock(spec=vim.event.VmRenamedEvent())
    event.oldName = 'VM1'
    event.newName = 'VM1-renamed'
    return wrap_into_update_set(event=event)
def vm_removed_update():
    event = Mock(spec=vim.event.VmRemovedEvent())
    event.vm.name = 'VM1'
    return wrap_into_update_set(event=event)
def vm_registered_update(vmware_vm_1):
    event = Mock(spec=vim.event.VmRegisteredEvent())
    event.vm.vm = vmware_vm_1
    return wrap_into_update_set(event=event)