Permalink
Browse files

Support modifying class replpolicy strings.

git-svn-id: http://code.sixapart.com/svn/mogilefs/trunk@1429 f67b2e87-0811-0410-a7e0-dd94e48410d6
  • Loading branch information...
1 parent a6c44cc commit 0bc6adf463f362859ec419f78168a230c0c68f7d dormando committed Apr 2, 2010
Showing with 7 additions and 3 deletions.
  1. +2 −0 CHANGES
  2. +5 −3 lib/MogileFS/Admin.pm
View
@@ -1,3 +1,5 @@
+ * Support replpolicy as an argument to class add/modify (dormando)
+
* Don't reuse dead socket on more error conditions (t0m)
* Add chunk_size option for store_file to speed up large uploads
View
@@ -158,7 +158,9 @@ sub get_domains {
$ret->{$res->{"domain$i"}} = {
map {
$res->{"domain${i}class${_}name"} =>
- $res->{"domain${i}class${_}mindevcount"}
+ { mindevcount => $res->{"domain${i}class${_}mindevcount"},
+ replpolicy => $res->{"domain${i}class${_}replpolicy"} || '',
+ }
} (1..$res->{"domain${i}classes"})
};
}
@@ -589,13 +591,13 @@ sub _mod_class {
my MogileFS::Admin $self = shift;
return undef if $self->{readonly};
- my ($domain, $class, $mindevcount, $verb) = @_;
+ my ($domain, $class, $args, $verb) = @_;
$verb ||= 'create';
my $res = $self->{backend}->do_request("${verb}_class", {
domain => $domain,
class => $class,
- mindevcount => $mindevcount,
+ %$args,
});
return undef unless $res->{class} eq $class;

0 comments on commit 0bc6adf

Please sign in to comment.