Index: /trunk/Nebulous-Server/Changes
===================================================================
--- /trunk/Nebulous-Server/Changes	(revision 13091)
+++ /trunk/Nebulous-Server/Changes	(revision 13092)
@@ -2,4 +2,6 @@
 
 0.05
+    - remove $class_id & $comment params from Nebulous::Server->create() and
+      Nebulous::Client->create*() and all supporting functions and tests
     - add Nebulous::Server->{setxattr_object, listxattr_object,
       getxattr_object, removexattr_object}()
Index: /trunk/Nebulous-Server/MANIFEST
===================================================================
--- /trunk/Nebulous-Server/MANIFEST	(revision 13091)
+++ /trunk/Nebulous-Server/MANIFEST	(revision 13092)
@@ -85,8 +85,6 @@
 t/07_server_find_instances.t
 t/08_server_delete_instance.t
-t/09_server_is_valid_class_id.t
 t/09_server_stat_object.t
 t/10_server_is_valid_volume_name.t
-t/11_server_is_valid_class_id.t
 t/12_server_find_objects.t
 t/13_server_rename_object.t
Index: /trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- /trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 13091)
+++ /trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 13092)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.27 2007-05-01 02:00:07 jhoblitt Exp $
+# $Id: Server.pm,v 1.28 2007-05-01 02:52:04 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -123,16 +123,7 @@
     my $self = shift;
 
-    my ( $key, $class, $volume, $comment ) = validate_pos( @_,
-        {
-            type        => SCALAR,
-        },
-        {
-            type        => SCALAR,
-            callbacks   => {
-                'is + integer' => sub { $_[0] =~ /^\d+$/ },
-                # check that the class requested is valid
-                'is valid class id' => sub { $self->_is_valid_class_id( $_[0] ) },
-            },
-            default     => 0,
+    my ($key, $volume) = validate_pos(@_,
+        {
+            type        => SCALAR,
         },
         {
@@ -144,12 +135,4 @@
             optional    => 1,
         },
-        {
-            type        => SCALAR,
-            callbacks   => {
-                # check that the comment isn't too long
-                'comment length' => sub { length $_[0] < 256 },
-            },
-            optional    => 1,
-        },
     );
 
@@ -185,5 +168,5 @@
             # create storage_object_attr
             my $query = $db->prepare_cached( $sql->new_object_attr ); 
-            $query->execute( $object_id, $class, $comment );
+            $query->execute( $object_id );
         }
 
@@ -1070,27 +1053,4 @@
 }
 
-sub _is_valid_class_id {
-    my ($self, $class_id) = @_;
-
-    my $log = $self->log;
-    my $sql = $self->sql;
-    my $db  = $self->db;
-
-    my $class;
-    eval {
-        my $query = $db->prepare_cached( $sql->get_class_by_id ); 
-        $query->execute( $class_id );
-        ( $class ) = $query->fetchrow_array;
-
-        $query->finish;
-    };
-    if ( $@ ) {
-        $db->rollback;
-        $log->logdie( "database error: $@" );
-    }
-
-    return ( defined $class ) ? 1 : undef;
-}
-
 sub _is_valid_volume_name  {
     my ($self, $vol_name) = @_;
Index: /trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
===================================================================
--- /trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 13091)
+++ /trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 13092)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: SQL.pm,v 1.29 2007-05-01 02:00:07 jhoblitt Exp $
+# $Id: SQL.pm,v 1.30 2007-05-01 02:52:04 jhoblitt Exp $
 
 package Nebulous::Server::SQL;
