Commit a5908cb6 authored by Kevin Cazal's avatar Kevin Cazal

Added README

parent 22e69f1c
# py-hpssa
Python module for HP Smart Storage Administrator CLI
(tested with version HP Smart Storage Administrator CLI 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'
```
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment