def get_rdm_disk(hardware_devices, uuid):
 if (hardware_devices.__class__.__name__ == 'ArrayOfVirtualDevice'):
  hardware_devices = hardware_devices.VirtualDevice
 for device in hardware_devices:
  if ((device.__class__.__name__ == 'VirtualDisk') and (device.backing.__class__.__name__ == 'VirtualDiskRawDiskMappingVer1BackingInfo') and (device.backing.lunUuid == uuid)):
   return device

def get_rdm_disk ( hardware_devices , uuid ) : if ( hardware_devices . __class__ . __name__ == 'ArrayOfVirtualDevice' ) : hardware_devices = hardware_devices . VirtualDevice for device in hardware_devices : if ( ( device . __class__ . __name__ == 'VirtualDisk' ) and ( device . backing . __class__ . __name__ == 'VirtualDiskRawDiskMappingVer1BackingInfo' ) and ( device . backing . lunUuid == uuid ) ) : return device
gets the rdm disk key .