@@ -29,6 +29,6 @@
     new_object_attr  => qq{
         INSERT INTO storage_object_attr
-        (so_id, class_id, comment, read_lock, write_lock)
-        VALUES (?, ?, ?, 0, NULL)
+        (so_id, read_lock, write_lock)
+        VALUES (?, 0, NULL)
     },
     delete_object       => qq{
@@ -48,5 +48,5 @@
     get_object          => qq{
         SELECT storage_object.so_id,
-            ext_id, class_id, comment, read_lock, write_lock, epoch, mtime
+            ext_id, read_lock, write_lock, epoch, mtime
         FROM storage_object
         LEFT JOIN storage_object_attr
@@ -176,9 +176,4 @@
         INSERT INTO volume (name, path)
         VALUES (?, ?)
-    },
-    get_class_by_id => qq{
-        SELECT class_id, priority, comment
-        FROM class
-        WHERE class_id = ?
     },
     get_volume_by_name => qq{
@@ -257,12 +252,9 @@
 CREATE TABLE storage_object_attr (
     so_id BIGINT NOT NULL AUTO_INCREMENT,
-    class_id TINYINT NOT NULL,
-    comment VARCHAR(255),
     read_lock TINYINT DEFAULT 0 NOT NULL,
     write_lock ENUM( 'write' ),
     epoch TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
     mtime TIMESTAMP,
-    PRIMARY KEY(so_id),
-    KEY(class_id)
+    PRIMARY KEY(so_id)
 ) ENGINE=innodb;
 
@@ -318,17 +310,4 @@
     PRIMARY KEY(mountpoint)
 ) ENGINE=innodb;
-
-###
-
-CREATE TABLE class (
-    class_id TINYINT NOT NULL,
-    priority TINYINT,
-    comment VARCHAR(255),
-    PRIMARY KEY(class_id)
-) ENGINE=innodb;
-
-###
-
-INSERT INTO class VALUES(0,0, 'default class ID');
 
 ###
Index: /trunk/Nebulous-Server/t/03_server_create_object.t
===================================================================
--- /trunk/Nebulous-Server/t/03_server_create_object.t	(revision 13091)
+++ /trunk/Nebulous-Server/t/03_server_create_object.t	(revision 13092)
@@ -3,10 +3,10 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 03_server_create_object.t,v 1.12 2007-04-23 20:42:29 jhoblitt Exp $
+# $Id: 03_server_create_object.t,v 1.13 2007-05-01 02:52:04 jhoblitt Exp $
 
 use strict;
 use warnings FATAL => qw( all );
 
-use Test::More tests => 14;
+use Test::More tests => 8;
 
 use lib qw( ./t ./lib );
@@ -38,28 +38,6 @@
 
 {
-    # key, class
-    my $uri = $neb->create_object("foo", 0);
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "file exists");
-    uri_scheme_ok($uri, 'file');
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume
-    my $uri = $neb->create_object("foo", 0, "node01");
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "file exists");
-    uri_scheme_ok($uri, 'file');
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume, comment
-    my $uri = $neb->create_object("foo", 0, "node01", "this is foo");
+    # key, volume
+    my $uri = $neb->create_object("foo", "node01");
 
     my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
@@ -78,24 +56,8 @@
 Test::Nebulous->setup;
 
-{
-    my $uri = $neb->create_object("foo", 1);
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "class exists");
-}
-
-Test::Nebulous->setup;
-
 eval {
     $neb->create_object("foo", 99);
 };
