Exaforge

Cloud, DevOps, Evangelism

New Tool: VNXArray Python Module

After being inspired by Clint's work, I decided to built something very similar - a Python module.  It connects with naviseccli to any given VNX array, collects 90% of the relevant data and compiles it into a set of true Python objects.  Why Python?  Because its better than PoSH, because its cross platform :).  I plan to extend this further with information about tiers, etc, but this is a start.

myArray = VNXArray("1.1.1.1","sysadmin","sysadmin,0,True) print myArray.controllerPair.model ------ VNX5500

or, a little more complex:

for disk in myArray.disks: print disk;
Disk
 {'ID': u'Bus 0 Enclosure 0  Disk 0',
 'capacityMB': u'274845',
 'currentSpeed': u'6Gbps',
 'driveType': u'SAS',
 'lun': u'77 81 ',
 'maximumSpeed': u'6Gbps',
 'numLuns': u'2',
 'numReads': u'7535989',
 'numWrites': u'4122963',
 'private': True,
 'productId': u'ST930060 CLAR300',
 'productRevision': u'FF03',
 'raidGroupId': u'0',
 'serial': u'3SE2DTK5    ',
 'state': u'Enabled',
 'type': u'77: RAID1/0 81: RAID1/0 ',
 'userCapacity': u'5',
 'vendorId': u'SEAGATE'}
 Disk
 {'ID': u'Bus 0 Enclosure 0  Disk 1',
 'capacityMB': u'274845',
 'currentSpeed': u'6Gbps',
 'driveType': u'SAS',
 'lun': u'77 81 ',
 'maximumSpeed': u'6Gbps',
 'numLuns': u'2',
 'numReads': u'7413955',
 'numWrites': u'4138719',
 'private': True,
 'productId': u'ST930060 CLAR300',
 'productRevision': u'FF03',
 'raidGroupId': u'0',
 'serial': u'3SE2DR0Y    ',
 'state': u'Enabled',
 'type': u'77: RAID1/0 81: RAID1/0 ',
 'userCapacity': u'5',
 'vendorId': u'SEAGATE'}
for lun in myArray.luns: print lun;
LUN
 {'Name': u'multipiece datastore lun_2',
 'RAIDType': u'N/A',
 'capacityMB': 10240,
 'currentOwner': u'SP A',
 'defaultOwner': u'SP A',
 'number': u'56',
 'prctBound': 100,
 'prctRebuilt': 100,
 'private': True,
 'raidGroupID': u'N/A',
 'state': u'Bound',
 'uid': u'60:06:01:60:34:50:29:00:16:BC:FD:54:6A:71:E1:11'}

Get it here:

VNXArray.py.zip