# py-hpssa Python module for HP Smart Storage Administrator CLI. (Tested with version 3.30.13.0) The purpose of this module is to provide a simple way to get precise information on HP storage controllers using python objects instead of using awk/sed/grep with the CLI tool provided by HP. ## Getting Started ### Prerequisites Install ssacli from HP "Management Component Pack for ProLiant". Instructions can be found here: http://downloads.linux.hpe.com/SDR/project/mcp/ ### Installing ``` git clone https://gitlab.minet.net/no_pseudo/py-hpssa.git ``` ### Usage examples ``` cd py-hpssa python3 >>> import hpssa >>> controller0 = hpssa.controllers[0] #The first storage controller found on this machine >>> controller0.name 'Smart Array P410i' >>> controller0.ctrl_status 'OK' >>> controller0.bat_cap_status #Controller battery/capacitor status 'OK' >>> controller0.cache_status 'OK' >>> c0_array0 = controller0.arrays[0] #The first array on the first controller >>> c0_array0.arr_id 'A' >>> c0_array0.status 'OK' >>> c0_array0.iface_type 'SATA' >>> c0_a0_logical_drive0 = c0_array0.ldrives[0] # The first logical drive on the first array on the first controller >>> c0_a0_logical_drive0.disk_name '/dev/sda ' >>> c0_a0_logical_drive0.size '931.48 GB' >>> c0_a0_logical_drive0.type 'RAID 1' >>> c0_a0_logical_drive0.status 'OK' >>> c0_a0_l0_physical_drive0 = c0_a0_logical_drive0.pdrives[1] # The second physical drive on the first logical drive on the first array on the first controller >>> c0_a0_l0_physical_drive0.model 'ATA HGST HTS721010A9' >>> c0_a0_l0_physical_drive0.pdrive_location # Can be used to find where the drive is plugged on the machine '2I:1:8' >>> c0_a0_l0_physical_drive0.size '1 TB' >>> c0_a0_l0_physical_drive0.status 'OK' >>> c0_a0_l0_physical_drive0.iface_type 'SATA' >>> c0_a0_l0_physical_drive0.cur_temp # Current temperature of the drive '27' ```