-like($@, qr/did not pass the \'is valid class id\'/, "class doesn't exist");
-
-Test::Nebulous->setup;
-
-eval {
-    $neb->create_object(1, 0, 'node01', 'x' x 256);
-};
-like($@, qr/comment length/, "comment is too long");
+like($@, qr/did not pass the \'is valid volume name\'/, "volume name doesn't exist");
 
 Test::Nebulous->setup;
@@ -104,12 +66,12 @@
     $neb->create_object();
 };
-like($@, qr/2 - 4 were expected/, "no params");
+like($@, qr/1 - 2 were expected/, "no params");
 
 Test::Nebulous->setup;
 
 eval {
-    $neb->create_object( 1, 0, 'node01', 1, 1 );
+    $neb->create_object(1, "node01", 3);
 };
-like($@, qr/2 - 4 were expected/, "too many params");
+like($@, qr/1 - 2 were expected/, "too many params");
 
 Test::Nebulous->cleanup;
Index: unk/Nebulous-Server/t/09_server_is_valid_class_id.t
===================================================================
--- /trunk/Nebulous-Server/t/09_server_is_valid_class_id.t	(revision 13091)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#!/usr/bin/perl
-
-# Copryight (C) 2004-2005  Joshua Hoblitt
-#
-# $Id: 09_server_is_valid_class_id.t,v 1.3 2007-03-28 21:53:20 jhoblitt Exp $
-
-use strict;
-use warnings FATAL => qw( all );
-
-use Test::More tests => 3;
-
-use lib qw( ./t ./lib );
-
-use Nebulous::Server;
-use Nebulous::Util qw( :standard );
-use Test::Nebulous;
-
-my $neb = Nebulous::Server->new(
-    dsn         => "DBI:mysql:database=test:host=localhost",
-    dbuser      => "test",
-    dbpasswd    => "",
-);
-
-Test::Nebulous->setup;
-
-# 0 is the default and is guarenteed to exist
-ok($neb->_is_valid_class_id(0), "default class id");
-
-Test::Nebulous->setup;
-
-# the test setup adds class id 1
-ok($neb->_is_valid_class_id(1), "custom class id");
-
-Test::Nebulous->setup;
-
-is($neb->_is_valid_class_id(99), undef, "invalid class id");
-
-Test::Nebulous->cleanup;
Index: /trunk/Nebulous-Server/t/09_server_stat_object.t
===================================================================
--- /trunk/Nebulous-Server/t/09_server_stat_object.t	(revision 13091)
+++ /trunk/Nebulous-Server/t/09_server_stat_object.t	(revision 13092)
@@ -3,10 +3,10 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 09_server_stat_object.t,v 1.9 2007-03-28 22:01:37 jhoblitt Exp $
+# $Id: 09_server_stat_object.t,v 1.10 2007-05-01 02:52:04 jhoblitt Exp $
 
 use strict;
 use warnings FATAL => qw( all );
 
-use Test::More tests => 13;
+use Test::More tests => 11;
 
 use lib qw( ./t ./lib );
@@ -29,5 +29,5 @@
     my $info = $neb->stat_object("foo");
 
-    is(scalar @$info, 8, "number of columns");
+    is(scalar @$info, 6, "number of columns");
 }
 
@@ -35,17 +35,15 @@
 
 {
-    my $uri = $neb->create_object("foo", 0, "node01", "foobar");
+    my $uri = $neb->create_object("foo", "node01");
 
     my $info = $neb->stat_object("foo");
 
-    is(scalar @$info, 8,                       "number of columns");
+    is(scalar @$info, 6,                       "number of columns");
     is(@$info[0], 1,                           "so_id");
     is(@$info[1], "foo",                       "ext_id");
-    is(@$info[2], 0,                           "class_id");
-    is(@$info[3], "foobar",                    "comment");
-    is(@$info[4], 0,                           "read lock");
-    is(@$info[5], undef,                       "write lock");
-    like(@$info[6], qr/....-..-.. ..:..:../,   "epoch");
-    like(@$info[6], qr/....-..-.. ..:..:../,   "mtime");
+    is(@$info[2], 0,                           "read lock");
+    is(@$info[3], undef,                       "write lock");
+    like(@$info[4], qr/....-..-.. ..:..:../,   "epoch");
+    like(@$info[5], qr/....-..-.. ..:..:../,   "mtime");
 }
 
Index: unk/Nebulous-Server/t/11_server_is_valid_class_id.t
===================================================================
--- /trunk/Nebulous-Server/t/11_server_is_valid_class_id.t	(revision 13091)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#!/usr/bin/perl
-
-# Copryight (C) 2004-2005  Joshua Hoblitt
-#
-# $Id: 11_server_is_valid_class_id.t,v 1.3 2007-03-28 23:11:28 jhoblitt Exp $
-
-use strict;
-use warnings FATAL => qw( all );
-
-use Test::More tests => 3;
-
-use lib qw( ./t ./lib );
-
-use Nebulous::Server;
-use Nebulous::Util qw( :standard );
-use Test::Nebulous;
-
-my $neb = Nebulous::Server->new(
-    dsn         => "DBI:mysql:database=test:host=localhost",
-    dbuser      => "test",
-    dbpasswd    => "",
-);
-
-Test::Nebulous->setup;
-
-# 0 is the default and is guarenteed to exist
-ok($neb->_is_valid_class_id(0), "default class id");
-
-Test::Nebulous->setup;
-
-# the test setup adds class id 1
-ok($neb->_is_valid_class_id(1), "custom class id");
-
-Test::Nebulous->setup;
-
-is($neb->_is_valid_class_id(99), undef, "invalid class id");
-
-Test::Nebulous->cleanup;
Index: /trunk/Nebulous/Changes
===================================================================
--- /trunk/Nebulous/Changes	(revision 13091)
+++ /trunk/Nebulous/Changes	(revision 13092)
@@ -2,4 +2,6 @@
 
 0.05
