correlate netapp naa.zxcv number to datastore name

20 views
Skip to first unread message

Alex Stuck

unread,
Mar 23, 2017, 6:46:26 PM3/23/17
to pysphere
Gurus

I'm trying to map a vmfs datastore name to the Netappserial number in hex that vsphere uses to id this lun (like naa.60b5700023468647492b435673547a4e)
I found 2 objects that expose either the name or the serial.

The naa number is exposed as canonicalName here

for ds_mor, name in handle.get_hosts().items():
  props = VIProperty(handle, ds_mor)
  for i in props.config.storageDevice.scsiLun:
    if 'NETAPP' in i.displayName:
      print i.canonicalName


and the datastore name is exposed as name here

for i in props.datastore:
    print i.info.name
 

But I need a way to map the 2 and I cannot find a way to do that. Is this possible ?

thx
Reply all
Reply to author
Forward
0 new messages