summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
blob: 55c96b3adc00538ce12603cf5403d37f8d60a422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function volinfo_field()
{
    local vol=$1;
    local field=$2;

    $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
}


function brick_count()
{
    local vol=$1;

    $CLI volume info $vol | egrep "^Brick[0-9]+: " | wc -l;
}

function volume_option()
{
        local vol=$1
        local key=$2
        $CLI volume info $vol | egrep "^$key: " | cut -f2 -d' ';
}