+    - remove $class_id & $comment params from Nebulous::Server->create() and
+      Nebulous::Client->create*() and all supporting functions and tests
     - add Nebulous::Server->{setxattr_object, listxattr_object,
       getxattr_object, removexattr_object}()
Index: /trunk/Nebulous/MANIFEST
===================================================================
--- /trunk/Nebulous/MANIFEST	(revision 13091)
+++ /trunk/Nebulous/MANIFEST	(revision 13092)
@@ -85,8 +85,6 @@
 t/07_server_find_instances.t
 t/08_server_delete_instance.t
-t/09_server_is_valid_class_id.t
 t/09_server_stat_object.t
 t/10_server_is_valid_volume_name.t
-t/11_server_is_valid_class_id.t
 t/12_server_find_objects.t
 t/13_server_rename_object.t
Index: /trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 13091)
+++ /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 13092)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Client.pm,v 1.28 2007-04-28 01:15:38 jhoblitt Exp $
+# $Id: Client.pm,v 1.29 2007-05-01 02:52:04 jhoblitt Exp $
 
 package Nebulous::Client;
@@ -96,15 +96,4 @@
         {
             type        => SCALAR,
-            callbacks   => {
-                'is + integer' => sub { $_[0] =~ /^\d+$/ },
-            },
-            default     => 0,
-        },
-        {
-            type        => SCALAR,
-            optional    => 1,
-        },
-        {
-            type        => SCALAR,
             optional    => 1,
         },
