#!/usr/bin/perl
#
#  $Id: sm_wheels 11415 2008-07-14 22:34:05Z teetov $
# -----------------------------------------------------------------------------
#  SM_LIST - small tool provides the list of volumes for MRTG
# -----------------------------------------------------------------------------
#  Author: Alex Titov
#  QA by:
#  Copyright: videoNEXT LLC
# -----------------------------------------------------------------------------
#
# notes:
#   1. command line tool
#
# usage: 
#  sm_list
#
# output sample:
# system:store /vasm/store
# wheels:vol002 /vasm/03e578b4-df88-4bc7-9c25-a3eb203cf89c
# wheels:vol004 /vasm/07f55a2e-7dd7-4769-8c51-960ad3a79eaa
# wheels:vol001 /vasm/16c3ab55-1ffb-4499-95a7-3a8670147f60

use warnings;
use strict;
use File::Basename qw(dirname);    
use lib dirname(__FILE__).'/../lib';              # find  SM::Config here
use SM::Config ':all';

# MAIN =======================================================================
my $vol=SM_Wheels(); #configs of active volumes ex: $vol->{$uuid}->{LIMIT_WRITE}
print "system:store /vasm/store\n"; # this is constant record
print "wheels:$vol->{$_}->{NAME} /vasm/$_\n"   foreach(sort {$vol->{$a}->{NAME} cmp $vol->{$b}->{NAME}} keys %$vol);