def _get_host_disks(host_reference):
 storage_system = host_reference.configManager.storageSystem
 disks = storage_system.storageDeviceInfo.scsiLun
 ssds = []
 non_ssds = []
 for disk in disks:
  try:
   has_ssd_attr = disk.ssd
  except AttributeError:
   has_ssd_attr = False
  if has_ssd_attr:
   ssds.append(disk)
  else:
   non_ssds.append(disk)
 return {'SSDs': ssds, 'Non-SSDs': non_ssds}

def _get_host_disks ( host_reference ) : storage_system = host_reference . configManager . storageSystem disks = storage_system . storageDeviceInfo . scsiLun ssds = [ ] non_ssds = [ ] for disk in disks : try : has_ssd_attr = disk . ssd except AttributeError : has_ssd_attr = False if has_ssd_attr : ssds . append ( disk ) else : non_ssds . append ( disk ) return { 'SSDs' : ssds , 'Non-SSDs' : non_ssds }
helper function that returns a dictionary containing a list of ssd and non-ssd disks .