@@ -141,15 +130,4 @@
         {
             type        => SCALAR,
-        },
-        {
-            type        => SCALAR,
-            callbacks   => {
-                'is + integer' => sub { $_[0] =~ /^\d+$/ },
-            },
-            default     => 0,
-        },
-        {
-            type        => SCALAR,
-            optional    => 1,
         },
         {
@@ -609,5 +587,5 @@
     my $new_fh;
     if (defined $volume) {
-        $new_fh  = $self->open_create( $new_key, 0, $volume );
+        $new_fh  = $self->open_create( $new_key, $volume );
     } else {
         $new_fh  = $self->open_create( $new_key );
Index: /trunk/Nebulous/lib/Nebulous/Server.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Server.pm	(revision 13091)
+++ /trunk/Nebulous/lib/Nebulous/Server.pm	(revision 13092)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.27 2007-05-01 02:00:07 jhoblitt Exp $
+# $Id: Server.pm,v 1.28 2007-05-01 02:52:04 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -123,16 +123,7 @@
     my $self = shift;
 
-    my ( $key, $class, $volume, $comment ) = validate_pos( @_,
-        {
-            type        => SCALAR,
-        },
-        {
-            type        => SCALAR,
-            callbacks   => {
-                'is + integer' => sub { $_[0] =~ /^\d+$/ },
-                # check that the class requested is valid
-                'is valid class id' => sub { $self->_is_valid_class_id( $_[0] ) },
-            },
-            default     => 0,
+    my ($key, $volume) = validate_pos(@_,
+        {
+            type        => SCALAR,
         },
         {
@@ -144,12 +135,4 @@
             optional    => 1,
         },
-        {
-            type        => SCALAR,
-            callbacks   => {
-                # check that the comment isn't too long
-                'comment length' => sub { length $_[0] < 256 },
-            },
-            optional    => 1,
-        },
     );
 
@@ -185,5 +168,5 @@
             # create storage_object_attr
             my $query = $db->prepare_cached( $sql->new_object_attr ); 
-            $query->execute( $object_id, $class, $comment );
+            $query->execute( $object_id );
         }
 
@@ -1070,27 +1053,4 @@
 }
 
-sub _is_valid_class_id {
-    my ($self, $class_id) = @_;
-
-    my $log = $self->log;
-    my $sql = $self->sql;
-    my $db  = $self->db;
-
-    my $class;
-    eval {
-        my $query = $db->prepare_cached( $sql->get_class_by_id ); 
-        $query->execute( $class_id );
-        ( $class ) = $query->fetchrow_array;
-
-        $query->finish;
-    };
-    if ( $@ ) {
-        $db->rollback;
-        $log->logdie( "database error: $@" );
-    }
-
-    return ( defined $class ) ? 1 : undef;
-}
-
 sub _is_valid_volume_name  {
     my ($self, $vol_name) = @_;
Index: /trunk/Nebulous/lib/Nebulous/Server/SQL.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Server/SQL.pm	(revision 13091)
+++ /trunk/Nebulous/lib/Nebulous/Server/SQL.pm	(revision 13092)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: SQL.pm,v 1.29 2007-05-01 02:00:07 jhoblitt Exp $
+# $Id: SQL.pm,v 1.30 2007-05-01 02:52:04 jhoblitt Exp $
 
 package Nebulous::Server::SQL;
@@ -29,6 +29,6 @@
     new_object_attr  => qq{
         INSERT INTO storage_object_attr
-        (so_id, class_id, comment, read_lock, write_lock)
-        VALUES (?, ?, ?, 0, NULL)
+        (so_id, read_lock, write_lock)
+        VALUES (?, 0, NULL)
     },
     delete_object       => qq{
@@ -48,5 +48,5 @@
     get_object          => qq{
         SELECT storage_object.so_id,
-            ext_id, class_id, comment, read_lock, write_lock, epoch, mtime
+            ext_id, read_lock, write_lock, epoch, mtime
         FROM storage_object
         LEFT JOIN storage_object_attr
@@ -176,9 +176,4 @@
         INSERT INTO volume (name, path)
         VALUES (?, ?)
-    },
-    get_class_by_id => qq{
-        SELECT class_id, priority, comment
-        FROM class
-        WHERE class_id = ?
     },
     get_volume_by_name => qq{
@@ -257,12 +252,9 @@
 CREATE TABLE storage_object_attr (
     so_id BIGINT NOT NULL AUTO_INCREMENT,
-    class_id TINYINT NOT NULL,
-    comment VARCHAR(255),
     read_lock TINYINT DEFAULT 0 NOT NULL,
     write_lock ENUM( 'write' ),
     epoch TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
     mtime TIMESTAMP,
-    PRIMARY KEY(so_id),
-    KEY(class_id)
+    PRIMARY KEY(so_id)
 ) ENGINE=innodb;
 
@@ -318,17 +310,4 @@
     PRIMARY KEY(mountpoint)
 ) ENGINE=innodb;
-
-###
-
-CREATE TABLE class (
-    class_id TINYINT NOT NULL,
-    priority TINYINT,
-    comment VARCHAR(255),
-    PRIMARY KEY(class_id)
-) ENGINE=innodb;
-
-###
-
-INSERT INTO class VALUES(0,0, 'default class ID');
 
 ###
Index: /trunk/Nebulous/t/03_server_create_object.t
===================================================================
--- /trunk/Nebulous/t/03_server_create_object.t	(revision 13091)
+++ /trunk/Nebulous/t/03_server_create_object.t	(revision 13092)
@@ -3,10 +3,10 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 03_server_create_object.t,v 1.12 2007-04-23 20:42:29 jhoblitt Exp $
+# $Id: 03_server_create_object.t,v 1.13 2007-05-01 02:52:04 jhoblitt Exp $
 
 use strict;
 use warnings FATAL => qw( all );
 
-use Test::More tests => 14;
+use Test::More tests => 8;
 
 use lib qw( ./t ./lib );
@@ -38,28 +38,6 @@
 
 {
-    # key, class
-    my $uri = $neb->create_object("foo", 0);
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "file exists");
-    uri_scheme_ok($uri, 'file');
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume
-    my $uri = $neb->create_object("foo", 0, "node01");
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "file exists");
-    uri_scheme_ok($uri, 'file');
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume, comment
-    my $uri = $neb->create_object("foo", 0, "node01", "this is foo");
+    # key, volume
+    my $uri = $neb->create_object("foo", "node01");
 
     my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
@@ -78,24 +56,8 @@
 Test::Nebulous->setup;
 
-{
-    my $uri = $neb->create_object("foo", 1);
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "class exists");
-}
-
-Test::Nebulous->setup;
-
 eval {
     $neb->create_object("foo", 99);
 };
-like($@, qr/did not pass the \'is valid class id\'/, "class doesn't exist");
-
-Test::Nebulous->setup;
-
-eval {
-    $neb->create_object(1, 0, 'node01', 'x' x 256);
-};
-like($@, qr/comment length/, "comment is too long");
+like($@, qr/did not pass the \'is valid volume name\'/, "volume name doesn't exist");
 
 Test::Nebulous->setup;
@@ -104,12 +66,12 @@
     $neb->create_object();
 };
-like($@, qr/2 - 4 were expected/, "no params");
+like($@, qr/1 - 2 were expected/, "no params");
 
 Test::Nebulous->setup;
 
 eval {
-    $neb->create_object( 1, 0, 'node01', 1, 1 );
+    $neb->create_object(1, "node01", 3);
 };
-like($@, qr/2 - 4 were expected/, "too many params");
+like($@, qr/1 - 2 were expected/, "too many params");
 
 Test::Nebulous->cleanup;
Index: unk/Nebulous/t/09_server_is_valid_class_id.t
===================================================================
--- /trunk/Nebulous/t/09_server_is_valid_class_id.t	(revision 13091)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#!/usr/bin/perl
-
-# Copryight (C) 2004-2005  Joshua Hoblitt
-#
-# $Id: 09_server_is_valid_class_id.t,v 1.3 2007-03-28 21:53:20 jhoblitt Exp $
-
-use strict;
-use warnings FATAL => qw( all );
-
-use Test::More tests => 3;
-
-use lib qw( ./t ./lib );
-
-use Nebulous::Server;
-use Nebulous::Util qw( :standard );
-use Test::Nebulous;
-
-my $neb = Nebulous::Server->new(
-    dsn         => "DBI:mysql:database=test:host=localhost",
-    dbuser      => "test",
-    dbpasswd    => "",
-);
-
-Test::Nebulous->setup;
-
-# 0 is the default and is guarenteed to exist
-ok($neb->_is_valid_class_id(0), "default class id");
-
-Test::Nebulous->setup;
-
-# the test setup adds class id 1
-ok($neb->_is_valid_class_id(1), "custom class id");
-
-Test::Nebulous->setup;
-
-is($neb->_is_valid_class_id(99), undef, "invalid class id");
-
-Test::Nebulous->cleanup;
Index: /trunk/Nebulous/t/09_server_stat_object.t
===================================================================
--- /trunk/Nebulous/t/09_server_stat_object.t	(revision 13091)
+++ /trunk/Nebulous/t/09_server_stat_object.t	(revision 13092)
@@ -3,10 +3,10 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 09_server_stat_object.t,v 1.9 2007-03-28 22:01:37 jhoblitt Exp $
+# $Id: 09_server_stat_object.t,v 1.10 2007-05-01 02:52:04 jhoblitt Exp $
 
 use strict;
 use warnings FATAL => qw( all );
 
-use Test::More tests => 13;
+use Test::More tests => 11;
 
 use lib qw( ./t ./lib );
@@ -29,5 +29,5 @@
     my $info = $neb->stat_object("foo");
 
-    is(scalar @$info, 8, "number of columns");
+    is(scalar @$info, 6, "number of columns");
 }
 
@@ -35,17 +35,15 @@
 
 {
-    my $uri = $neb->create_object("foo", 0, "node01", "foobar");
+    my $uri = $neb->create_object("foo", "node01");
 
     my $info = $neb->stat_object("foo");
 
-    is(scalar @$info, 8,                       "number of columns");
+    is(scalar @$info, 6,                       "number of columns");
     is(@$info[0], 1,                           "so_id");
     is(@$info[1], "foo",                       "ext_id");
-    is(@$info[2], 0,                           "class_id");
-    is(@$info[3], "foobar",                    "comment");
-    is(@$info[4], 0,                           "read lock");
-    is(@$info[5], undef,                       "write lock");
-    like(@$info[6], qr/....-..-.. ..:..:../,   "epoch");
-    like(@$info[6], qr/....-..-.. ..:..:../,   "mtime");
+    is(@$info[2], 0,                           "read lock");
+    is(@$info[3], undef,                       "write lock");
+    like(@$info[4], qr/....-..-.. ..:..:../,   "epoch");
+    like(@$info[5], qr/....-..-.. ..:..:../,   "mtime");
 }
 
Index: unk/Nebulous/t/11_server_is_valid_class_id.t
===================================================================
--- /trunk/Nebulous/t/11_server_is_valid_class_id.t	(revision 13091)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#!/usr/bin/perl
-
-# Copryight (C) 2004-2005  Joshua Hoblitt
-#
-# $Id: 11_server_is_valid_class_id.t,v 1.3 2007-03-28 23:11:28 jhoblitt Exp $
-
-use strict;
-use warnings FATAL => qw( all );
-
-use Test::More tests => 3;
-
-use lib qw( ./t ./lib );
-
-use Nebulous::Server;
-use Nebulous::Util qw( :standard );
-use Test::Nebulous;
-
-my $neb = Nebulous::Server->new(
-    dsn         => "DBI:mysql:database=test:host=localhost",
-    dbuser      => "test",
-    dbpasswd    => "",
-);
-
-Test::Nebulous->setup;
-
-# 0 is the default and is guarenteed to exist
-ok($neb->_is_valid_class_id(0), "default class id");
-
-Test::Nebulous->setup;
-
-# the test setup adds class id 1
-ok($neb->_is_valid_class_id(1), "custom class id");
-
-Test::Nebulous->setup;
-
-is($neb->_is_valid_class_id(99), undef, "invalid class id");
-
-Test::Nebulous->cleanup;
Index: /trunk/Nebulous/t/51_client_create.t
===================================================================
--- /trunk/Nebulous/t/51_client_create.t	(revision 13091)
+++ /trunk/Nebulous/t/51_client_create.t	(revision 13092)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 51_client_create.t,v 1.2 2007-04-23 20:42:29 jhoblitt Exp $
+# $Id: 51_client_create.t,v 1.3 2007-05-01 02:52:04 jhoblitt Exp $
 
 use strict;
@@ -10,5 +10,5 @@
 use Apache::Test qw( -withtestmore );
 
-plan tests => 11;
+plan tests => 7;
 
 use lib qw( ./t ./lib );
@@ -40,40 +40,10 @@
 
 {
-    # key, class
+    # key, volume
     my $neb = Nebulous::Client->new(
         proxy => "http://$hostport/nebulous",
     );
 
-    my $uri = $neb->create("foo", 0);
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "good filename");
-    uri_scheme_ok($uri, 'file');
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume
-    my $neb = Nebulous::Client->new(
-        proxy => "http://$hostport/nebulous",
-    );
-
-    my $uri = $neb->create("foo", 0, "node01");
-
-    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
-    ok(-e $path, "good filename");
-    uri_scheme_ok($uri, 'file');
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume, comment
-    my $neb = Nebulous::Client->new(
-        proxy => "http://$hostport/nebulous",
-    );
-
-    my $uri = $neb->create("foo", 0, "node01", "this is foo");
+    my $uri = $neb->create("foo", "node01");
 
     my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
@@ -102,5 +72,5 @@
     $neb->create();
 };
-like($@, qr/2 - 4 were expected/, "no params");
+like($@, qr/1 - 2 were expected/, "no params");
 
 Test::Nebulous->setup;
@@ -111,7 +81,7 @@
     );
 
