dsa-check-hpssacli: refactor for speed/efficiency
Currently dsa-check-hpssacli executes:
hpssacli controller all show
hpssacli controller slot=3 ld all show
hpssacli controller slot=3 ld 1 show
hpssacli controller slot=3 ld 2 show
...
hpssacli controller slot=3 pd all show
hpssacli controller slot=3 pd 1I:1:1 show
hpssacli controller slot=3 pd 1I:1:2 show
...
hpssacli controller slot=3 show detail
On systems with e.g. 14 PDs/14 LDs, this results into 32 invocations,
just to get the status of all these disks. On systems with more
disks or controllers, even more.
Refactor the code to simply do:
hpssacli controller all show detail
hpssacli controller slot=3 ld all show detail
hpssacli controller slot=3 pd all show detail
This is lightly tested, but seems to have no adverse effects and
currently achieves a ~10x speed-up.
Signed-off-by: Julien Cristau <jcristau@debian.org>