#!/bin/bash

#
#    Copyright 2018 jhyu
#

DEVS=`ls -l /dev/disk/by-path/ |grep solidfire|cut -d '/' -f 3`
POSITION=1
echo "{"
echo " \"data\":["
for DEV in $DEVS
do
    if [ $POSITION -gt 1 ]
    then
        echo ","
    fi
    echo -n " { \"{#SFNAME}\": \"$DEV\"}"
    POSITION=$[POSITION+1]
done
echo ""
echo " ]"
echo "}"