-    $neb->create(1, 2, 3, 4, 5);
+    $neb->create(1, 2, 3);
 };
-like($@, qr/2 - 4 were expected/, "too many params");
+like($@, qr/1 - 2 were expected/, "too many params");
 
 Test::Nebulous->cleanup;
Index: /trunk/Nebulous/t/51_client_open_create.t
===================================================================
--- /trunk/Nebulous/t/51_client_open_create.t	(revision 13091)
+++ /trunk/Nebulous/t/51_client_open_create.t	(revision 13092)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 51_client_open_create.t,v 1.2 2007-04-23 20:42:29 jhoblitt Exp $
+# $Id: 51_client_open_create.t,v 1.3 2007-05-01 02:52:04 jhoblitt Exp $
 
 use strict;
@@ -10,5 +10,5 @@
 use Apache::Test qw( -withtestmore );
 
-plan tests => 7;
+plan tests => 5;
 
 use lib qw( ./t ./lib );
@@ -36,36 +36,10 @@
 
 {
-    # key, class
+    # key, volume
     my $neb = Nebulous::Client->new(
         proxy => "http://$hostport/nebulous",
     );
 
-    my $fh = $neb->open_create( "foo", 0 );
-
-    is(ref $fh, 'GLOB', "good filehandle");
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume
-    my $neb = Nebulous::Client->new(
-        proxy => "http://$hostport/nebulous",
-    );
-
-    my $fh = $neb->open_create("foo", 0, "node01");
-
-    is(ref $fh, 'GLOB', "good filehandle");
-}
-
-Test::Nebulous->setup;
-
-{
-    # key, class, volume, comment
-    my $neb = Nebulous::Client->new(
-        proxy => "http://$hostport/nebulous",
-    );
-
-    my $fh = $neb->open_create("foo", 0, "node01", "this is foo");
+    my $fh = $neb->open_create("foo", "node01");
 
     is(ref $fh, 'GLOB', "good filehandle");
@@ -92,5 +66,5 @@
     $neb->open_create();
 };
