Index: trunk/Nebulous/Changes
===================================================================
--- trunk/Nebulous/Changes	(revision 17080)
+++ trunk/Nebulous/Changes	(revision 17081)
@@ -3,4 +3,5 @@
 0.07
     - modify neb-df to use Nebulous::Client::mounts()
+    - add Nebulous::Client::mounts()
     - server/client split into Nebulous::Server and Nebulous::Client packages
     - add support for storing instances in multi-tier 'hashed' directories 
Index: trunk/Nebulous/MANIFEST
===================================================================
--- trunk/Nebulous/MANIFEST	(revision 17080)
+++ trunk/Nebulous/MANIFEST	(revision 17081)
@@ -101,4 +101,5 @@
 t/63_client_stat.t
 t/64_client_find_objects.t
+t/65_client_mounts.t
 t/90_nebclient.t
 t/TEST.PL
Index: trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- trunk/Nebulous/lib/Nebulous/Client.pm	(revision 17080)
+++ trunk/Nebulous/lib/Nebulous/Client.pm	(revision 17081)
@@ -1,5 +1,5 @@
-# Copyright (c) 2004  Joshua Hoblitt
+# Copyright (c) 2004-2008  Joshua Hoblitt
 #
-# $Id: Client.pm,v 1.40 2008-03-20 23:21:58 jhoblitt Exp $
+# $Id: Client.pm,v 1.41 2008-03-21 01:53:36 jhoblitt Exp $
 
 package Nebulous::Client;
@@ -705,4 +705,27 @@
 }
 
+
+sub mounts {
+    my $self = shift;
+
+    validate_pos(@_);
+
+    $log->debug( "entered - @_" );
+
+    my $response = $self->{ 'server' }->mounts();
+    if ( $response->fault ) {
+        $log->error( $response->faultcode, " - ", $response->faultstring );
+        $log->debug( "leaving" );
+
+        return;
+    }
+
+    my $stats = $response->result;
+
+    $log->debug( "leaving" );
+
+    return $stats;
+}
+
 sub stat {
     my $self = shift;
Index: trunk/Nebulous/lib/Nebulous/Client.pod
===================================================================
--- trunk/Nebulous/lib/Nebulous/Client.pod	(revision 17080)
+++ trunk/Nebulous/lib/Nebulous/Client.pod	(revision 17081)
@@ -23,9 +23,10 @@
     my $path = $neb->find( "key" );
     my $fh = $neb->open( "key", 'read' );
-    $data->delete( "key" );
-    $data->copy( "key", "new_key", "node01" );
-    $data->move( "key", "new_key" );
-    $data->delete_instance( $uri );
+    $neb->delete( "key" );
+    $neb->copy( "key", "new_key", "node01" );
+    $neb->move( "key", "new_key" );
+    $neb->delete_instance( $uri );
     my $stats = $neb->stat( "key" );
+    my $mounts = $neb->mounts();
 
 =head1 DESCRIPTION
@@ -378,4 +379,23 @@
 Returns an arrayref of scalars.
 
+=item * mounts()
+
+Accepts no parameters and returns an AoA of:
+
+    [
+        [
+            mountpoint,
+            total,
+            used,
+            vol_id,
+            name,
+            path,
+            allocate,
+            available,
+            xattr,
+        ],
+        [ ... ],
+        ...
+    ]
 
 =back
@@ -410,5 +430,5 @@
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2005  Joshua Hoblitt.  All rights reserved.
+Copyright (C) 2004-2008  Joshua Hoblitt.  All rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under
Index: trunk/Nebulous/t/65_client_mounts.t
===================================================================
--- trunk/Nebulous/t/65_client_mounts.t	(revision 17081)
+++ trunk/Nebulous/t/65_client_mounts.t	(revision 17081)
@@ -0,0 +1,70 @@
+#!/usr/bin/perl
+
+# Copryight (C) 2004-2005  Joshua Hoblitt
+#
+# $Id: 65_client_mounts.t,v 1.1 2008-03-21 01:53:36 jhoblitt Exp $
+
+use strict;
+use warnings FATAL => qw( all );
+
+use Apache::Test qw( -withtestmore );
+
+plan tests => 16;
+
+use lib qw( ./t ./lib );
+
+use Nebulous::Client;
+use Nebulous::Util qw( :standard );
+use Test::Nebulous;
+
+my $hostport = Apache::Test->config->{ 'hostport' };
+
+Test::Nebulous->setup;
+
+{
+    # key
+    my $neb = Nebulous::Client->new(
+        proxy => "http://$hostport/nebulous",
+    );
+    my $mounts = $neb->mounts();
+
+    is(scalar @$mounts, 6, "number of rows");
+
+    my %row;
+    # first row
+    @row{qw(mountpoint total used vol_id name path allocate available xattr)}
+        = @{$mounts->[0]};
+
+    is($row{total},     100000000000);
+    is($row{used},      100000000);
+    is($row{vol_id},    1);
+    is($row{name},      "node01");
+    is($row{allocate},  1);
+    is($row{available}, 1);
+    is($row{xattr},     0);
+
+    # 2nd row
+    @row{qw(mountpoint total used vol_id name path allocate available xattr)}
+        = @{$mounts->[1]};
+
+    is($row{total},     100000000000);
+    is($row{used},      1000000000);
+    is($row{vol_id},    2);
+    is($row{name},      "node02");
+    is($row{allocate},  1);
+    is($row{available}, 1);
+    is($row{xattr},     0);
+}
+
+Test::Nebulous->setup;
+
+eval {
+    my $neb = Nebulous::Client->new(
+        proxy => "http://$hostport/nebulous",
+    );
+
+    $neb->mounts("foo");
+};
+like( $@, qr/0 were expected/, "too many params" );
+
+Test::Nebulous->cleanup;
