0

I am trying to print out Transport Details (From the vCenter - Host > Storage Devices > Device Details > Transport > SAS (for example) using pyvmomi.

This is the API I have been using as a reference: https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.host.MultipathInfo.Path.html

HostMultiPathInfoLuns = host.config.storageDevice.multipathInfo.lun
        for lun in HostMultiPathInfoLuns:
            for path in lun.path:
                print(path.transport)

This prints out the following:

(vim.host.SerialAttachedTargetTransport) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) []
}
(vim.host.SerialAttachedTargetTransport) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) []
}

I am interested in retrieving something like this: (Run the esxcli storage core path list command to generate a list of all LUN paths currently connected to the ESXi host.)

fc.5001438005685fb5:5001438005685fb4-fc.50060160c46036df:50060167446036df-naa.6006016094602800e07ff528b73ae011
UID: fc.5001438005685fb5:5001438005685fb4-fc.50060160c46036df:50060167446036df-naa.6006016094602800e07ff528b73ae011
Runtime Name: vmhba0:C0:T0:L23
Device: naa.6006016094602800e07ff528b73ae011
Device Display Name: DGC Fibre Channel Disk ( naa.6006016094602800e07ff528b73ae011)
Adapter: vmhba0
Channel: 0
Target: 0
LUN: 23
Plugin: NMP
State: active
Transport: fc
Adapter Identifier: fc.5001438005685fb5:5001438005685fb4
Target Identifier: fc.50060160c46036df:50060167446036df
Adapter Transport Details: WWNN:-43-WWPN: 50:01:43:80:05:68:5f:b4
Target Transport Details: WWNN:-45-WWPN: 50:06:01:67:44:60:36:d

Thanks in advance...

v dev
  • 1
  • 1

1 Answers1

0

Then you'll likely want to access the individual attributes of the lun path that are of interest to you. Instead of just doing print(path.transport), try something like print(path.transport.address) and print(path.transport.iScsiName). I only see three attributes on that object in my debugger, they are address, iScsiName, and iScsiAlias

smokes2345
  • 190
  • 1
  • 12
  • I didn't see any transport information , @v dev did you get any further info on this ? – Tez Aug 17 '21 at 10:14