-like($@, qr/2 - 4 were expected/, "no params");
+like($@, qr/1 - 2 were expected/, "no params");
 
 Test::Nebulous->setup;
@@ -101,7 +75,7 @@
     );
 
-    $neb->open_create(1, 2, 3, 4, 5);
+    $neb->open_create(1, 2, 3);
 };
-like($@, qr/2 - 4 were expected/, "too many params");
+like($@, qr/1 - 2 were expected/, "too many params");
 
 Test::Nebulous->cleanup;
Index: /trunk/Nebulous/t/63_client_stat.t
===================================================================
--- /trunk/Nebulous/t/63_client_stat.t	(revision 13091)
+++ /trunk/Nebulous/t/63_client_stat.t	(revision 13092)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 63_client_stat.t,v 1.1 2005-12-03 02:52:31 jhoblitt Exp $
+# $Id: 63_client_stat.t,v 1.2 2007-05-01 02:52:04 jhoblitt Exp $
 
 use strict;
@@ -10,5 +10,5 @@
 use Apache::Test qw( -withtestmore );
 
-plan tests => 13;
+plan tests => 11;
 
 use lib qw( ./t ./lib );
@@ -30,5 +30,5 @@
     my $info = $neb->stat( "foo" );
 
-    is( scalar @$info, 8, "number of columns" );
+    is( scalar @$info, 6, "number of columns" );
 }
 
@@ -39,17 +39,15 @@
         proxy => "http://$hostport/nebulous",
     );
-    $neb->create( "foo", 0, "node01", "foobar" );
+    $neb->create( "foo", "node01" );
 
     my $info = $neb->stat( "foo" );
 
-    is( scalar @$info, 8,                       "number of columns" );
+    is( scalar @$info, 6,                       "number of columns" );
     is( @$info[0], 1,                           "so_id" );
     is( @$info[1], "foo",                       "ext_id" );
-    is( @$info[2], 0,                           "class_id" );
-    is( @$info[3], "foobar",                    "comment" );
-    is( @$info[4], 0,                           "read lock" );
-    is( @$info[5], undef,                       "write lock" );
-    like( @$info[6], qr/....-..-.. ..:..:../,   "epoch" );
-    like( @$info[6], qr/....-..-.. ..:..:../,   "mtime" );
+    is( @$info[2], 0,                           "read lock" );
+    is( @$info[3], undef,                       "write lock" );
+    like( @$info[4], qr/....-..-.. ..:..:../,   "epoch" );
+    like( @$info[5], qr/....-..-.. ..:..:../,   "mtime" );
 }
 
Index: /trunk/Nebulous/t/Test/Nebulous.pm
===================================================================
--- /trunk/Nebulous/t/Test/Nebulous.pm	(revision 13091)
+++ /trunk/Nebulous/t/Test/Nebulous.pm	(revision 13092)
@@ -1,5 +1,5 @@
 # Copyright (C) 2004  Joshua Hoblitt
 #
-# $Id: Nebulous.pm,v 1.10 2007-04-26 22:27:13 jhoblitt Exp $
+# $Id: Nebulous.pm,v 1.11 2007-05-01 02:52:04 jhoblitt Exp $
 
 package Test::Nebulous;
@@ -42,8 +42,4 @@
     $dbh->do(qq{ INSERT INTO volume VALUES (2,'node02',?) }, undef, $dir2);
     $dbh->do(qq{ INSERT INTO mount VALUES (?, 10e10, 10e10) }, undef, $dir2);
-
-#   class ID 0 should be setup by default
-#    $dbh->do(qq{ INSERT INTO class VALUES (0, 0, "regular data") });
-    $dbh->do(qq{ INSERT INTO class VALUES (1, 1, "special data") });
 }
 
